Skip to content

fix(cli): Send a runtime-registered debug ID with upload --no-rewrite - #2601

Merged
BYK merged 1 commit into
mainfrom
fix/no-rewrite-registered-debug-id
Nov 30, 2026
Merged

BYK merged 1 commit into
mainfrom
fix/no-rewrite-registered-debug-id

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

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-plugin on Vite 8 does this). sourcemap upload --no-rewrite read the ID only from the comment or the map, so it sent none for such a file. Without --release the server rejects a bundle with no debug IDs (uploading a bundle without debug ids or release is prohibited in getsentry/sentry src/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 to readRegisteredDebugId when the file has no comment or map ID, the same precedence inject uses 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.
  • The sourcemap docs fragment now says how inject and --no-rewrite handle runtime-registered IDs.

Follow-up to #2270 by @esetnik.

via @BYK.

--

View Session [Sentry]

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
@vercel

vercel Bot commented Nov 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cli Ready Ready Preview Nov 30, 2026 12:19pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 30, 2026 12:19pm UTC

Request Review

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 30, 2026
@BYK
BYK added this pull request to the merge queue Nov 30, 2026
Merged via the queue into main with commit 6b8ba31 Nov 30, 2026
28 checks passed
@BYK
BYK deleted the fix/no-rewrite-registered-debug-id branch November 30, 2026 13:01

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – cli — 0d76ca7b Deployed Nov 30, 2026 by vercel[bot]
Preview – sentry-local — 0d76ca7b Deployed Nov 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sourcemap upload --no-rewrite should send the debug ID the bundle registers at runtime

1 participant