Skip to the page

Errors and releases that break pages · core

Error tracking and source maps

An error tracker is only useful when the stack traces are readable and each error is tied to a release. Source maps must be uploaded for the exact build and kept out of public files.

The notes

What you must know

  • Generate source maps in the production build, upload them in CI for the exact release, then remove them from the public output (the Sentry Next.js option deleteSourcemapsAfterUpload does this) or never serve them.
  • Matching: debug IDs injected into the bundles (newer and more reliable), or release name plus dist plus file names (older). Any mismatch leaves traces minified.
  • Checks: the release name in the SDK setup equals the upload; the deployed files were not changed after upload (a second minifier, CDN rewriting); the maps belong to this build.
  • React Native: Hermes bytecode needs the composed source map. Release and dist (build number) must match, and each OTA update bundle needs its own maps.
  • Also upload native symbols for native crashes: dSYMs for iOS, the R8 or ProGuard mapping for Android (Expo SDK 58 turns R8 on by default in release builds).
  • An error in an event handler is not caught by an error boundary, which only catches errors in rendering. Report handler errors with window error events or try/catch.
  • Group errors by release and filter by browser. A TypeError only on one browser version is a compatibility clue.
  • Make the upload a CI step that fails the build if it fails, and send a test error after each deploy.

The red pen

Common traps: mistake → fix

  • Mistake: Public source maps are harmless

    Fix: they expose your source; upload them to the tracker and remove them from public output.

  • Mistake: Error boundaries catch every error

    Fix: they catch rendering errors only, not event handlers or async code.

  • Mistake: The release name is a label only

    Fix: a mismatch leaves traces minified.

Easy to hard

Questions interviewers ask, easy to hard

  1. Your error tracker shows only minified stack traces. What do you check?
  2. How do you keep source maps private?
  3. Does an error boundary catch an error thrown in a click handler?
  4. How do you find which release introduced an error?

Explain it out loud

Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.

Practise by voice

Your first interview is free

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview