How to audit 404 (not-found) html page with lighthouse
See original GitHub issueHi,
when I try to run audit on 404 page, the lighthouse complains that it was faulty request and it can’t continue.
runtimeError:
{ code: 'ERRORED_DOCUMENT_REQUEST',
message:
'Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Status code: 404)' },
I wonder why is there this restriction? Is there a way to bypass this and actually test 404 HTML page?
Thank you
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:15 (2 by maintainers)
Top Results From Across the Web
Lighthouse no longer working with website - Error 404
Make sure you are testing the correct URL and that the server is properly responding to all requests.
Read more >PageSpeed Insights – Lighthouse returned error
Lighthouse returned error: ERRORED_DOCUMENT_REQUEST. Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct ...
Read more >Launching SEO Audit category in Lighthouse Chrome extension
The SEO audit category within Lighthouse enables developers and webmasters to run a basic SEO health-check for any web page that identifies potential...
Read more >Lighthouse overview - Chrome Developers
You give Lighthouse a URL to audit, it runs a series of audits against the page, and then it generates a report on...
Read more >GoogleChrome/lighthouse - Gitter
I am using chrome-aws-lambda and I keep getting ECONNREFUSED error at the ... /61011295/lighthouse-and-puppeteer-audit-a-page-require-authentication.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sure. You mentioned that if you host your site in such a way that navigating directly to a URL doesn’t result in the page loading (and instead gives a 404) then Lighthouse can’t measure it. I was saying if this is true, then a user can’t visit it either.
Are you saying that your 404 error page is a client-side redirect to the underlying page (or a copy of your SPA)? If so, I see how we were talking past each other 😃 This still isn’t advisable from the SEO side of things (or from the performance side of things if a redirect), but your point is taken that it’s better served by an audit failure rather than a fatal error.
I’m inclined to agree this should be a toplevel warning rather than a fatal error, or at a minimum an optional flag to optout. Just a question of bandwidth of who is available to work on it.
Thanks for the tip.
It would be useful to bypass this without writing a workaround code. There could be an argument like
--ignore-not-found
or similar.