question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to audit 404 (not-found) html page with lighthouse

See original GitHub issue

Hi,

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:open
  • Created 3 years ago
  • Reactions:5
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
patrickhulcecommented, Jun 24, 2021

can you explain what you mean please?

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.

I don’t observe what you are describing so maybe we don’t talk about the same thing?

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.

4reactions
ondrejsevcikcommented, Mar 23, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found