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 doesn't wait long enough for page to load (NO_LCP) #11180

Closed
eduardosada opened this issue Jul 29, 2020 · 10 comments · Fixed by #11738
Closed

Lighthouse doesn't wait long enough for page to load (NO_LCP) #11180

eduardosada opened this issue Jul 29, 2020 · 10 comments · Fixed by #11738
Assignees

Comments

@eduardosada
Copy link
Contributor

Steps to reproduce

  1. Run lighthouse https://clientes-bancocaminos.grupocaminos.es
  2. Open report

What is the current behavior?

On CLI I get:
largest-contentful-paint:warn Caught exception: NO_LCP

On DevTools I get:
Largest Contentful Paint Error!
Something went wrong with recording the trace over your page load. Please run Lighthouse again. (NO_LCP)

What is the expected behavior?

I don't expect any errors.

Environment Information

  • Affected Channels: CLI, DevTools
  • Lighthouse version: 6.1.1
  • Chrome version: 84.0.4147.105
@eduardosada eduardosada changed the title Unable to get Performance metrics Unable to get Performance metrics (NO_LCP) Jul 29, 2020
@patrickhulce
Copy link
Collaborator

Thanks for filing @eduardosada! I'm not able to reproduce this issue though :/

image

Any other steps or information you can give us that might help?

@eduardosada
Copy link
Contributor Author

I just tried web.dev/measure and sometimes it works and sometimes it doesn't.

https://lighthouse-dot-webdotdevsite.appspot.com//lh/html?url=https%3A%2F%2Fclientes-bancocaminos.grupocaminos.es%2F

¿could you please try again a couple of times? I think it could be a race condition.

@patrickhulce
Copy link
Collaborator

Ah thanks for the example report, in that case it looks like Lighthouse did not wait long enough for the page to completely finish. You can control this from the CLI with the networkQuietThresholdMs in a custom config, but we should try to wait long enough for LCP at least too.

@patrickhulce patrickhulce changed the title Unable to get Performance metrics (NO_LCP) Lighthouse doesn't wait long enough for page to load (NO_LCP) Jul 29, 2020
@patrickhulce
Copy link
Collaborator

Action items here:

  • Add an extra waitForLCP in driver (similar to waitForFCP)
  • Make networkQuietThresholdMs configurable from CLI?

@adamraine
Copy link
Member

Would adding a _waitForLcp make _waitForFcp redundant? Can there be a situation where Chrome records LCP but not FCP?

@patrickhulce
Copy link
Collaborator

Would adding a _waitForLcp make _waitForFcp redundant?

From the technical page load perspective yes but lighthouse treats FCP specially so we'll probably still want both for two main reasons.

  1. We want the thresholds for each to be very different (FCP on order of ~15s whereas LCP should be close to maxWaitForLoad)
  2. Failure of FCP means the entire run fails whereas LCP missing only fails a few audits.

@connorjclark
Copy link
Collaborator

@patrickhulce should we hold this until after fraggle rock?

@patrickhulce
Copy link
Collaborator

I wouldn't delay it just for fraggle rock. The waitForX is all gonna be reusable logic for the most part. It might get a long overdue refactor out of driver as part of FR, but that shouldn't stop us :)

@patrickhulce
Copy link
Collaborator

Another aspect we'll want to consider when we pick this work back up is waiting for all images with a high priority (signal for above the fold) to finish loading for LCP as well. The test case for this is a page with a single very large image that takes more than our quiet timeouts to load.

@adamraine
Copy link
Member

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.

5 participants