GoogleChrome / lighthouse

Automated auditing, performance metrics, and best practices for the web.
https://developer.chrome.com/docs/lighthouse/overview/
Apache License 2.0
28k stars 9.32k forks source link

NO FCP error on UAT #16083

Closed daphneyyt closed 1 week ago

daphneyyt commented 1 week ago

Hi Google Lighthouse team, we encountered a 'NO FCP' error when Lighthouse scans on our website (UAT environment). We are using Lighthouse built into Chrome to run the scans (on Incognito).

This is the error message received: Error! The page did not paint any content. Please ensure you keep the browser window in the foreground during the load and try again. (NO_FCP)

We also troubleshooted by referencing a similar issue raised by another user: Google Lighthouse Error - No FCP. We've tried using WebPageTest as suggested in this thread but encountered similar errors.

Could you let us know: 1) what is the reason that NO FCP error is triggering? 2) what other solutions could resolve the issue? 3) additionally, could there be any security issues on the server that could be causing the trigger? If yes, what type of security settings could cause the issue?

Appreciate your advise. Please let us know if further information is needed. Thank you.

adamraine commented 1 week ago

what is the reason that NO FCP error is triggering?

As the error message says, the page did not paint any content. This can happen for a variety of reasons but is pretty common if the page Lighthouse is testing is hidden.

what other solutions could resolve the issue?

We need to know how to reproduce this issue in order to diagnose it. What page are you testing on?

additionally, could there be any security issues on the server that could be causing the trigger? If yes, what type of security settings could cause the issue?

This is not likely to be a security issue. The browser is probably just having trouble rendering content for some reason.

benschwarz commented 1 week ago

You may be able to work around this issue by increasing max load wait time or max fcp wait time. In Calibre we have an automatic test retry that watches for NO_FCP errors and re-runs with extended timeouts. In the majority of cases that helps to capture a successful test. If not, there's likely an issue on your side @daphneyyt

daphneyyt commented 1 week ago

Hi @benschwarz we will try increasing the max load wait time and max FCP wait time. However, we would like more guidance on how to do this:

1) Are there any specific settings or adjustments you would recommend, either on the Google Lighthouse tool or the website we are testing? (From our research, it seems like the max load wait time and max FCP time is set on Google Lighthouse.)

2) One of the suggestions online was to have some content with a non-zero opacity on first load on the website. But we are uncertain on where we should apply this.

Hi @adamraine do you have an email address / contact that we could reach you at? The website is confidential and we would prefer not to share its details over GitHub.

Thank you!

adamraine commented 1 week ago

Please send the link to my email found here: https://mailhide.io/e/oDc3THdp

daphneyyt commented 1 week ago

Hi @adamraine thank you. I've dropped you an email with the necessary details.

adamraine commented 1 week ago

Thank you for sharing the site, I am able to reproduce the NO_FCP error. The root cause is that there is no visible content in the main frame of the web page, all of the visible content is contained in an iframe. Lighthouse does not look for FCP within iframe elements, and since there was no FCP in the main frame Lighthouse throws an error.

One workaround would be to test the performance of the site in the iframe directly.

Closing because this is WAI.