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

CLI, Node: Performance Score null if running headless #11131

Open
adrian-cerdeira opened this issue Jul 20, 2020 · 7 comments
Open

CLI, Node: Performance Score null if running headless #11131

adrian-cerdeira opened this issue Jul 20, 2020 · 7 comments

Comments

@adrian-cerdeira
Copy link

Provide the steps to reproduce

  1. Run Lighthouse CLI on URL https://www.viag.ch
  2. Use parameters --chrome-flags="--headless"

What is the current behavior?

If parameter headless is used, the performance score is zero. This leads to an error with LCP.
image
But if headless parameter is not used, then the LCP error get ignored and the score is between 0.9 -1.

What is the expected behavior?

Performance score should be between 0 to 1.

Environment Information

  • Affected Channels: CLI, Node
  • Lighthouse version: 6.1.1
  • Chrome version: 83.0.4103.116
  • Node.js version: 12.16.1
  • Operating System: Windows
@patrickhulce
Copy link
Collaborator

patrickhulce commented Jul 20, 2020

Thanks for filing @adrian-cerdeira! I'm not able to reproduce this with your specified environment settings though.

This is what I get
image
image

Are you 100% sure it's using Chrome 83? This is the sort of error message you would get if it were using an older Chromium version.

@adrian-cerdeira
Copy link
Author

Here the proof:
image
Also here is the command I have executed, maybe I am doing something wrong:
lighthouse https://www.viag.ch --chrome-flags="--headless"

@patrickhulce
Copy link
Collaborator

That's the correct command 👍 I'm not sure what's going on, and I don't know how we can help if we can't reproduce it :/

Is it possible this page serves different content to your geo and my geo? (I'm based in the central US)

@adrian-cerdeira
Copy link
Author

It could be. My geo is based from switzerland.

@aseem-upadhyay
Copy link

aseem-upadhyay commented Feb 5, 2021

in my case. if i run the test in a dockerised environment, it works fine when checking for desktop but returns a score of null when executing for mobile.

However, the same command if i run from my terminal, works fine for both desktop and mobile.

Not sure what's causing this

Environment Information
Lighthouse version: 7.0.1
Node version: 12.20.1

@wafendy
Copy link

wafendy commented Feb 18, 2021

I'm also getting performance is null most of the time. The error message I'm getting is:

Chrome didn't collect any screenshots during the page load. 
Please make sure there is content visible on the page, and 
then try re-running Lighthouse. (NO_SCREENSHOTS)

For detailed docker setup can see this post:
https://stackoverflow.com/questions/66251473/chrome-aws-lambda-lighthouse-always-results-in-error-connect-econnrefused-127/66256129#66256129

@paulirish
Copy link
Member

I would also suggest folk running into this try --headless=chrome which is a new (mode) for headless which has much more headful behavior while still being headless. :)

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

8 participants