LHError: Failed with error: PROTOCOL_TIMEOUT
See original GitHub issueDescribe the bug
Lighthouse is timing out when trying to audit the page.
4:26:25 PM: ┌──────────────────────────────────────────────────────┐
4:26:25 PM: │ 2. onSuccess command from @netlify/plugin-lighthouse │
4:26:25 PM: └──────────────────────────────────────────────────────┘
4:26:25 PM:
4:26:25 PM: Serving and scanning site from directory out
4:26:25 PM: Tue, 30 Jun 2020 15:26:25 GMT ChromeLauncher Waiting for browser.
4:26:25 PM: Tue, 30 Jun 2020 15:26:25 GMT ChromeLauncher Waiting for browser...
4:26:26 PM: Tue, 30 Jun 2020 15:26:26 GMT ChromeLauncher Waiting for browser.....
4:26:26 PM: Tue, 30 Jun 2020 15:26:26 GMT ChromeLauncher Waiting for browser.....✓
4:26:26 PM: Tue, 30 Jun 2020 15:26:26 GMT config:warn IFrameElements gatherer requested, however no audit requires it.
4:26:26 PM: Tue, 30 Jun 2020 15:26:26 GMT config:warn InspectorIssues gatherer requested, however no audit requires it.
4:26:26 PM: Tue, 30 Jun 2020 15:26:26 GMT status Connecting to browser
4:26:26 PM: Tue, 30 Jun 2020 15:26:26 GMT status Resetting state with about:blank
4:26:26 PM: Tue, 30 Jun 2020 15:26:26 GMT status Benchmarking machine
4:26:27 PM: Tue, 30 Jun 2020 15:26:27 GMT status Initializing…
4:26:27 PM: Tue, 30 Jun 2020 15:26:27 GMT status Running defaultPass pass CSSUsage, JsUsage, ViewportDimensions, RuntimeExceptions, ConsoleMessages, AnchorElements, ImageElements, LinkElements, MetaElements, ScriptElements, IFrameElements, MainDocumentContent, AppCacheManifest, Doctype, DOMStats, OptimizedImages, PasswordInputsWithPreventedPaste, ResponseCompression, TagsBlockingFirstPaint, FontSize, EmbeddedContent, RobotsTxt, TapTargets, Accessibility, TraceElements, InspectorIssues, SourceMaps
4:26:27 PM: Tue, 30 Jun 2020 15:26:27 GMT status Resetting state with about:blank
4:26:27 PM: Tue, 30 Jun 2020 15:26:27 GMT status Setting up network for the pass trace
4:26:27 PM: Tue, 30 Jun 2020 15:26:27 GMT status Cleaning browser cache
4:26:27 PM: Tue, 30 Jun 2020 15:26:27 GMT status Beginning devtoolsLog and trace
4:26:27 PM: Tue, 30 Jun 2020 15:26:27 GMT status Loading page & waiting for onload
4:26:27 PM: ⚠ warning (DeprecationWarning) OutgoingMessage.prototype._headers is deprecated
4:26:27 PM: [DEP0066]
4:26:27 PM: at new module.exports (/opt/build/repo/node_modules/union/lib/response-stream.js:50:60)
4:26:27 PM: at new module.exports (/opt/build/repo/node_modules/union/lib/routing-stream.js:30:17)
4:26:27 PM: at Server.requestHandler (/opt/build/repo/node_modules/union/lib/core.js:27:25)
4:26:27 PM: at Server.emit (events.js:315:20)
4:26:27 PM: at parserOnIncoming (_http_server.js:790:12)
4:26:27 PM: at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
4:27:12 PM: Tue, 30 Jun 2020 15:27:12 GMT Driver:warn Timed out waiting for page load. Checking if page is hung...
4:27:13 PM: Tue, 30 Jun 2020 15:27:13 GMT Driver:warn Page appears to be hung, killing JavaScript...
4:27:43 PM: Tue, 30 Jun 2020 15:27:43 GMT status Disconnecting from browser...
4:27:43 PM: Tue, 30 Jun 2020 15:27:43 GMT ChromeLauncher Killing Chrome instance 1690
4:27:43 PM: Error: PROTOCOL_TIMEOUT
4:27:43 PM:
4:27:43 PM: ┌────────────────────────────────────────────┐
4:27:43 PM: │ Plugin "@netlify/plugin-lighthouse" failed │
4:27:43 PM: └────────────────────────────────────────────┘
4:27:43 PM:
4:27:43 PM: Error message
4:27:43 PM: LHError: Failed with error: PROTOCOL_TIMEOUT
4:27:43 PM: PROTOCOL_TIMEOUT
4:27:43 PM:
4:27:43 PM: Plugin details
4:27:43 PM: Package: @netlify/plugin-lighthouse
4:27:43 PM: Version: 1.2.1
4:27:43 PM: Repository: git+https://github.com/netlify-labs/netlify-plugin-lighthouse.git
4:27:43 PM: npm link: https://www.npmjs.com/package/@netlify/plugin-lighthouse
4:27:43 PM: Report issues: https://github.com/netlify-labs/netlify-plugin-lighthouse/issues
4:27:43 PM:
4:27:43 PM: Error location
4:27:43 PM: In "onSuccess" event in "@netlify/plugin-lighthouse" from netlify.toml and package.json
4:27:43 PM: at Timeout._onTimeout (/opt/build/repo/node_modules/lighthouse/lighthouse-core/gather/driver.js:352:21)
4:27:43 PM:
4:27:43 PM: Resolved config
4:27:43 PM: build:
4:27:43 PM: base: /opt/build/repo/app1
4:27:43 PM: command: yarn build
4:27:43 PM: environment:
4:27:43 PM: - REVIEW_ID
4:27:43 PM: ignore: git diff --quiet HEAD^ HEAD ../app1/
4:27:43 PM: publish: /opt/build/repo/app1/out
4:27:43 PM: plugins:
4:27:43 PM: - inputs: {}
4:27:43 PM: origin: config
4:27:43 PM: package: '@netlify/plugin-lighthouse'
To Reproduce
The repository is set up in the following manor:
package.json <- with @netlify/plugin-lighthouse dev dependency
app1/netlify.toml
app1/out <- this is where the static files are outputted to.
app1/.... <- basic Next.js files & structure
app1/netlify.toml contains the following:
[build]
command = "yarn build"
publish = "out"
ignore = "git diff --quiet HEAD^ HEAD ../app1/"
[[plugins]]
package = "@netlify/plugin-lighthouse"
[plugins.inputs.thresholds]
performance = 0.9
accessibility = 0.9
best-practices = 0.9
Additional context
- Deploying from a monorepo structure where the toml file is in the sub directory where the app source is and the base directory is set.
- Using Next.js to build and export the app into static files to be served.
- Running the plugin locally using the
outdirectory worked fine. The issue just occurs when running on Netlify.
Issue Analytics
- State:
- Created 3 years ago
- Comments:23 (12 by maintainers)
Top Results From Across the Web
️ PROTOCOL_TIMEOUT · Issue #6512 - GitHub
PROTOCOL_TIMEOUT refers to the situation when Lighthouse has been waiting for Chrome to respond to a single command for more than 30 seconds....
Read more >Lighthouse returned error: PROTOCOL_TIMEOUT. Waiting for ...
This is the error I got when I checked on page speed insights Lighthouse returned error: PROTOCOL_TIMEOUT. Waiting for DevTools protocol ...
Read more >Lighthouse Test Fails with Timeout - WebPageTest Forums
Lighthouse Test Fails with Timeout ... Waiting for DevTools protocol response has exceeded the allotted time. ... LHError: PROTOCOL_TIMEOUT
Read more >Test Errors | DebugBear
Resolving the domain name to an IP address failed. Make sure you're not testing a website that's only available on your internal company...
Read more >Lighthouse returned error: PROTOCOL_TIMEOUT. Waiting for ...
Waiting for DevTools protocol response has exceeded the allotted time. (Method: Page.getAppManifest) (PROTOCOL_TIMEOUT. 2133 views.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I haven’t seen the issue first hand but if it’s the lighthouse library reporting null it sounds to me like it’s an issue for them.
Thanks for the fix, I’ll give it a go tomorrow at some point.
Sure @erezrokah, I’ll raise a PR shortly.