Lighthouse: Lighthouse looks for event that never fires in --single-process mode

Created on 6 Feb 2019  Â·  5Comments  Â·  Source: GoogleChrome/lighthouse

Chrome 72.0.3626.81

npx -p [email protected] lighthouse https://www.hoten.cc --view --chrome-flags=--single-process

This fix might work.

needs-priority

Most helpful comment

Explicitly stating we do not support this is an attractive solution.

All 5 comments

Tried the fix (making sure to completely kill Chrome before each run), but Lighthouse never even gets to computing trace-of-tabs in my testing:

ChromeLauncher Waiting for browser. +0ms
  ChromeLauncher Waiting for browser... +1ms
  ChromeLauncher Waiting for browser..... +509ms
  ChromeLauncher Waiting for browser.....✓ +2ms
  status Connecting to browser +132ms
  status Resetting state with about:blank +604ms
  status Benchmarking machine +116ms
  status Initializing… +511ms
  status Loading page & waiting for onload Scripts, CSSUsage, ViewportDimensions, RuntimeExceptions, ChromeConsoleMessages, Accessibility, ImageElements, LinkElements, MetaElements, AnchorsWithNoRelNoopener, AppCacheManifest, Doctype, DOMStats, JSLibraries, OptimizedImages, PasswordInputsWithPreventedPaste, ResponseCompression, TagsBlockingFirstPaint, FontSize, CrawlableLinks, Hreflang, EmbeddedContent, Canonical, RobotsTxt, TapTargets +17ms
  Driver:warn Timed out waiting for page load. Checking if page is hung... +45s
  Driver:warn Page appears to be hung, killing JavaScript... +1ms
  status Disconnecting from browser... +0ms
  ChromeLauncher Killing Chrome instance 80337 +2ms
  ChromeLauncher:warn Chrome could not be killed kill ESRCH +0ms
(node:80331) UnhandledPromiseRejectionWarning: Error: Chrome could not be killed kill ESRCH
    at Promise (/Users/cjamcl/src/lighthouse/node_modules/chrome-launcher/dist/chrome-launcher.js:255:28)
    at new Promise (<anonymous>)
    at Launcher.kill (/Users/cjamcl/src/lighthouse/node_modules/chrome-launcher/dist/chrome-launcher.js:237:16)
    at Object.<anonymous> (/Users/cjamcl/src/lighthouse/node_modules/chrome-launcher/dist/chrome-launcher.js:58:29)
    at Generator.next (<anonymous>)
    at /Users/cjamcl/src/lighthouse/node_modules/chrome-launcher/dist/chrome-launcher.js:12:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/cjamcl/src/lighthouse/node_modules/chrome-launcher/dist/chrome-launcher.js:8:12)
    at Object.kill (/Users/cjamcl/src/lighthouse/node_modules/chrome-launcher/dist/chrome-launcher.js:53:28)
    at potentiallyKillChrome (/Users/cjamcl/src/lighthouse/lighthouse-cli/run.js:214:29)
(node:80331) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 8)
(node:80331) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: connect ECONNREFUSED 127.0.0.1:61974
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14

Are there any important use cases that require single process mode? I'm somewhat skeptical that all of the performance logic we've had and tested would necessarily hold true in such a different context.

Explicitly stating we do not support this is an attractive solution.

One of the valid cases that require --single-process is AWS Lambda https://github.com/adieuadieu/serverless-chrome/issues/15

But with a custom Chrome build like serverless-chrome, Lighthouse works without any modification.
So, Lighthouse actually supports --single-process but user needs a custom Chrome build that handles it :)

We dont officially support --single-process, though yes the binary that @alekseykulikov points out may resolve things, but that's not in our purview.

Was this page helpful?
0 / 5 - 0 ratings