GoogleChrome / lighthouse

Automated auditing, performance metrics, and best practices for the web.
https://developer.chrome.com/docs/lighthouse/overview/
Apache License 2.0
28.46k stars 9.39k forks source link

☂️ PROTOCOL_TIMEOUT #6512

Open patrickhulce opened 6 years ago

patrickhulce commented 6 years ago

tl;dr - Chrome sometimes stops responding, most commonly when trying to clear the cache, so uncheck "Clear storage" and try again.

Explanation This is the umbrella ☂️ issue for all PROTOCOL_TIMEOUT error reports. We're collecting all of them in a single place so that we can easily identify which protocol methods are most problematic to prioritize to Chromium domain owners.

PROTOCOL_TIMEOUT refers to the situation when Lighthouse has been waiting for Chrome to respond to a single command for more than 30 seconds. PROTOCOL refers to the Chrome DevTools Protocol connection that Lighthouse uses to talk to Chrome.

If you experienced a protocol timeout issue, please just comment here with the method name, e.g. Network.clearBrowserCache

More recent update: https://github.com/GoogleChrome/lighthouse/issues/6512#issuecomment-924123935

bhavin7181 commented 5 years ago

@patrickhulce Is this error resolved? If yes, what's the resolution? I am using Lighthouse 4.0.0 and it returns PROTOCOL_TIMEOUT for https://quickbooks.intuit.com/oicms/accounting/oip-accounting-sales-tax-copy/ and https://quickbooks.intuit.com/oicms/accounting-copy/ for desktop/mobile device intermittently. Also, couple more pages.

ERROR: "code":"PROTOCOL_TIMEOUT", "message":"Waiting for DevTools protocol response has exceeded the allotted time. (Method: Runtime.evaluate)"

JoeHO888 commented 5 years ago

Lighthouse Version: 5.4.0 Lighthouse Commit: 7e0ea3eedc4625ea2e80fe97e03bae11a80e74db Chrome Version: 75.0.3770.142 Initial URL: https://www.google.com/ Error Message: Waiting for DevTools protocol response has exceeded the allotted time. (Method: Network.clearBrowserCache) Stack Trace:

LHError: PROTOCOL_TIMEOUT
    at chrome-extension://blipmdconlkpinefehnmjammfjpmpbjk/scripts/lighthouse-ext-bundle.js:23383:11
jordie23 commented 5 years ago

Emulation.setScriptExecutionDisabled

lucasfrutig0 commented 5 years ago

Lighthouse Version: 5.6.0 Lighthouse Commit: 848b54397bd062f83d00ac8a87608df8011cf8f1 Chrome Version: 77.0.3865.120 Initial URL: https://jamstack.wtf/ Error Message: Waiting for DevTools protocol response has exceeded the allotted time. (Method: Network.clearBrowserCache) Stack Trace: LHError: PROTOCOL_TIMEOUT at chrome-extension://blipmdconlkpinefehnmjammfjpmpbjk/scripts/lighthouse-ext-bundle.js:23546:11

CraigThompsonCCL commented 5 years ago

Channel: DevTools Initial URL: https://cclobby.staging.wpengine.com/ Chrome Version: 77.0.3865.120 Stack Trace: LHError: PROTOCOL_TIMEOUT at eval (devtools://devtools/remote/serve_file/@416d6d8013e9adb6dd33b0c12e7614ff403d1a94/audits_worker/audits_worker_module.js:1250:210)

CryNando commented 5 years ago

PROTOCOL_TIMEOUT Channel: DevTools Initial URL: http://portal-admin-frontend-dev-deploy.s3-website-us-east-1.amazonaws.com/profile/2 Chrome Version: 77.0.3865.120 Stack Trace: LHError: PROTOCOL_TIMEOUT at eval (devtools://devtools/remote/serve_file/@416d6d8013e9adb6dd33b0c12e7614ff403d1a94/audits_worker/audits_worker_module.js:1250

embeddedt commented 5 years ago

PROTOCOL_TIMEOUT

Channel: DevTools
Initial URL: https://embeddedt.github.io/BucketGame/
Chrome Version: 77.0.3865.120
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@416d6d8013e9adb6dd33b0c12e7614ff403d1a94/audits_worker/audits_worker_module.js:1250:210)
lucasfrutig0 commented 5 years ago

PROTOCOL_TIMEOUT


Channel: DevTools
Initial URL: https://sharp-jennings-1a00ce.netlify.com/
Chrome Version: 78.0.3904.70
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@edb9c9f3de0247fd912a77b7f6cae7447f6d3ad5/audits_worker/audits_worker_module.js:1250:210)
ganapathy11 commented 5 years ago

