Skip to content

sentry sourcemap upload --no-rewrite drops debug IDs already in the files #2500

Done

Description

@vibbix

Environment

  • sentry 0.45.0 and 0.51.0 (tested before/after)
  • Next.js 16.4.6 (Turbopack), @sentry/nextjs 11.5.0
  • Ubuntu 26 GHA runner

Issue

With --no-rewrite, sentry sourcemap upload sends every file with an empty debug ID, even when the JS file already ends in //# debugId=… and its map carries debug_id. Without --release, the server then rejects the bundle:

Error: Artifact bundle assembly failed
  Endpoint: organizations/<org>/artifactbundle/assemble/
  uploading a bundle without debug ids or release is prohibited

Steps to Reproduce

  1. Build a Next.js 16 app with Turbopack, which writes //# debugId= into its output natively.
  2. Run sentry sourcemap upload --no-rewrite .next without --release.

Expected Result

--no-rewrite skips injection but still reads the existing debug IDs, so the files upload with debug-id headers and the bundle assembles.

Actual Result

The --no-rewrite branch builds its results with debugId: "" and never reads the files:

const results: InjectResult[] = flags["no-rewrite"]
? pairs.map((p) => ({
jsPath: p.jsPath,
map: p.map,
mapPath: p.map.kind === "external" ? p.map.mapPath : undefined,
injected: false,
debugId: "",
}))

AI Disclosure

Discovered the issue myself, but had Claude helped triage it.

Activity

  1. linear-code commented on Nov 25, 2026

    @linear-code
  2. added a commit that references this issue on Nov 27, 2026
    eb20ed2
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