Skip to content

sourcemap inject skips Angular 22.1 output, no runtime snippet #1629

Description

@Sekky61

Environment

  • sentry 0.45.0 (legacy @sentry/cli 3.3.3 behaves the same)
  • @angular/cli / @angular/build 22.1, Node 24

Steps to Reproduce

Repro (unmodified ng new --minimal plus two scripts): https://github.com/Sekky61/sentry-cli-angular-debugid-repro

npm ci
npm run repro     # ng build --source-map → sentry sourcemap inject → count snippets
npm run control   # same, but Angular's debug ID is removed before injecting

Expected Result

main-*.js keeps its debug ID and gets the _sentryDebugIds snippet.

Actual Result

script sentry sourcemap inject _sentryDebugIds snippets in main-*.js
repro Files modified 0, skipped 1 0
control Files modified 1, skipped 0 1

Since 22.1 (angular/angular-cli#33110), ng build writes an ECMA-426 debug ID (a //# debugId= comment and a debugId in the map) but no runtime snippet. The CLI takes the comment as "already injected" and skips the file, so the runtime snippet is missing and events carry no debug_meta.

Context

  • getsentry/sentry-cli#2419 is the same problem. It was closed as not_planned with a request to reopen it here if it is still relevant.
  • #1496 lists the map-only variant as a known gap. This is the JS-comment variant, which perhaps was overlooked there.
  • Possible fix, as suggested in #2419: detect injection by the snippet instead of the comment, and add the snippet under the existing ID when it is missing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions