Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
connorjclark opened this issue Feb 6, 2019 · 5 comments
Closed

Comments

@connorjclark
Copy link
Collaborator

Chrome 72.0.3626.81

npx -p lighthouse@4.1.0 lighthouse https://www.hoten.cc --view --chrome-flags=--single-process

This fix might work.

@connorjclark
Copy link
Collaborator Author

connorjclark commented Feb 6, 2019

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

@patrickhulce
Copy link
Collaborator

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.

@connorjclark
Copy link
Collaborator Author

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

@alekseykulikov
Copy link
Contributor

One of the valid cases that require --single-process is AWS Lambda adieuadieu/serverless-chrome#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 :)

@paulirish
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants