Title: @sentry/sveltekit: source maps are never uploaded with SvelteKit 3 · Issue #25096 · getsentry/sentry-javascript · GitHub
Open Graph Title: @sentry/sveltekit: source maps are never uploaded with SvelteKit 3 · Issue #25096 · getsentry/sentry-javascript
X Title: @sentry/sveltekit: source maps are never uploaded with SvelteKit 3 · Issue #25096 · 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/25096
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"@sentry/sveltekit: source maps are never uploaded with SvelteKit 3","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\nSelf-hosted/on-premise\n\n### Which SDK are you using?\n\n@sentry/sveltekit\n\n### SDK Version\n\n11.4.0 (also seen on 10.76.0)\n\n### Framework Version\n\n@sveltejs/kit 3.0.0, @sveltejs/adapter-node 6.0.0, Vite 8.3.2\n\n### Link to Sentry event\n\n_No response_\n\n### Reproduction Example/SDK Setup\n\n```ts\n// vite.config.ts\nimport { sentrySvelteKit } from '@sentry/sveltekit/vite';\n\nsentrySvelteKit({\n autoUploadSourceMaps: true,\n adapter: 'node',\n debug: true,\n org: '...',\n project: '...',\n sentryUrl: '...',\n sourcemaps: { assets: ['./build/**/*'] },\n}),\nsveltekit({ adapter: nodeAdapter, /* ... */ }),\n```\n\n\n### Steps to Reproduce\n\n1. Set up SvelteKit 3 with adapter-node and `sentrySvelteKit()` as above, with `SENTRY_AUTH_TOKEN` set.\n2. Run `vite build`.\n3. Look in the build output for the upload logs.\n\n### Expected Result\n\nSource maps get uploaded after the adapter runs, like on SvelteKit 2. Our last Kit 2 build logged `Bundled 2433 files for upload` and `Uploaded files to Sentry`.\n\n### Actual Result\n\nNothing gets uploaded and nothing about it is logged, so every client error since we upgraded to Kit 3 has minified frames. With `debug: true` the plugin only logs `Enabled source map generation in the build options with build.sourcemap: 'hidden'. The source maps will be deleted after they were uploaded to Sentry.` After that there's no upload attempt (an invalid token doesn't even produce a 401), and all `.map` files are still in `build/`, so the upload/cleanup step never runs. Chunks get the `sentry-dbid-…` snippet but never the `//# debugId=` comment.\n\n### Additional Context\n\nI think the cause is the SSR check in `sentry-sveltekit-debug-id-upload-plugin` (`packages/sveltekit/src/vite/sourceMaps.ts`):\n\n```ts\nconfigResolved: config => {\n // `config.build.ssr` is `true` for that first build and `false` in the other ones.\n if (!config.build.ssr) {\n isSSRBuild = false;\n }\n},\ncloseBundle: async () => {\n if (!isSSRBuild) {\n return;\n }\n // flatten + upload\n```\n\n\nSvelteKit 3 does a single Vite build with `ssr` and `client` environments, rather than a separate SSR build, so `config.build.ssr` is never true and `closeBundle` always returns early. #21629 fixed the same thing in `autoInstrument` by using `this.environment.name`, but `sourceMaps.ts` still has the old check. The `sveltekit-3` e2e app doesn’t seem to test source maps, which would explain why this wasn’t caught.\n\nOur workaround: set `sourcemaps: { disable: 'disable-upload' }` (on 10.x, `unstable_sentryVitePluginOptions: { sourcemaps: { disable: 'disable-upload' } }`) so the plugin stamps debug IDs into the output files (since #23754), then run `sentry-cli sourcemaps upload build` after the build.\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>","author":{"url":"https://github.com/ndri","@type":"Person","name":"ndri"},"datePublished":"2026-10-06T11:07:09Z","url":"https://github.com/getsentry/sentry-javascript/issues/25096"}
| 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:0d710029-8d21-cc11-ca2f-a18ec2d4a92b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8218:377538:C4AD30:10000C0:6B04DC76 |
| html-safe-nonce | f3b053a6b38086bd00369886afeaeb0becb291a27ac2c3f978fa55dd697f454c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjE4OjM3NzUzODpDNEFEMzA6MTAwMDBDMDo2QjA0REM3NiIsInZpc2l0b3JfaWQiOiI5MDAxOTE0MDI4Njk1ODA1MDQ2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8ad949ae751272208182c2d325145c0f176af204b13bda46eb08bc7b05f01003 |
| hovercard-subject-tag | issue:5727331272 |
| 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/25096/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1b1755a85d3a47c809c5ccc19880c769f4c137d594a4cc707524ace6de140f24/getsentry/sentry-javascript/issues/25096 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1b1755a85d3a47c809c5ccc19880c769f4c137d594a4cc707524ace6de140f24/getsentry/sentry-javascript/issues/25096 |
| 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 | ndri |
| hostname | github.com |
| expected-hostname | github.com |
| None | 194dacb8acfd3e4d3ffb2704e0b1f10327f0dad690a7142acc7b0e0a2d073965 |
| 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 | 6c35540a0a2991ee20bd053ba2601cce33f72cb1 |
| 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