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

Document nonsupport of --single-process #10433

Closed
AdrianMF opened this issue Mar 6, 2020 · 3 comments · Fixed by #10483
Closed

Document nonsupport of --single-process #10433

AdrianMF opened this issue Mar 6, 2020 · 3 comments · Fixed by #10483

Comments

@AdrianMF
Copy link

AdrianMF commented Mar 6, 2020

Provide the steps to reproduce

The failed version hangs on both CLI and Node versions

Example 1: Fails on single process mode CLI

lighthouse https://chick-fil-a.com/locations/ca/101-telephone --chrome-flags="--headless --single-process" --verbose

Ouput

 <= event:verbose Network.dataReceived {"requestId":"17642.119","timestamp":63324.733082,"dataLength":939,"encodedDataLength":0} +0ms
  <= event:verbose Network.loadingFinished {"requestId":"17642.119","timestamp":63324.733087,"encodedDataLength":0,"shouldReportCorbBlocking":false} +0ms
  NetworkRecorder:verbose network busy +0ms
  Driver:warn Timed out waiting for page load. Checking if page is hung... +39s
  method => browser:verbose Runtime.evaluate {"expression":"\"ping\"","returnByValue":true,"timeout":1000} +0ms
  Driver:warn Page appears to be hung, killing JavaScript... +0ms
  method => browser:verbose Emulation.setScriptExecutionDisabled {"value":true} +0ms
  statusEnd:verbose Loading page & waiting for onload CSSUsage, ViewportDimensions, RuntimeExceptions, ConsoleMessages, AnchorElements, ImageElements, LinkElements, MetaElements, ScriptElements, IFrameElements, MainDocumentContent, AppCacheManifest, Doctype, DOMStats, OptimizedImages, PasswordInputsWithPreventedPaste, ResponseCompression, TagsBlockingFirstPaint, FontSize, EmbeddedContent, RobotsTxt, TapTargets, Accessibility +1ms
  status Disconnecting from browser... +0ms
  method => browser:verbose Storage.clearDataForOrigin {"origin":"https://chick-fil-a.com","storageTypes":"appcache,file_systems,indexeddb,local_storage,shader_cache,websql,service_workers,cache_storage"} +0ms
  GatherRunner disconnect:error not opened +0ms
  statusEnd:verbose Disconnecting from browser... +0ms
  ChromeLauncher Killing Chrome instance 17637 +1ms
  ChromeLauncher:warn Chrome could not be killed kill ESRCH +0ms
Runtime error encountered: not opened
Error: not opened
    at WebSocket.send (/usr/local/lib/node_modules/lighthouse/node_modules/ws/lib/WebSocket.js:344:18)
    at CriConnection.sendRawMessage (/usr/local/lib/node_modules/lighthouse/lighthouse-core/gather/connections/cri.js:167:14)
    at CriConnection.sendCommand (/usr/local/lib/node_modules/lighthouse/lighthouse-core/gather/connections/connection.js:65:10)
    at Driver._innerSendCommand (/usr/local/lib/node_modules/lighthouse/lighthouse-core/gather/driver.js:442:29)
    at /usr/local/lib/node_modules/lighthouse/lighthouse-core/gather/driver.js:416:35
    at new Promise (<anonymous>)
    at Driver.sendCommand (/usr/local/lib/node_modules/lighthouse/lighthouse-core/gather/driver.js:407:12)
    at /usr/local/lib/node_modules/lighthouse/lighthouse-core/gather/driver.js:1013:22
    at async Driver._waitForFullyLoaded (/usr/local/lib/node_modules/lighthouse/lighthouse-core/gather/driver.js:1032:5)
    at async Driver.gotoURL (/usr/local/lib/node_modules/lighthouse/lighthouse-core/gather/driver.js:1164:7)

Example 2: Same site works without single process mode

lighthouse https://chick-fil-a.com/locations/ca/101-telephone --chrome-flags="--headless" --verbose

Output

Report is successfully generated

Example 3: Different site works in single process mode

lighthouse https://locations.visionworks.com/ll/US/AZ/Casa-Grande/917-N-Promenade-Pkwy --chrome-flags="--headless --single-process" --verbose

Output

Report is successfully generated

Comments

I have run these examples using the CLI on my local machine, and also attempted the same URLs running the node module on AWS lambda and the same ones stall on lambda that fail locally.

What is the current behavior?

Single process mode fails for some websites

What is the expected behavior?

Single process mode should work regardless of the website

Environment Information

  • Affected Channels: CLI, Node
  • Lighthouse version: 5.6.0
  • Chrome version: 80.0.3987.132 (Official Build) (64-bit)
  • Node.js version: 13.8.0
  • Operating System: macOS Version 10.15.3 (Build 19D76) also AWS Lambda

Related issues

@patrickhulce
Copy link
Collaborator

Thanks for filing @AdrianMF! We can't support --single-process mode unfortunately (see #7171).

It looks like the previous issue was closed without adding the note to our documentation if anyone is up for that PR though :)

@patrickhulce patrickhulce changed the title Headless single process mode fails on certain websites Document nonsupport of --single-process Mar 6, 2020
@AdrianMF
Copy link
Author

AdrianMF commented Mar 7, 2020

@patrickhulce I appreciate the prompt response. So I guess then it would not be possible to reliably run lighthouse on AWS lambda?

@patrickhulce
Copy link
Collaborator

So I guess then it would not be possible to reliably run lighthouse on AWS lambda?

Not reliably, no. We also recommend against the function-as-a-service/burstable infrastructure for any Lighthouse report that is producing performance results. We've found them to be extremely unreliable and metrics to vary upwards of 100%.

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

Successfully merging a pull request may close this issue.

3 participants