We are getting the error while testing our website in Lighthouse tool.

Error error1

kairav-wcs commented 5 years ago

PROTOCOL_TIMEOUT

Channel: DevTools
Initial URL: https://www.makello.com/
Chrome Version: 78.0.3904.70
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@edb9c9f3de0247fd912a77b7f6cae7447f6d3ad5/audits_worker/audits_worker_module.js:1250:210)
AbhiPakhare commented 5 years ago

Network.clearBrowserCache

joeybab3 commented 5 years ago

PROTOCOL_TIMEOUT

Channel: DevTools
Initial URL: https://joeybabcock.me/blog/
Chrome Version: 77.0.3865.120
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@416d6d8013e9adb6dd33b0c12e7614ff403d1a94/audits_worker/audits_worker_module.js:1250:210)
kezie commented 5 years ago

Lighthouse I experienced this issue on chrome dev tools.

It works after I unckeck clear storage.

Still needs to be reviewed though.

uthirapandian commented 5 years ago

PROTOCOL_TIMEOUT

Channel: DevTools
Initial URL: 
Chrome Version: 78.0.3904.97
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@021b9028c246d820be17a10e5b393ee90f41375e/audits_worker/audits_worker_module.js:1250:210)
TranslationsCloud commented 5 years ago

PROTOCOL_TIMEOUT


Channel: DevTools
Initial URL: https://www.openstudio.one/
Chrome Version: 78.0.3904.97
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@021b9028c246d820be17a10e5b393ee90f41375e/audits_worker/audits_worker_module.js:1250:210)
PodClay commented 5 years ago

Same as the two previous ones for me: PROTOCOL_TIMEOUT

Channel: DevTools Initial URL: https://aopensolutions.com/ Chrome Version: 78.0.3904.97 Stack Trace: LHError: PROTOCOL_TIMEOUT at eval (devtools://devtools/remote/serve_file/@021b9028c246d820be17a10e5b393ee90f41375e/audits_worker/audits_worker_module.js:1250:210)

devv-romano commented 4 years ago

PROTOCOL_TIMEOUT

Channel: DevTools
Initial URL: 
Chrome Version: 78.0.3904.108
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@4b26898a39ee037623a72fcfb77279fce0e7d648/audits_worker/audits_worker_module.js:1250:210)
rockfreak commented 4 years ago

Same as the others

PROTOCOL_TIMEOUT

Channel: DevTools
Initial URL: https://www.ecoconcepts.co/
Chrome Version: 78.0.3904.108
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@4b26898a39ee037623a72fcfb77279fce0e7d648/audits_worker/audits_worker_module.js:1250:210)
rockfreak commented 4 years ago

Same as the others

PROTOCOL_TIMEOUT

Channel: DevTools
Initial URL: https://www.ecoconcepts.co/
Chrome Version: 78.0.3904.108
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@4b26898a39ee037623a72fcfb77279fce0e7d648/audits_worker/audits_worker_module.js:1250:210)

For the record, unchecking clear local storage prevents the error.

A work around not really a long term fix.

Lusitaniae commented 4 years ago

Is there any setting I can use to adjust timeouts?

Emulation.setScriptExecutionDisabled
patrickhulce commented 4 years ago

Is there any setting I can use to adjust timeouts?

This is an interesting idea. @connorjclark what do you think about a flag to control behavior on timeouts either for duration or moving on when the return type is void? Lighthouse did in fact used to run without any protocol timeout assertions, so it seems possible :)

connorjclark commented 4 years ago

I don't know what that would accomplish for most of these errors. Emulation.setScriptExecutionDisabled specifically - that should return immediately - the fact that it doesn't means the entire run isn't to be trusted. Just ignoring it and moving on would not be good imo.

Lusitaniae commented 4 years ago

Any idea why would this happen?

It seems to happen when I run from Gitlab CI, locally doesn't have any issues.

I can try later on configuring a bigger server as CI runner in Gitlab

I'm running the tests on a couple of pages, two of them work fine, two of them timeout with that error.

The pages are kind of heavy on javascript with React and other dependencies (~45 performance score on finished tests)

