Troubleshooting

Common issues/workarounds for honeybadger.js are documented here. If you don't find a solution to your problem here or in our support documentation, 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
  2. Enable the debug config option

All Errors Are Not Reported

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

  1. Is the apiKey config option configured?
  2. Is the error ignored in a beforeNotify callback?

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

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

Source Map Is Not Working

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 point to the correct URL? If you are using @honeybadger-io/webpack or @honeybadger-io/rollup-plugin, this parameter is built using the assetsUrl parameter.

  3. Does your minified file have the sourceMappingURL comment?

  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, 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:
    1. 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 and query strings (which are ignored).
    2. 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.
    3. 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.
  2. If your build process includes compression, make sure your source map files are not compressed (such as with gzip compression) when you upload them.
  3. 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 which prevented some properties from being available on the notice object (which would most likely result in ReferenceError in certain use cases).