Title: Vite 8 source maps are uploaded one line off until the `sentry` CLI range allows 0.50.0 · Issue #26658 · getsentry/sentry-javascript · GitHub
Open Graph Title: Vite 8 source maps are uploaded one line off until the `sentry` CLI range allows 0.50.0 · Issue #26658 · getsentry/sentry-javascript
X Title: Vite 8 source maps are uploaded one line off until the `sentry` CLI range allows 0.50.0 · Issue #26658 · getsentry/sentry-javascript
Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using the latest SDK release https://github.com/...
Open Graph Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
X Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/26658
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Vite 8 source maps are uploaded one line off until the `sentry` CLI range allows 0.50.0","articleBody":"### Is there an existing issue for this?\n\n- [x] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\n- [x] I have reviewed the documentation https://docs.sentry.io/\n- [x] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\n\n### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Which SDK are you using?\n\n@sentry/vite-plugin\n\n### SDK Version\n\n`@sentry/bundler-plugins` 11.15.0 (`@sentry/bundler-plugins/vite`)\n\n### Framework Version\n\nVite 8.3.8\n\n### Link to Sentry event\n\n_No response_\n\n### Reproduction Example/SDK Setup\n\n```js\n// vite.config.mjs\nimport { sentryVitePlugin } from '@sentry/bundler-plugins/vite';\n\nexport default {\n build: { sourcemap: true },\n plugins: [sentryVitePlugin({ org: 'my-org', project: 'my-project', authToken: process.env.SENTRY_AUTH_TOKEN })],\n};\n```\n\n```js\n// main.js\ndocument.body.textContent = `hello`;\nthrow new Error(`boom`);\n```\n\n### Steps to Reproduce\n\n1. Run `vite build`. Vite 8's default minifier (Oxc) turns the plugin's debug ID snippet into a template literal: ``e._sentryDebugIds[t]=`3519d400-…` ``.\n2. The plugin uploads through `sentry` 0.49.0, the newest version its `\"sentry\": \"^0.49.0\"` range allows.\n3. Load the page and open the `boom` event.\n\nTo see the difference without uploading anything, take the built chunk, append `\\n//# debugId=\u003cthe chunk's debug ID>` the way the plugin prepares its upload copy, and run:\n\n```sh\nnpx sentry@0.49.0 sourcemap inject --dry-run --json dist/assets # \"modified\": 1, \"skipped\": 0\nnpx sentry@0.50.0 sourcemap inject --dry-run --json dist/assets # \"modified\": 0, \"skipped\": 1\n```\n\n### Expected Result\n\nThe CLI recognizes the plugin's snippet, leaves the upload copy unchanged, and in-app frames resolve to `main.js`.\n\n### Actual Result\n\n`sentry` 0.49.0 doesn't recognize the template-literal snippet. It prepends a second snippet line to the upload copy and a leading `;` to the map's `mappings` (`\"AACA,M…\"` becomes `\";AACA,…\"`). The deployed file never gets that line, so the uploaded map is one line off from it, and in-app frames fail with `js_invalid_sourcemap_location`.\n\nWith `sentry` 0.50.0, the same upload copy comes out byte-for-byte unchanged.\n\n### Additional Context\n\nThe CLI side is getsentry/toolkit#2248. It was fixed in getsentry/toolkit#2268 and released in `sentry` 0.50.0 on 2026-11-18. But `@sentry/bundler-plugins`, `@sentry/remix` and `@sentry/react-router` 11.15.0 all depend on `sentry@^0.49.0`, and a caret range on a 0.x version stops below 0.50.0, so installs stay on 0.49.0. Raising the range to `^0.50.0`, as #26200 did for 0.49.0, would deliver the fix. #26330 was the same situation for Turbopack.\n\nI'm happy to open the PR.\n\n### Priority\n\n\u003csub>React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it.\u003c/sub>\n","author":{"url":"https://github.com/abrahamguo","@type":"Person","name":"abrahamguo"},"datePublished":"2026-11-19T16:24:18Z","url":"https://github.com/getsentry/sentry-javascript/issues/26658"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:31faccf7-a9ab-b7f8-5ffc-cc5c0f6fad18 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BCE4:15EC7E:A9EFD:E74A5:6B044498 |
| html-safe-nonce | 6992ce4ec1145e37c9a0e8a91d7dee2725645fc1d608eb09deb596ff48cb4a66 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQ0U0OjE1RUM3RTpBOUVGRDpFNzRBNTo2QjA0NDQ5OCIsInZpc2l0b3JfaWQiOiIyMzI5ODY2Mjc5MjE5MTE5MjU2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9ca4685c1aa448782a95ec9e81538a3c745202e9b6a682339352fc4d8c000054 |
| hovercard-subject-tag | issue:6494121408 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/26658/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e5aef3022df5c0845a56e34760c1c5360f482cfe7fa2df7e3498cb5883a6966c/getsentry/sentry-javascript/issues/26658 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e5aef3022df5c0845a56e34760c1c5360f482cfe7fa2df7e3498cb5883a6966c/getsentry/sentry-javascript/issues/26658 |
| og:image:alt | Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | abrahamguo |
| hostname | github.com |
| expected-hostname | github.com |
| None | d4495c3631faba668036f176d1f5946901c5172efd73a6edb984029e7d4f8e46 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9ac4337fb7c6a5846cdfdb1a04f154d3c33ebc77 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width