Skip to content

fix(react-router): Disable debug ID injection in Vite plugin to prevent double injection#19890

Open
isaacs wants to merge 1 commit intodevelopfrom
fix/react-router-debug-id-double-injection
Open

fix(react-router): Disable debug ID injection in Vite plugin to prevent double injection#19890
isaacs wants to merge 1 commit intodevelopfrom
fix/react-router-debug-id-double-injection

Conversation

@isaacs
Copy link
Member

@isaacs isaacs commented Mar 19, 2026

The makeCustomSentryVitePlugins function was passing sourcemaps: { disable: 'disable-upload' } to the Sentry Vite plugin. However, the underlying Rollup plugin checks disable !== true, so the string value 'disable-upload' did not actually disable debug ID injection.

This caused double injection: once by the Vite plugin (during build), and again by sentryOnBuildEnd via sentry-cli sourcemaps inject. Each injection assigned a different UUID to the same file, breaking source map resolution.

Fix: change disable from 'disable-upload' to true so the Rollup plugin correctly skips debug ID injection, leaving the full injection pass to sentryOnBuildEnd.

Closes #19874

…nt double injection

Set sourcemaps.disable to true (boolean) instead of 'disable-upload' (string)
in makeCustomSentryVitePlugins. The Rollup plugin checks disable !== true, so
the string value was not disabling debug ID injection. This caused double
injection with two different UUIDs per file when sentryOnBuildEnd also ran
sentry-cli sourcemaps inject, breaking source map resolution.

Fixes GH-19874
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Contributor

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (deps) Bump stacktrace-parser from 0.1.10 to 0.1.11 by dependabot in #19887

Bug Fixes 🐛

  • (deps) Bump socket.io-parser to 4.2.6 to fix CVE-2026-33151 by chargome in #19880
  • (nestjs) Add node to nest metadata by chargome in #19875
  • (react-router) Disable debug ID injection in Vite plugin to prevent double injection by isaacs in #19890
  • (serverless) Add node to metadata by nicohrubec in #19878

Internal Changes 🔧

  • (astro) Re-enable server island tracing e2e test in Astro 6 by Lms24 in #19872

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 25.52 kB -0.44% -112 B 🔽
@sentry/browser - with treeshaking flags 24.04 kB -0.43% -102 B 🔽
@sentry/browser (incl. Tracing) 42.5 kB -0.27% -115 B 🔽
@sentry/browser (incl. Tracing, Profiling) 47.17 kB -0.23% -105 B 🔽
@sentry/browser (incl. Tracing, Replay) 81.31 kB -0.14% -109 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 70.88 kB -0.17% -116 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas) 86.01 kB -0.13% -110 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 98.27 kB -0.11% -104 B 🔽
@sentry/browser (incl. Feedback) 42.35 kB -0.24% -99 B 🔽
@sentry/browser (incl. sendFeedback) 30.2 kB -0.37% -110 B 🔽
@sentry/browser (incl. FeedbackAsync) 35.25 kB -0.32% -110 B 🔽
@sentry/browser (incl. Metrics) 26.81 kB -0.43% -115 B 🔽
@sentry/browser (incl. Logs) 26.95 kB -0.43% -116 B 🔽
@sentry/browser (incl. Metrics & Logs) 27.64 kB -0.38% -103 B 🔽
@sentry/react 27.3 kB -0.34% -93 B 🔽
@sentry/react (incl. Tracing) 44.86 kB -0.21% -91 B 🔽
@sentry/vue 29.99 kB -0.32% -94 B 🔽
@sentry/vue (incl. Tracing) 44.38 kB -0.25% -107 B 🔽
@sentry/svelte 25.55 kB -0.45% -115 B 🔽
CDN Bundle 28.2 kB -0.27% -74 B 🔽
CDN Bundle (incl. Tracing) 43.39 kB -0.27% -117 B 🔽
CDN Bundle (incl. Logs, Metrics) 29.07 kB -0.26% -75 B 🔽
CDN Bundle (incl. Tracing, Logs, Metrics) 44.26 kB -0.23% -99 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics) 68.12 kB -0.14% -90 B 🔽
CDN Bundle (incl. Tracing, Replay) 80.23 kB -0.13% -101 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 81.14 kB -0.12% -91 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 85.78 kB -0.11% -91 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 86.67 kB -0.12% -101 B 🔽
CDN Bundle - uncompressed 82.32 kB -0.37% -304 B 🔽
CDN Bundle (incl. Tracing) - uncompressed 128.25 kB -0.25% -315 B 🔽
CDN Bundle (incl. Logs, Metrics) - uncompressed 85.19 kB -0.36% -304 B 🔽
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 131.11 kB -0.24% -315 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 208.82 kB -0.15% -304 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed 245.1 kB -0.13% -315 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 247.95 kB -0.13% -315 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 258.01 kB -0.13% -315 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 260.85 kB -0.13% -315 B 🔽
@sentry/nextjs (client) 47.28 kB -0.19% -86 B 🔽
@sentry/sveltekit (client) 42.95 kB -0.28% -119 B 🔽
@sentry/node-core 56.28 kB -0.12% -62 B 🔽
@sentry/node 173.21 kB +0.04% +52 B 🔺
@sentry/node - without tracing 96.27 kB -0.08% -76 B 🔽
@sentry/aws-serverless 113.28 kB -0.06% -61 B 🔽

View base workflow run

@Lms24 Lms24 requested a review from chargome March 20, 2026 11:15
@chargome chargome self-assigned this Mar 20, 2026
@chargome chargome removed their assignment Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sentryReactRouter double-injects debug IDs, breaking source map resolution (same as #15106)

2 participants