35 Running Lighthouse 3 time(s) on [redacted-url]
36 Run #1...failed!
37 Error: Lighthouse failed with exit code 1
38     at ChildProcess.child.on.code (/usr/local/lib/node_modules/@lhci/cli/src/collect/lighthouse-runner.js:103:21)
39     at ChildProcess.emit (events.js:198:13)
40     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
41 Thu, 12 Dec 2019 12:10:08 GMT ChromeLauncher Waiting for browser.
42 Thu, 12 Dec 2019 12:10:08 GMT ChromeLauncher Waiting for browser...
43 Thu, 12 Dec 2019 12:10:09 GMT ChromeLauncher Waiting for browser.....
44 Thu, 12 Dec 2019 12:10:09 GMT ChromeLauncher Waiting for browser.....✓
45 Thu, 12 Dec 2019 12:10:09 GMT config:warn IFrameElements gatherer requested, however no audit requires it.
46 Thu, 12 Dec 2019 12:10:09 GMT status Connecting to browser
47 Thu, 12 Dec 2019 12:10:09 GMT status Resetting state with about:blank
48 Thu, 12 Dec 2019 12:10:09 GMT status Benchmarking machine
49 Thu, 12 Dec 2019 12:10:09 GMT status Initializing…
50 Thu, 12 Dec 2019 12:10:09 GMT status Resetting state with about:blank
51 Thu, 12 Dec 2019 12:10:09 GMT status Setting up network for the pass trace
52 Thu, 12 Dec 2019 12:10:09 GMT status Cleaning browser cache
53 Thu, 12 Dec 2019 12:10:09 GMT status Beginning devtoolsLog and trace
54 Thu, 12 Dec 2019 12:10:09 GMT status Loading page & waiting for onload CSSUsage, ViewportDimensions, RuntimeExceptions, ConsoleMessages, AnchorElements, ImageElements, LinkElements, MetaElements, ScriptElements, IFrameElements, AppCacheManifest, Doctype, DOMStats, OptimizedImages, PasswordInputsWithPreventedPaste, ResponseCompression, TagsBlockingFirstPaint, FontSize, EmbeddedContent, RobotsTxt, TapTargets, Accessibility
55 Thu, 12 Dec 2019 12:10:55 GMT Driver:warn Timed out waiting for page load. Checking if page is hung...
56 Thu, 12 Dec 2019 12:10:56 GMT Driver:warn Page appears to be hung, killing JavaScript...
57 Thu, 12 Dec 2019 12:11:26 GMT status Disconnecting from browser...
58 Thu, 12 Dec 2019 12:11:26 GMT ChromeLauncher Killing Chrome instance 335
59 Thu, 12 Dec 2019 12:11:26 GMT GatherRunner disconnect:error connect ECONNREFUSED 127.0.0.1:35500
60 Runtime error encountered: Waiting for DevTools protocol response has exceeded the allotted time. (Method: Emulation.setScriptExecutionDisabled)
61 LHError: PROTOCOL_TIMEOUT
62     at Timeout.setTimeout [as _onTimeout] (/usr/local/lib/node_modules/@lhci/cli/node_modules/lighthouse/lighthouse-core/gather/driver.js:409:21)
63     at ontimeout (timers.js:436:11)
64     at tryOnTimeout (timers.js:300:5)
65     at listOnTimeout (timers.js:263:5)
66     at Timer.processTimers (timers.js:223:10)
michael-lang commented 4 years ago

PROTOCOL_TIMEOUT

Channel: DevTools
Initial URL: https://localhost:44313/customers
Chrome Version: 78.0.3904.108
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@4b26898a39ee037623a72fcfb77279fce0e7d648/audits_worker/audits_worker_module.js:1250:210)

I get this error whether or not "clear cache" is checked. The error noted is without it checked.

Sample repo: https://github.com/NexulAcademy/classroom-simple-crm-v2/commit/94c0c3441c60f587c75adc77c58e2c178ba0cba4

Start the sample repo by running the .net project, which serves the API and Angular app. API requires the Entity Framework Db migrations to run. directions in the repo. (README-MIGRATIONS.md)

stevesan commented 4 years ago

PROTOCOL_TIMEOUT

Channel: DevTools
Initial URL: ** CENSORED **
Chrome Version: 79.0.3945.117
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@04f0a055010adab4484f7497fbfdbf312c307f1d/audits_worker/audits_worker_module.js:1268:229)
stevenChuCP commented 4 years ago

PROTOCOL_TIMEOUT

Channel: DevTools
Initial URL: https://sudsy-crush.glitch.me/
Chrome Version: 79.0.3945.130
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@e22de67c28798d98833a7137c0e22876237fc40a/audits_worker/audits_worker_module.js:1268:229)
sygalin commented 4 years ago

PROTOCOL_TIMEOUT

