Skip to content

Errors / JavaScript errors

Uncaught (in promise) …

Something the page asked for in the background failed, and no code was there to handle it.

Sometimes nothing a visitor can see; often a spinner that never stops or a click that does nothing.

Why it happens

  • A fetch() or other promise rejected and nothing called .catch(), or the await was not in a try.
  • A library rejects with a string or an object instead of an Error, so the message has no stack: Uncaught (in promise) undefined or a bare sentence.
  • play() on a video or audio element refused by the browser's autoplay rules.

How to fix it

  1. Read what follows (in promise): that is the rejection's reason, and often the real error.
  2. Handle rejections where the promise is made; for code you do not own, a window.addEventListener("unhandledrejection", …) at least tells you where.
  3. Reject with new Error(…), never a string, so the next person gets a stack.

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