GoogleChrome / lighthouse

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

PROTOCOL_TIMEOUT from `redirects-http` #12636

Open connorjclark opened 3 years ago

connorjclark commented 3 years ago

consistent repro for me locally with CLI. Doesn't happen in CDT. Error in LR (when PWA checked): Rendering canceled - timeout during idle.

ref #6512

yarn start https://www.delicious.com.au/ --only-audits=redirects-http

...

waitFor:warn Timed out waiting for page load. Checking if page is hung... +54s
  waitFor:warn Page appears to be hung, killing JavaScript... +11s
  status Disconnecting from browser... +42s
  ChromeLauncher Killing Chrome instance 41162 +1ms
  Driver:warn clearDataForOrigin timed out +11s
  GatherRunner disconnect:error connect ECONNREFUSED 127.0.0.1:50656 +22ms
  CLI:warn Warning: Chrome process could not be killed because it already exited. +171ms
Runtime error encountered: Waiting for DevTools protocol response has exceeded the allotted time. (Method: Emulation.setScriptExecutionDisabled)
LHError: PROT (shutup bot) OCOL_TIMEOUT
    at Timeout.<anonymous> (/Users/cjamcl/src/lighthouse/lighthouse-core/gather/driver.js:322:21)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)
error Command failed with exit code 1.
devtools-bot commented 3 years ago

Howdy! Appreciate you filing this bug. :clap:

We think this is the same root issue as #6512. So, we'll automatically mark this as a duplicate. Thanks! :robot: Beep beep boop.

connorjclark commented 3 years ago

More:

yarn start https://los40.com/pruebas/mj/carga/1571272256_339300_sinpubli.html --only-audits=redirects-http

yarn start https://www.edmunds.com/used-toyota-camry-los-angeles-ca/ --only-audits=redirects-http
patrickhulce commented 3 years ago

AFAICT these are all caused by us blocking their resources on redirect pass (to speed up page load) causes the page to go into an infinite loop which we can never recover from.

Perhaps something to keep in mind for future multi-pass setups.

connorjclark commented 3 years ago

Perhaps empty 200 responses would have been more appropriate.

patrickhulce commented 3 years ago

Perhaps empty 200 responses would have been more appropriate.

I'm have to think that would probably send some pages (possibly different ones) into other loops. Like the <img onerror="this.src = '/404'> bug, these are page bugs, but we should find a way to gracefully handle them which apparently halting script execution does not do :/

patrickhulce commented 3 years ago

ref https://github.com/GoogleChrome/lighthouse/issues/12382#issuecomment-826869326