Skip to content

fix(sourcemap): inject missing runtime snippets for existing debug IDs - #1630

Merged
betegon merged 1 commit into
mainfrom
bt/fix-sourcemap-runtime-snippet
Sep 23, 2026
Merged

betegon merged 1 commit into
mainfrom
bt/fix-sourcemap-runtime-snippet

Conversation

@betegon

@betegon betegon commented Sep 23, 2026

Copy link
Copy Markdown
Member

Summary

Angular 22.1 emits debug IDs in JavaScript comments and source maps without Sentry's runtime registration snippet. The CLI treated those IDs as proof of completed injection, leaving the bundle unable to register its ID at runtime.

Preserve the existing ID and inject the missing snippet, adjusting source map mappings once. Apply the same decision to external and inline maps, automatic injection during upload, and dry-run reporting. Already registered bundles, including legacy CLI snippets, remain byte-identical; binary bundles with existing IDs and metadata-only build injection retain their existing behavior.

Fixes #1629.

Test plan

  • 157 tests passed across nine related sourcemap, build-injection, and binary-detection test files. The new missing-registration cases fail against the original implementation.
  • Built the Angular reproduction from the issue and ran the CLI: the original implementation reported zero modified files and no runtime snippet; the fix adds one snippet with the same UUID and shifts mappings once. A second run leaves both files byte-identical.
  • Lint, typecheck, docs fragment checks, and git diff --check passed. Generated docs and SDK prerequisites produced no tracked generated changes.
  • Not run: live upload, browser event ingestion, native binary build, or the full unit suite.

@vercel

vercel Bot commented Sep 23, 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 Sep 23, 2026 6:30pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Sep 23, 2026 6:30pm UTC

Request Review

@betegon
betegon marked this pull request as ready for review September 23, 2026 18:59
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Sep 23, 2026
@betegon
betegon merged commit 29e2b05 into main Sep 23, 2026
35 checks passed
@betegon
betegon deleted the bt/fix-sourcemap-runtime-snippet branch September 23, 2026 19:10

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – cli — 54118812 Deployed Sep 23, 2026 by vercel[bot]
Preview – sentry-local — 54118812 Deployed Sep 23, 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 inject skips Angular 22.1 output, no runtime snippet

1 participant