GoogleChrome / lighthouse

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

error message for websites using websocket could be improved #16137

Closed SimonSiefke closed 1 month ago

SimonSiefke commented 1 month ago

FAQ

URL

https://websocket-example-0.glitch.me/

What happened?

  1. Try to analyze the url https://websocket-example-0.glitch.me/ with pagespeed insights
  2. An error message is displayed Error! The page did not paint any content. Please ensure you keep the browser window in the foreground during the load and try again.

pagespeed-insights-0

What did you expect?

An more helpful error message is displayed that websockets are not supported, e.g. Error! Pagespeed Insights does not support websockets

What have you tried?

No response

How were you running Lighthouse?

PageSpeed Insights

Lighthouse Version

the version pagespeed insights uses

Chrome Version

No response

Node Version

No response

OS

No response

Relevant log output

First Contentful Paint
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)
Largest Contentful Paint
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)
Total Blocking Time
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)
Cumulative Layout Shift
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)
Speed Index
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)


### Additional information

The error seems to occur only with pagespeed insights. When running lighthouse using chrome devtools, no error occurs.
adamraine commented 1 month ago

I don't think this error comes from using websockets, like you said it only happens using PageSpeed and not Lighthouse in DevTools.

After debugging this in pagespeed myself I think Lighthouse is accurately reporting that the page does not paint any content. Not sure why this is only happening in pagespeed but I expect the issue is with the site not rendering anything for certain clients.