Channel: DevTools
Initial URL: https://djabbama-aws.sygalin-tvsat.com/
Chrome Version: 79.0.3945.88
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@c2a58a36b9411c80829b4b154bfcab97e581f1f3/audits_worker/audits_worker_module.js:1268:229)
FVolral commented 4 years ago

PROTOCOL_TIMEOUT


Channel: DevTools
Initial URL:  ***
Chrome Version: 79.0.3945.117
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@04f0a055010adab4484f7497fbfdbf312c307f1d/audits_worker/audits_worker_module.js:1268:229)
y4ahmad commented 4 years ago

PROTOCOL_TIMEOUT

Channel: DevTools
Initial URL: https://seoz.com.au/
Chrome Version: 79.0.3945.130
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@e22de67c28798d98833a7137c0e22876237fc40a/audits_worker/audits_worker_module.js:1268:229)

Do we have any solution onto this?

gavindoughtie commented 4 years ago

PROTOCOL_TIMEOUT

Channel: DevTools
Initial URL: https://portal.cyqustaging.com/dashboard
Chrome Version: 79.0.3945.130
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@e22de67c28798d98833a7137c0e22876237fc40a/audits_worker/audits_worker_module.js:1268:229)
gavindoughtie commented 4 years ago

What I'm seeing is the page being audited reload with "normal" performance, then appear to reload and time out.

If it's useful, the app in question is compiled with Angular 9rc8, and has the same behavior with Angular 9rc10.

I have throttling and clear storage turned OFF, and I'm testing just for desktop.

UPDATE: Turning off the test for PWA makes the problem go away.

ghost commented 4 years ago

Channel: DevTools Initial URL: https://localhost:44322/email/template.html Chrome Version: 79.0.3945.130 Stack Trace: LHError: PROTOCOL_TIMEOUT at eval (devtools://devtools/remote/serve_file/@e22de67c28798d98833a7137c0e22876237fc40a/audits_worker/audits_worker_module.js:1268:229)

ghost commented 4 years ago

Channel: DevTools Initial URL: https://localhost:44322/email/template.html Chrome Version: 79.0.3945.130 Stack Trace: LHError: PROTOCOL_TIMEOUT at eval (devtools://devtools/remote/serve_file/@e22de67c28798d98833a7137c0e22876237fc40a/audits_worker/audits_worker_module.js:1268:229)

FYI, the Audit the gives the error is Progressive Web App

Rickgrendel commented 4 years ago

