---
title: Troubleshooting
description: Troubleshoot common issues with Honeybadger's JavaScript library and resolve integration problems.
url: https://docs.honeybadger.io/lib/javascript/support/troubleshooting/
---

Common issues/workarounds for [`honeybadger.js`](https://github.com/honeybadger-io/honeybadger-js) are documented here. If you don’t find a solution to your problem here or in our [support documentation](https://docs.honeybadger.io/lib/javascript/#getting-support), email <support@honeybadger.io> and we’ll assist you!

## Before you start troubleshooting

1. Make sure you are on the latest version of [*honeybadger.js*](https://github.com/honeybadger-io/honeybadger-js)
2. Enable the [`debug`config option](https://docs.honeybadger.io/lib/javascript/reference/configuration/)

## All errors are not reported

If *no* errors are reported (even manually via `Honeybadger.notify`):

1. Is the [`apiKey`config option](https://docs.honeybadger.io/lib/javascript/reference/configuration/) configured?
2. Is the error ignored in a [`beforeNotify`callback](https://docs.honeybadger.io/lib/javascript/errors/reducing-noise/)?

## Uncaught errors are not reported

If you can report errors using `Honeybadger.notify`, but uncaught errors are not automatically reported:

1. Is the [`enableUncaught`config option](https://docs.honeybadger.io/lib/javascript/reference/configuration/#configuration-options) enabled? It must be enabled for uncaught errors to be reported. It is enabled by default.

2. Is Honeybadger’s `window.onerror` callback installed? Check `window.onerror` in the console and make sure it originates in honeybadger.js or honeybadger.min.js (or wherever you are hosting our JavaScript). If it doesn’t, it’s possible some 3rd-party code is overriding our callback.

3. If the error originates in a file hosted on a different domain, is CORs enabled? If you host your assets on a CDN (or if the domain is different from where your HTML is served) you may need to enable CORS on your asset domain for the `window.onerror` errors to be reported. See <https://developer.mozilla.org/en/docs/Web/API/GlobalEventHandlers/onerror#Notes> for more info. If this is the issue, you should see logs similar to this:

   ```plaintext
   [Log] [Honeybadger] Ignoring cross-domain script error.
   ```

4. Does your application or framework handle errors internally? If you’re using a framework, search the documentation for “error handling”. For example, Ember provides its own `Ember.onerror` callback which you must configure in order for uncaught errors to be reported:

   ```js
   Ember.onerror = function (error) {
     Honeybadger.notify(error);
   };
   ```

## Errors are reported twice

1. If it’s a React app, are you running in dev mode? React’s [Strict Mode](https://reactjs.org/docs/strict-mode.html#detecting-unexpected-side-effects) may cause double rendering, causing Honeybadger to report multiple errors. This shouldn’t be a problem in your production build. For more info, see [github.com/honeybadger-io/honeybadger-react#247](https://github.com/honeybadger-io/honeybadger-react/issues/247)

## Source map is not working

Note

These steps are supplemental to the **Source Maps Debug Tool**. If you haven’t checked it out yet, start there first! You can find it by visiting *Project Settings → Source Maps → Debug Tool* in your Honeybadger project (if you don’t see the “Source Maps” tab, you may need to go to *Project Settings → Edit* and change the language to “Client-side JavaScript”, “Node.js”, etc.).

### Did the error happen *before* the source map was uploaded?

Honeybadger **does not** apply source maps to errors that have already occurred. If the error in question first occurred before the source map was uploaded, that’s likely the problem—look for a newer version of the error. You may also want to delete the old error in the Honeybadger UI to avoid confusion.

### Did the build process modify the output *after* it generated your source map?

If a source map is available but translation is not working, **make sure that your build process did not add extra lines/comments to the top of your minified JavaScript file**, which could throw off the mapping information. For example, line 1 column 123 would become line 2 column 123, which would not translate.

Likewise, **ensure that your build process or CDN does not minify the file twice.** Some CDN providers (such as Cloudflare) can auto-minify your JavaScript files after you upload them—such options should be disabled.

### If you are hosting your source map

In some cases a few minified errors may get through before we have the chance to download and process your hosted source map. If your source map is not being applied to your errors after the first few minutes:

1. Is your minified file publicly accessible? Try downloading it with `curl`:

   ```sh
   curl https://www.example.com/assets/application.min.js
   ```

2. Does the [`minified_url`](https://docs.honeybadger.io/lib/javascript/errors/using-source-maps/#uploading-your-source-map) point to the correct URL? If you are using [@honeybadger-io/webpack](https://github.com/honeybadger-io/honeybadger-js/tree/master/packages/webpack) or [@honeybadger-io/rollup-plugin](https://github.com/honeybadger-io/honeybadger-js/tree/master/packages/rollup), this parameter is built using the [`assetsUrl`](https://github.com/honeybadger-io/honeybadger-js/tree/master/packages/webpack#plugin-parameters) parameter.

3. Does your minified file have [the`sourceMappingURL`comment](https://docs.honeybadger.io/lib/javascript/errors/using-source-maps/#hosting-your-source-map)?

4. Is your Source Map file publicly accessible? Try downloading it with `curl`:

   ```sh
   curl https://www.example.com/assets/application.min.js.map
   ```

5. If using [Authentication](https://docs.honeybadger.io/lib/javascript/errors/using-source-maps/#authentication), is the `Honeybadger-Token` header validated correctly? Try downloading with `curl`:

   ```sh
   curl -H"Honeybadger-Token: token" https://www.example.com/assets/application.min.js.map
   ```

### If you are uploading your source map

1. Navigate to **Project Settings** -> **Source Maps** -> **Uploaded Source Maps**, then:
2. Does the **Minified URL** for your source map match the minified URL in your JavaScript stack trace? The URLs must match exactly, with the exception of [wildcards](https://docs.honeybadger.io/api/reporting-source-maps/#wildcards) and query strings (which are ignored).
3. Does the **revision** match the `revision` key in the **Application Environment** section of the error page? If it doesn’t, [make sure the`revision`of your uploaded source map is the same as the`revision`configured in`honeybadger.js`](https://docs.honeybadger.io/lib/javascript/errors/using-source-maps/#versioning-your-project).
4. Was the source map uploaded **before** the first error for that revision occurred? Source mappings are cached, meaning that uploading the source map after the error occurred has no effect. The only way to get a new mapping in this case is to deploy a new revision, making sure the source map upload completes before the code is live.
5. If your build process includes compression, make sure your source map files are not compressed (such as with gzip compression) when you upload them.
6. Can you parse your source map as JSON? Source map files must be valid JSON.

## Error in `beforeNotify` handler

If you’re using *honeybadger.js* < 1.0.4, upgrade to a more recent version. [1.0.4 fixed a bug in`beforeNotify`](https://github.com/honeybadger-io/honeybadger-js/blob/master/CHANGELOG.md#104---2019-06-12) which prevented some properties from being available on the notice object (which would most likely result in `ReferenceError` in certain use cases).

---

## Try Honeybadger for FREE

Intelligent logging, error tracking, and Just Enough APM™ in one dev-friendly platform. Find and fix problems before users notice.

[Start free trial](https://app.honeybadger.io/users/sign_up)

[See plans and pricing](https://www.honeybadger.io/plans/)
