Skip to content

Errors / JavaScript errors

Uncaught (in promise) TypeError: Failed to fetch

The page tried to get data from a server and the request never completed.

Whatever the request was for (a form, a price, a list) never arrives.

Why it happens

  • CORS: the server answered, but not with the headers that allow this page to read it. The console line just before says blocked by CORS policy.
  • The server did not answer: down, wrong address, a DNS name that does not resolve, a certificate problem.
  • Mixed content: an http:// request from an https:// page.
  • The visitor's ad blocker or privacy extension blocked the request (ERR_BLOCKED_BY_CLIENT).
  • The page navigated away while the request was in flight.

How to fix it

  1. Look at the same request in the network tab or in the report's failed requests: its error (ERR_NAME_NOT_RESOLVED, a CORS line, ERR_BLOCKED_BY_CLIENT) names the cause the message does not.
  2. For CORS, the fix is on the server that answers: Access-Control-Allow-Origin for this site.
  3. Catch the error and tell the visitor something, instead of leaving the page waiting.

Whose problem it is

Either the site's own code or a third party's, depending on where it comes from.

Does your site have it?

Free, no account. We open your page and four more in a clean Chrome and list every error like this one, with the page and the click that caused it. How the free page check works.

Check only sites you run or have permission to check.

Often seen with

  • Blocked by CORS policyThe page asked another website for data, and that website did not say this page may read it.
  • ERR_NAME_NOT_RESOLVEDThe page asked for something on a web address that does not exist, or no longer does.
  • ERR_BLOCKED_BY_CLIENTThe visitor's ad blocker or privacy extension stopped the request.
  • Mixed ContentA secure page tried to load something over an insecure connection, and the browser refused.