Skip to content

How errclue reads the code around a JavaScript error.

Your JavaScript error names a minified bundle. errclue reads the original file, and the lines around the failure, after the build uploads an artifact bundle. This page is that upload.

Upload the bundle

Create a token under the organization's Auth tokens. Its scope is project:releases. Set it as SENTRY_AUTH_TOKEN where the production build runs. The public key inside the DSN cannot upload a bundle.

Point the plugin at this host, the organization slug, and the project slug. The snippet uses placeholders. Create an account, and the project's Source maps settings fill those three in for the tool you pick.

errclue does not download a sourceMappingURL from the site, and it does not accept the older Release Files API.

One build snippet

The same bundle upload is what Vite, Webpack, Rollup, esbuild, Next.js, Nuxt, SvelteKit, and sentry-cli send. Vite is the snippet on this page. Bundler plugins set url. Next.js, Nuxt, and SvelteKit set sentryUrl. sentry-cli passes --url.

import { sentryVitePlugin } from "@sentry/vite-plugin";

sentryVitePlugin({
  url: "https://<host>",
  org: "<org>",
  project: "<project>",
  authToken: process.env.SENTRY_AUTH_TOKEN,
});

Set build.sourcemap to "hidden". Put the plugin after the others.

When the map is missing

Until a map is uploaded, the issue keeps the minified frames. It says: Source map has not been uploaded yet. Stacks update after the upload lands. The diagnosis says the stack is not mapped back to original source and keeps confidence low. Confidence is an integer from 0 to 100. Severity is a separate label: low, medium, or high.

Debug id first, then release and URL

A debug id matches first, when the frame and the uploaded file name the same code file. If that misses, the release on the event has to equal the release stored with the bundle, and the frame URL has to match the uploaded file. When more than one file shares that release and URL, the file whose dist equals the event wins. An upload with an empty dist is the fallback.

Changing only Sentry.init({ release }) does not rewrite the release already stored on the bundle. When the release is known and the file URL does not match, the issue says: A source map for this release is uploaded, but it does not match this file.

What this page does not cover

This upload does not symbolicate native crashes, ProGuard or R8 mappings, or Dart obfuscation maps.

Rails, Ruby, Python, and Go skip this page. Those SDKs attach the nearby lines when they send the event. A JavaScript plugin does not restore those stacks.

How to tell it worked

Run the production build that emits the maps, with SENTRY_AUTH_TOKEN set, then send one minified exception. The issue shows the original file and the lines around the failure.

A Slack or Discord webhook, if the project has one, gets the issue label, the title, one sentence, and a link. The score stays on the issue page.

How a Slack webhook is posted. How a Discord webhook is posted.

Create an account. Open the organization, then Auth tokens, and the project, then Source maps.

Related

Changing the DSN is the other half. Migrate from Sentry.

Leaving a self-hosted install is a separate question. Read the Sentry self-hosted comparison.

The homepage shows the shape of a diagnosis. Open the homepage.

Create an account.

Free while in beta.

Sign up