lighthouse: Chrome crashes during run

I’m attempting to investigate CLS values in Lighthouse v6 Beta CLI, and the runner will fairly consistently hang and/or crash ~90% of the time on Etsy.com.

Provide the steps to reproduce

  1. Run LH on https://www.etsy.com --only-categories=performance

What is the current behavior?

I’m seeing two variations of similar behavior that seem to be related to the same underlying issue:

  1. The runner will open a new Chrome instance, the audit runs, the runner starts the process to detach from the browser window, but the window stays open and the runner hangs after the following lines are output:
  method => browser:verbose Audits.getEncodedResponse {"requestId":"9493.4","encoding":"jpeg","quality":0.92,"sizeOnly":true} +0ms
  method <= browser OK:verbose Audits.getEncodedResponse {"originalSize":233050,"encodedSize":248806} +25ms
  method => browser:verbose Audits.getEncodedResponse {"requestId":"9493.4","encoding":"webp","quality":0.85,"sizeOnly":true} +1ms
  <= event:verbose Target.detachedFromTarget {"sessionId":"18E03AAD97E889344ECF19B721CC17CC","targetId":"2CADCD0FEF2F0AA2AD41781C524ED691"} +87ms
  <= event:verbose Target.detachedFromTarget {"sessionId":"0A4CF7568E21F504C30CE089DD3B9B31","targetId":"745B52982ABD67AAF5889ECC014BA8BD"} +0ms
  <= event:verbose Inspector.detached {"reason":"target_closed"} +1ms
  1. Similar to above, but the browser window will close, and the runner will output the following error:
  <= event:verbose Inspector.detached {"reason":"target_closed"} +1ms
  method => browser:verbose Runtime.evaluate {"expression":"(function wrapInNativePromise() {\n        const __nativePromise = window.__nativePromise || Promise;\n        const URL = window +60s
  status Disconnecting from browser... +1ms
  method => browser:verbose Storage.clearDataForOrigin {"origin":"https://www.etsy.com","storageTypes":"appcache,file_systems,indexeddb,local_storage,shader_cache,websql,service_workers,cac +0ms
  GatherRunner disconnect:error not opened +1ms
  statusEnd:verbose Disconnecting from browser... +0ms
  ChromeLauncher Killing Chrome instance 7763 +0ms
Runtime error encountered: not opened
Error: not opened
    at WebSocket.send (/Users/ksylormiller/.config/yarn/global/node_modules/ws/lib/WebSocket.js:344:18)
    at CriConnection.sendRawMessage (/Users/ksylormiller/.config/yarn/global/node_modules/lighthouse/lighthouse-core/gather/connections/cri.js:167:14)
    at CriConnection.sendCommand (/Users/ksylormiller/.config/yarn/global/node_modules/lighthouse/lighthouse-core/gather/connections/connection.js:66:10)
    at Driver._innerSendCommand (/Users/ksylormiller/.config/yarn/global/node_modules/lighthouse/lighthouse-core/gather/driver.js:383:29)
    at /Users/ksylormiller/.config/yarn/global/node_modules/lighthouse/lighthouse-core/gather/driver.js:345:35
    at new Promise (<anonymous>)
 ô®›m%ver.sendCommandToSession (/Users/ksylormiller/.config/yarn/global/node_modules/lighthouse/lighthouse-core/gather/driver.js:336:12)
ô®›m#ver.sendCommand (/Users/ksylormiller/.config/yarn/global/node_modules/lighthouse/lighthouse-core/gather/driver.js:363:17)
    at Driver._evaluateInContext (/Users/ksylormiller/.config/yarn/global/node_modules/lighthouse/lighthouse-core/gather/driver.js:470:33)
Ä

Here’s a gist of the full verbose output https://gist.github.com/ksylor/882cd9d6f6f62a729c58e39fca15beeb

What is the expected behavior?

The runner completes and outputs the audit results consistently.

Environment Information

  • Affected Channels: CLI
  • Lighthouse version: 6.0.0-beta.0
  • Chrome version: Google Chrome | 81.0.4044.138 (Official Build) (64-bit)
  • Node.js version: v12.16.3
  • Operating System: MacOS Mojave 10.14.6 (18G4032)

Related issues

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 1
  • Comments: 19 (2 by maintainers)

Most upvoted comments

Tried out Chrome 91.0.4442.4 and so far it looks like Chrome is no longer crashing 🎉

For any situation where all you’re using is the .lhr or .report output, we’d recommend you use a child process for any long-lived use cases.