Repository navigation
fix(cli): Send a runtime-registered debug ID with upload --no-rewrite - #2601
Merged
Merged
Conversation
A bundler plugin can leave only its runtime snippet in the output, with no `//# debugId=` comment and no map ID. `sourcemap upload --no-rewrite` read the ID only from the comment or the map, so it sent none for such a file. Without `--release`, a bundle with no debug IDs is rejected, and otherwise the file can't be found by the ID its events carry. Fall back to the ID the file registers at runtime, as `inject` does since #2270. Binary bundles are not read, and a file that registers several different IDs still sends none. Fixes #2595
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
BYK
approved these changes
Nov 30, 2026
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.
Summary
Fixes #2595.
A bundler plugin can leave only its runtime snippet in the output, with no
//# debugId=comment and no map ID (@sentry/vite-pluginon Vite 8 does this).sourcemap upload --no-rewriteread the ID only from the comment or the map, so it sent none for such a file. Without--releasethe server rejects a bundle with no debug IDs (uploading a bundle without debug ids or release is prohibitedin getsentry/sentrysrc/sentry/tasks/assemble.py). With other IDs in the bundle, the file is kept without one and can't be found by the ID its events carry.Key Changes
readExistingDebugIds(--no-rewrite) falls back toreadRegisteredDebugIdwhen the file has no comment or map ID, the same precedenceinjectuses since fix(cli): Reuse a debug ID that a bundle only registers at runtime #2270. Binary bundles are not read, and a file registering several different IDs still sends none.injectand--no-rewritehandle runtime-registered IDs.Follow-up to #2270 by @esetnik.
via @BYK.
--
View Session [Sentry]