Website errors, explained
What each error in the browser’s console means for your visitors, why it happens, and how to fix it. You can also check your site for all of them at once.
JavaScript errors
- Cannot read properties of nullA script looked for something on the page that was not there, and stopped.
- Cannot read properties of undefinedA script used a piece of data that had not arrived, or does not exist, and stopped.
- x is not a functionA script tried to use something as an action that is not one, and stopped.
- x is not a constructorA script tried to create something from a library that was not loaded the way it expected.
- x is not definedA script used a name nobody declared, usually because another script it depends on did not load first.
- $ / jQuery is not definedA script needs jQuery and ran before jQuery was on the page, or jQuery never loaded.
- google is not definedThe page tried to draw a Google map before Google's map script had loaded.
- process is not definedCode written for a server ran in the visitor's browser, where that part does not exist.
- require is not definedA file written for a server's module system was sent to the browser as it is.
- Unexpected token '<'The browser asked for a script and got a web page instead, usually an error page or the home page.
- Unexpected end of JSON inputThe page expected data from the server and got an empty answer.
- Cannot use import statement outside a moduleA modern script was loaded the old way, so the browser refused to read it.
- Uncaught (in promise)Something the page asked for in the background failed, and no code was there to handle it.
- TypeError: Failed to fetchThe page tried to get data from a server and the request never completed.
- Failed to fetch dynamically imported moduleThe site was updated while the visitor had it open, and the part they clicked on no longer exists.
- ChunkLoadError: Loading chunk failedPart of the site's code could not be downloaded, usually because the site changed since the page was opened.
- Script error.A script from another website broke, and the browser will not say how.
- ResizeObserver loop completed…A part of the page resized itself while being measured; almost always harmless.
- Hydration failed (React / Next.js)The page the server sent and the page the browser built did not match, so the browser rebuilt it.
- Maximum call stack size exceededA script got stuck calling itself in a loop until the browser stopped it.
- postMessage target origin does not matchAn embedded video or widget tried to talk to its frame before the frame had loaded; usually harmless.
- play() failed / was interruptedA video or sound tried to play on its own and the browser stopped it.
- QuotaExceededError on setItemThe site tried to save more in the visitor's browser than the browser allows.
Blocked by the browser
- Blocked by CORS policyThe page asked another website for data, and that website did not say this page may read it.
- Preflight doesn't pass access control checkBefore sending its real request, the browser asked the other server for permission, and did not get it.
- Mixed ContentA secure page tried to load something over an insecure connection, and the browser refused.
- Refused to execute script: MIME typeThe browser asked for a script and got something else, so it would not run it.
- Refused to execute inline script (CSP)The site's own security rules forbid scripts written into the page, and one was.
- Refused to load the script (CSP)The site's security rules list which websites may send it scripts, and this one is not on the list.
- Refused to display in a frame (X-Frame-Options)The page tried to show another website inside it, and that website does not allow it.
- frame-ancestors violationA website shown inside this page does not allow being shown on this site.
- Permissions policy violation: unloadA script used an old way to run code when the visitor leaves, which Chrome is phasing out.
- DOMNodeInserted Mutation Event deprecatedA script watches the page with an old feature Chrome has removed.
- Parser-blocking script via document.writeA script from another site is added in a way that slows the page, and Chrome may block it on slow connections.
- Non-passive event listener (touchstart)A script listens to touches in a way that can make scrolling on phones feel slower.
Network errors
- ERR_NAME_NOT_RESOLVEDThe page asked for something on a web address that does not exist, or no longer does.
- ERR_CONNECTION_REFUSEDThe server at that address exists but refused to take the connection.
- ERR_CONNECTION_RESETThe connection to the server was cut in the middle.
- ERR_CONNECTION_TIMED_OUT / ERR_TIMED_OUTThe server took too long to answer, and the browser gave up.
- ERR_EMPTY_RESPONSEThe server accepted the connection and then sent nothing back.
- ERR_CERT_AUTHORITY_INVALIDThe site's security certificate was not issued by anyone the browser trusts.
- ERR_CERT_COMMON_NAME_INVALIDThe site's certificate was made for a different address than the one being visited.
- ERR_CERT_DATE_INVALIDThe site's security certificate has expired.
- ERR_TOO_MANY_REDIRECTSThe site keeps sending the browser in a circle between addresses.
- ERR_BLOCKED_BY_CLIENTThe visitor's ad blocker or privacy extension stopped the request.
- ERR_BLOCKED_BY_ORBThe browser blocked something it loaded from another website because it was not what the page said it would be.
- ERR_BLOCKED_BY_RESPONSEThe other website's own answer told the browser not to let this page use it.
- ERR_ABORTEDA request was cancelled, usually on purpose, by the page or the browser.
- ERR_HTTP2_PROTOCOL_ERRORThe server broke the rules of the connection while sending its answer.
- ERR_QUIC_PROTOCOL_ERRORThe fast connection mode Chrome tried with the server (HTTP/3) failed.
- ERR_CONTENT_LENGTH_MISMATCH / INCOMPLETE_CHUNKED_ENCODINGThe server said a file would be a certain size and then sent less.
- This site can't be reachedChrome could not connect to the website at all, so it shows its own page instead.
- Your connection is not privateChrome could not confirm the site is who it claims to be, because of a problem with its security certificate.
HTTP errors
- 502 Bad GatewayThe server you reached works, but the application behind it did not answer properly.
- 403 ForbiddenThe server understood the request and refuses to let you see this.
- 503 Service UnavailableThe server is up but cannot handle the request right now: overloaded, or in maintenance.
- 504 Gateway TimeoutThe server in front waited for the application behind it, and gave up.
- 500 Internal Server ErrorThe site's server crashed while building the answer.
- 404 Not FoundThe server has nothing at this address: a page or file that was moved, deleted, or never existed.
- 400 Bad RequestThe server could not understand or accept what the browser sent.
- 401 UnauthorizedThe page needs you to be signed in, or a valid key, and the request did not have one.
- 429 Too Many RequestsYou, or someone on your network, asked the site too often, and it is making you wait.
- 405 Method Not AllowedThe address exists, but not for the kind of request that was sent to it.
- 413 Request Entity Too LargeThe file or form sent to the site is bigger than the server accepts.
- 403 Forbidden on CloudflareCloudflare, in front of the site, decided this request should not reach it.
- 502 Bad Gateway (nginx)nginx is running, but the application it passes requests to did not answer properly.
- 403 Forbidden (nginx)nginx found the path but is not allowed to serve it.
- 404 Not Found (nginx)nginx looked for the page on disk, where the configuration says, and it is not there.
- 403 Forbidden (openresty)The site's server (OpenResty, a build of nginx) refused the request, often through a hosting company's firewall.