Title: Next.js CDN (App-router) withSentryConfig in Dev mode broke client side routing · Issue #8727 · getsentry/sentry-javascript · GitHub
Open Graph Title: Next.js CDN (App-router) withSentryConfig in Dev mode broke client side routing · Issue #8727 · getsentry/sentry-javascript
X Title: Next.js CDN (App-router) withSentryConfig in Dev mode broke client side routing · Issue #8727 · 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/8727
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Next.js CDN (App-router) withSentryConfig in Dev mode broke client side routing","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/nextjs\n\n### SDK Version\n\n7.61.0\n\n### Framework Version\n\nNext 13.4.10\n\n### Link to Sentry event\n\n_No response_\n\n### SDK Setup\n\n_No response_\n\n### Steps to Reproduce\n\n1. set up HOST (my setting is 127.0.0.1 cdn.localhost)\r\n\r\n2. config next.config.js \r\n```\r\nasync headers() {\r\n return [\r\n {\r\n source: '/_next/:path*',\r\n headers: [\r\n {\r\n key: 'Access-Control-Allow-Origin',\r\n value: '*',\r\n },\r\n ],\r\n },\r\n ]\r\n },\r\nassetPrefix: 'http://cdn.localhost:3000',\r\ncrossOrigin: 'anonymous',\r\n```\r\n\r\n`module.exports = withSentryConfig(nextConfig)`\r\n\r\n3. run dev mode `pnpm dev`\r\n4. client-side route to some page\n\n### Expected Result\n\nno CORS error happen and the route correctly without a full reload\n\n### Actual Result\n\n1. I am in route /a \r\n2. I click Link tag to go to /b\r\n3. It got an error CORS and the current page has a full reload and i am still in /a\r\n4. click Link tag to go to /b\r\n5. error disappears and go to /b correctly\r\n\r\n\u003cimg width=\"441\" alt=\"Screenshot 2566-08-03 at 16 58 43\" src=\"https://github.com/getsentry/sentry-javascript/assets/60164384/6e9b693b-b131-4a6d-95a7-978126455581\">\r\n\r\nthis happens only when I set assetPrefix + withSentryConfig and run in dev mode\r\n","author":{"url":"https://github.com/thasuohm","@type":"Person","name":"thasuohm"},"datePublished":"2023-08-03T10:26:39Z","url":"https://github.com/getsentry/sentry-javascript/issues/8727"}
| 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:76519f02-32f0-dfec-3aa8-afdb39345f81 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D100:285B2D:40F1B19:56F2DCF:6B0408B6 |
| html-safe-nonce | 293f9c6ad241e038821eb59b767421aa8965454a41926447a686a186478b6076 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTAwOjI4NUIyRDo0MEYxQjE5OjU2RjJEQ0Y6NkIwNDA4QjYiLCJ2aXNpdG9yX2lkIjoiNzkyMjI2NTQ2NTAyMjU4MDkxOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d14d06b72f0d80d6267b6ba8540069a82d072fa7c804b2099dd20f8f7b0df454 |
| hovercard-subject-tag | issue:1834779792 |
| 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/8727/issue_layout |
| twitter:image | https://opengraph.githubassets.com/63951146240b3df79d965a845bb7635430e7d316dfc99f1e2efdce22bd3594a6/getsentry/sentry-javascript/issues/8727 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/63951146240b3df79d965a845bb7635430e7d316dfc99f1e2efdce22bd3594a6/getsentry/sentry-javascript/issues/8727 |
| 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 | thasuohm |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| 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