Issue
I want to understand how Sentry turns minified JavaScript stack traces into readable, unminified frames, and which source map fields matter when stack traces or source context look wrong.
Applies To
All SaaS Customers and Self-Hosted Users
Source Maps
Resolution
Sentry uses your minified JavaScript file together with its source map to map each production stack frame back to your original source. For each frame, Sentry looks up the generated line and column in the source map, then resolves the original file path, position, and (when available) identifier name and source code for the UI.
A source map is a JSON file. These keys are the ones that drive unminified stack traces and source context in Sentry:
mappingstells Sentry how generated line and column numbers map to original locationssourcestells Sentry the original file pathsnamesprovides original identifier names used by the mappings (the samenameyou see when verifying a mapping locally, for example with Mozilla’ssource-maplibrary)sourcesContentcontains the original source code Sentry shows next to the stack frame in the UI
If sourcesContent is missing, Sentry can still deminify file names and positions when mappings and sources are present. Sentry then tries other ways to load the original source. If that fails, the issue may show a “Missing Sources Context” banner with no code. For that case, see Why do I see a "Missing Sources Context" error on my issue?.
If stack traces in Sentry look wrong, first confirm the map and minified bundle you upload contain correct mappings, sources, and (when you expect source context) sourcesContent. Then follow the checks in the source maps troubleshooting documentation.
You can also verify a mapping outside Sentry with these tools (not built or maintained by Sentry):
For upload and setup, see the source maps documentation.
