question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LHCI continuously failing with PROTOCOL_TIMEOUT error

See original GitHub issue

Logs for the failed process Environment: cypress/browsers:node14.7.0-chrome84 I’ve tried running it with --disable-storage-reset option but that doesn’t seem to work in this case. Couldn’t find any other reason as the same config was working earlier but has now failed continuously for 3-4 times

Running Lighthouse 3 time(s) on http://localhost:41961/index.html
Run #1...failed!
Error: Lighthouse failed with exit code 1
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/@lhci/cli/src/collect/node-runner.js:103:21)
    at ChildProcess.emit (events.js:314:20)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
Tue, 25 Aug 2020 16:44:03 GMT ChromeLauncher Waiting for browser.
Tue, 25 Aug 2020 16:44:03 GMT ChromeLauncher Waiting for browser...
Tue, 25 Aug 2020 16:44:03 GMT ChromeLauncher Waiting for browser.....
Tue, 25 Aug 2020 16:44:04 GMT ChromeLauncher Waiting for browser.......
Tue, 25 Aug 2020 16:44:04 GMT ChromeLauncher Waiting for browser.........
Tue, 25 Aug 2020 16:44:04 GMT ChromeLauncher Waiting for browser.........✓
Tue, 25 Aug 2020 16:44:04 GMT config:warn IFrameElements gatherer requested, however no audit requires it.
Tue, 25 Aug 2020 16:44:04 GMT status Connecting to browser
Tue, 25 Aug 2020 16:44:04 GMT status Resetting state with about:blank
Tue, 25 Aug 2020 16:44:04 GMT status Benchmarking machine
Tue, 25 Aug 2020 16:44:05 GMT status Initializing…
Tue, 25 Aug 2020 16:44:05 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
Tue, 25 Aug 2020 16:44:05 GMT status Resetting state with about:blank
Tue, 25 Aug 2020 16:44:05 GMT status Setting up network for the pass trace
Tue, 25 Aug 2020 16:44:05 GMT status Cleaning browser cache
Tue, 25 Aug 2020 16:44:05 GMT status Beginning devtoolsLog and trace
Tue, 25 Aug 2020 16:44:05 GMT status Loading page & waiting for onload
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: CSSUsage
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: JsUsage
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: ViewportDimensions
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: RuntimeExceptions
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: ConsoleMessages
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: AnchorElements
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: ImageElements
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: LinkElements
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: MetaElements
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: ScriptElements
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: IFrameElements
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: MainDocumentContent
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: AppCacheManifest
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: Doctype
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: DOMStats
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: OptimizedImages
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: PasswordInputsWithPreventedPaste
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: ResponseCompression
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: TagsBlockingFirstPaint
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: FontSize
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: EmbeddedContent
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: RobotsTxt
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: TapTargets
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: Accessibility
Tue, 25 Aug 2020 16:44:35 GMT status Gathering in-page: TraceElements
Tue, 25 Aug 2020 16:44:35 GMT status Gathering trace
Tue, 25 Aug 2020 16:44:35 GMT status Gathering devtoolsLog & network records
Tue, 25 Aug 2020 16:45:05 GMT status Disconnecting from browser...
Tue, 25 Aug 2020 16:45:05 GMT ChromeLauncher Killing Chrome instance 232
Tue, 25 Aug 2020 16:45:05 GMT GatherRunner disconnect:error connect ECONNREFUSED 127.0.0.1:36393
Runtime error encountered: Waiting for DevTools protocol response has exceeded the allotted time. (Method: Network.emulateNetworkConditions)
LHError: PROTOCOL_TIMEOUT
    at Timeout._onTimeout (/usr/local/lib/node_modules/@lhci/cli/node_modules/lighthouse/lighthouse-core/gather/driver.js:352:21)
    at listOnTimeout (internal/timers.js:551:17)
    at processTimers (internal/timers.js:494:7)
LHCI failed!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

5reactions
patrickhulcecommented, Aug 10, 2021

are they included into patrickhulce/lhci-client image

The fixes are all on the settings side of things (such as the --disable-dev-shm-usage flag you’ve configured). Recent Chromium versions have actually introduced more PROTOCOL_TIMEOUT issues, so an update to the image would make things slightly worse right now 😕

0reactions
lazysergeycommented, Aug 10, 2021

hi Patric, I see some fixes in the thread - are they included into patrickhulce/lhci-client image? I am running with cypress/browsers:node14.17.0-chrome91-ff89 where I just launch lhci autorun without issues so far, while lhci-client fails on every launch

my .lighthouserc.js:

module.exports = {
	ci: {
		collect: {
			numberOfRuns: 12,
			settings: {
				chromeFlags: '--disk-cache-size=0 --no-sandbox --headless --disable-dev-shm-usage',
			},
			url: ['http://xxx.com/aaa/', 'http://yyy.com/bbb/'],
		},
		assert: {
			preset: 'lighthouse:recommended',
			assertions: {
				'categories:performance': [
					'error',
					{
						minScore: 2,
					},
				],
				'categories:accessibility': ['error', {minScore: 1}],
			},
		},
		upload: {
			target: 'lhci',
			serverBaseUrl: 'http://lhci.int.zzz.com/',
			token: 'XXXXX-XXXX-XXXXXX-XXXXX',
		},
	},
};
Read more comments on GitHub >

github_iconTop Results From Across the Web

Lighthouse returned error: PROTOCOL_TIMEOUT. Waiting for ...
In case this happens in a Docker container I'd try to use --disable-dev-shm-usage flag for Chrome, for example see ...
Read more >
lighthouse | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
Continuously optimize your website with Lighthouse CI
LHCI (Lighthouse CI) is a suite of tools that makes continuously running, saving, retrieving and asserting against Lighthouse results very ...
Read more >
lighthouse/changelog.md - UNPKG
209, * add note about git repo required for @lhci/cli usage ... 219, * legacy-javascript: exit code 1 on failure ...
Read more >
Performance monitoring with Lighthouse CI - web.dev
How to add Lighthouse to a continuous integration system, ... lhci autorun --upload.target=temporary-public-storage || echo "LHCI failed!".
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found