Repository navigation
fix(sourcemap): Keep existing debug IDs with upload --no-rewrite - #2524
Merged
Merged
Conversation
`sentry sourcemap upload --no-rewrite` sent every file without a debug ID,
even when the JS already ends in `//# debugId=` or its map carries
`debug_id`, as Turbopack and the bundler plugins write them. Without
`--release`, Sentry then rejects the bundle ("uploading a bundle without
debug ids or release is prohibited").
Read the IDs the pairs already carry, with the same precedence injection
uses (JS comment, then the map's `debug_id` / `debugId`), and send them
as `debug-id` headers. The files stay unchanged.
Fixes #2500
Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
BYK
approved these changes
Nov 26, 2026
BYK
marked this pull request as ready for review
November 26, 2026 12:20
BYK
enabled auto-merge (squash)
November 26, 2026 12:20
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sentry sourcemap upload --no-rewritesent every file without a debug ID, even when the JS already ends in//# debugId=or its map carriesdebug_id. Turbopack writes these natively, as do the bundler plugins andsourcemap inject. Without--release, Sentry then rejects the bundle ("uploading a bundle without debug ids or release is prohibited"), because no manifest entry has adebug-idheader.--no-rewritenow reads the IDs the pairs already carry, without touching the files, and sends them asdebug-idheaders on both theminified_sourceandsource_mapentries.//# debugId=comment, else the map'sdebug_id/debugId. Injection andinject --dry-runuse the same order, and the dry run now shares the helper.--debug-id-reference. v4 does that by default (see the migration guide), so a JS file without a comment takes its map's ID here too.Fixes #2500. Credit to @vibbix, who found the bug and traced it to the
--no-rewritebranch.via @BYK.
--
View Session [Sentry]