Title: [RR7] url in unstable_sentryVitePluginOptions is ignored in React Router Vite plugin · Issue #15965 · getsentry/sentry-javascript · GitHub
Open Graph Title: [RR7] url in unstable_sentryVitePluginOptions is ignored in React Router Vite plugin · Issue #15965 · getsentry/sentry-javascript
X Title: [RR7] url in unstable_sentryVitePluginOptions is ignored in React Router Vite plugin · Issue #15965 · 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/15965
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[RR7] url in unstable_sentryVitePluginOptions is ignored in React Router Vite plugin","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/react-router\n\n### SDK Version\n\n9.10.1\n\n### Framework Version\n\nreact-router@7.4.0 + vite@6.2.4 + @sentry/react-router@9.10.1\" \n\n### Link to Sentry event\n\n_No response_\n\n### Reproduction Example/SDK Setup\n\nWe have a self hosted Sentry setup and last week we migrated from @sentry/remix to @sentry/react-router. Before we could set the `url` in the Vite Sentry plugin options to point to our self hosted Sentry instance. With the new React Router plugin this value seems to be ignored.\n\nThe only way to upload the source maps to our Sentry instance is by setting the env var SENTRY_URL. \n\nSetting the url in the plugin configuration does not seem to do anything, Sentry uses the default value:\n\n```javascript\nconst sentryConfig: SentryReactRouterBuildOptions = {\n org: 'sentry',\n project: env.VITE_SENTRY_PROJECT,\n authToken: env.VITE_SENTRY_AUTH_TOKEN,\n telemetry: false,\n sourceMapsUploadOptions: {\n release: { name: env.VITE_RELEASE_SHA },\n },\n release: {\n name: env.VITE_RELEASE_SHA,\n },\n unstable_sentryVitePluginOptions: {\n // This value is somehow ignored by Sentry, instead it's using the SENTRY_URL env var if set, \n // or uses sentry.io otherwise.\n url: env.VITE_SENTRY_URL,\n applicationKey: 'store',\n disable: disableSentry(),\n release: {\n uploadLegacySourcemaps: { paths: ['build'], ext: ['js', 'map', 'mjs'] },\n name: env.VITE_RELEASE_SHA,\n dist: env.VITE_RELEASE_SHA,\n },\n },\n};\n```\n\n### Steps to Reproduce\n\nSet a value for `unstable_sentryVitePluginOptions.url`\n\n\n\n\n### Expected Result\n\nSourcemaps are uploaded to the sentry instance defined in `unstable_sentryVitePluginOptions.url`.\n\n\n### Actual Result\n\nUploading sourcempas fails with an authentication error. (This is because the plugin tries to upload theme to Sentry instead of our self hosted instance).\n\nObviously it's unstable for a reason, and we can work around it by setting the `SENTRY_URL` env var. but I'd figured I mention it for anyone else running into this. ","author":{"url":"https://github.com/simply-arjen","@type":"Person","name":"simply-arjen"},"datePublished":"2025-04-03T08:27:10Z","url":"https://github.com/getsentry/sentry-javascript/issues/15965"}
| 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:09de769f-5ae5-c54e-d4eb-22b76dfcb21f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DB44:C132D:80D66:B3058:6B073D29 |
| html-safe-nonce | 67dfe525d1cd0b0fe658824ce547f7b4937818a231c1c60ce464e956383deeb7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjQ0OkMxMzJEOjgwRDY2OkIzMDU4OjZCMDczRDI5IiwidmlzaXRvcl9pZCI6IjY5ODA3MTAwMjk4ODA0MDkzODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 75afd6ae2c25e3c1f31f3d94bc23f2b519d60b76d9151bfaceb9045402819b12 |
| hovercard-subject-tag | issue:2968737324 |
| 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/15965/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7eb20ef12c33de0fb38c580c6db03b5639931dd359ec5dd89ddc4a46bbbec796/getsentry/sentry-javascript/issues/15965 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7eb20ef12c33de0fb38c580c6db03b5639931dd359ec5dd89ddc4a46bbbec796/getsentry/sentry-javascript/issues/15965 |
| 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 | simply-arjen |
| hostname | github.com |
| expected-hostname | github.com |
| None | d97a1befc96fc1512839eca15eb541061d491301144c9168e2985a8580319a49 |
| 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 | d28643426bfe8d1692f8788961b8217e9003f493 |
| 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