`PROTOCOL_TIMEOUT

Channel: DevTools
Initial URL: http://192.168.178.129/files/apenkoppen/videos/optimized.webm
Chrome Version: 79.0.3945.130
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@e22de67c28798d98833a7137c0e22876237fc40a/audits_worker/audits_worker_module.js:1268:229)

This is on a test sites with only a webm video on it. The only things I checked were the 'performance' and 'Best practices' and I cleared the store

verybadcat commented 4 years ago

Initial URL: https://localhost:44396/ Chrome Version: 80.0.3987.87 Stack Trace: LHError: PROTOCOL_TIMEOUT at eval (devtools://devtools/remote/serve_file/@449cb163497b70dbf98d389f54e38e85d4c59b43/audits_worker/audits_worker_module.js:1268:229)



Unchecking clear local storage did not help
devcraftsman commented 4 years ago

Same error here like the other: "PROTOCOL_TIMEOUT", lighthouse 5.6.0. Solved by disabling "pwa" from categories. Run with: --only-categories=performance,accessibility,seo,best-practices it works perfectly.

wildlyinaccurate commented 4 years ago

We can consistently reproduce this error when running Lighthouse on slower hardware. Here's an example result in WPT on a Raspberry Pi. It runs successfully on a decent laptop. I can also reproduce this in SpeedCurve's test agents (LH fails on a c4.large EC2 instance but succeeds on on a c5.2xlarge).

Last few lines of output from a failed run:

Mon, 03 Feb 2020 03:14:46 GMT status Gathering trace
Mon, 03 Feb 2020 03:14:48 GMT status Gathering devtoolsLog & network records
Mon, 03 Feb 2020 03:14:48 GMT status Gathering: CSSUsage
Mon, 03 Feb 2020 03:16:20 GMT status Disconnecting from browser...
Runtime error encountered: Waiting for DevTools protocol response has exceeded the allotted time. (Method: Runtime.evaluate)
LHError: PROTOCOL_TIMEOUT
    at Timeout.setTimeout [as _onTimeout] (/usr/lib/node_modules/lighthouse/lighthouse-core/gather/driver.js:409:21)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
Ph0B1uS commented 4 years ago

This test was done with every category but PWA on docker for mac 2.2.0.3 (docker version 19.03.5), lighthouse version 5.6.0 on a 2,6 GHz 6-Core Intel Core i7 with 16 gigs of ram. I have however seen the same kind of issues running on ECS with both t3.xlarge and t3.2xlarge although they are more frequent on ECS than when running on prem.

Mon, 17 Feb 2020 15:14:29 GMT Driver:warn Timed out waiting for page load. Checking if page is hung...
Mon, 17 Feb 2020 15:14:30 GMT Driver:warn Page appears to be hung, killing JavaScript...
Mon, 17 Feb 2020 15:15:00 GMT status Disconnecting from browser...
Mon, 17 Feb 2020 15:15:00 GMT ChromeLauncher Killing Chrome instance 254
Mon, 17 Feb 2020 15:15:00 GMT GatherRunner disconnect:error read ECONNRESET
Runtime error encountered: Waiting for DevTools protocol response has exceeded the allotted time. (Method: Emulation.setScriptExecutionDisabled)
LHError: PROTOCOL_TIMEOUT
    at Timeout._onTimeout (/usr/lib/node_modules/lighthouse/lighthouse-core/gather/driver.js:409:21)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)
krishnaacc123 commented 4 years ago

Network.emulateNetworkConditions

JoeMcCleery commented 4 years ago

CSS.enable

neeraj-upreti commented 4 years ago

PROTOCOL_TIMEOUT


Channel: DevTools
Initial URL: https://bargainairticket.com/
Chrome Version: 80.0.3987.122
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@cf72c4c4f7db75bc3da689cd76513962d31c7b52/audits_worker/audits_worker_module.js:1268:229)
schroef commented 4 years ago

PROTOCOL_TIMEOUT

Channel: DevTools
Initial URL: http://www.promotiespullen.com/
Chrome Version: 81.0.4044.34
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@d547948f7fac564a99b7e63f70358fab804e5ff7/audits_worker/audits_worker_module.js:1268:229)
jarvatar commented 4 years ago

PROTOCOL_TIMEOUT

Channel: DevTools
Initial URL: https://www.aicaorthopedics.com/
Chrome Version: 80.0.3987.132
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@fcea73228632975e052eb90fcf6cd1752d3b42b4/audits_worker/audits_worker_module.js:1268:229)
sanjaycg486 commented 4 years ago

Failed: script timeout (Session info: chrome=80.0.3987.132) (Driver info: chromedriver=80.0.3987.106 (f68069574609230cf9b635cd784cfb1bf81bb53a-refs/branch-heads/3987@{#882}),platform=Windows NT 10.0.18363 x86_64)

Igloczek commented 4 years ago
Network.emulateNetworkConditions
JoseInTheArena commented 4 years ago

Waiting for DevTools protocol response has exceeded the allotted time. (Method: Runtime.evaluate)

CoSNaYe commented 4 years ago

PROTOCOL_TIMEOUT

Channel: DevTools
Initial URL: http://localhost:8082/shops/***
Chrome Version: 80.0.3987.132
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@fcea73228632975e052eb90fcf6cd1752d3b42b4/audits_worker/audits_worker_module.js:1268:229)
mamtach commented 4 years ago

PROTOCOL_TIMEOUT

Channel: DevTools
Initial URL: https://www.ecmsdjango.com/
Chrome Version: 80.0.3987.149
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@5f4eb224680e5d7dca88504586e9fd951840cac6/audits_worker/audits_worker_module.js:1268:229)
kewbish commented 4 years ago

Having the same issue as @mamtach and a couple others recently, I believe.

PROTOCOL_TIMEOUT
Channel: DevTools
Initial URL: https://kewbish.github.io/
Chrome Version: 80.0.3987.149
Stack Trace: LHError: PROTOCOL_TIMEOUT
    at eval (devtools://devtools/remote/serve_file/@5f4eb224680e5d7dca88504586e9fd951840cac6/audits_worker/audits_worker_module.js:1268:229)
rmekni commented 4 years ago

OS: W10 pro

PROTOCOL_TIMEOUT

Channel: DevTools Initial URL: http://test.local/ Chrome Version: 80.0.3987.149 Stack Trace: LHError: PROTOCOL_TIMEOUT at eval (devtools://devtools/remote/serve_file/@5f4eb224680e5d7dca88504586e9fd951840cac6/audits_worker/audits_worker_module.js:1268:229)



It gets to work after restart