Title: on-demand revalidation fails with "Page changed from static to dynamic at runtime" when Sentry is used with Next 13 and /app directory · Issue #7562 · getsentry/sentry-javascript · GitHub
Open Graph Title: on-demand revalidation fails with "Page changed from static to dynamic at runtime" when Sentry is used with Next 13 and /app directory · Issue #7562 · getsentry/sentry-javascript
X Title: on-demand revalidation fails with "Page changed from static to dynamic at runtime" when Sentry is used with Next 13 and /app directory · Issue #7562 · 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/7562
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"on-demand revalidation fails with \"Page changed from static to dynamic at runtime\" when Sentry is used with Next 13 and /app directory","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? If you use the CDN bundles, please specify the exact bundle (e.g. `bundle.tracing.min.js`) in your SDK setup.\n\n@sentry/nextjs\n\n### SDK Version\n\n7.44.2\n\n### Framework Version\n\nNext 13.2.4 & Next Canary\n\n### Link to Sentry event\n\n_No response_\n\n### SDK Setup\n\nthe default ones generated via `npx @sentry/wizard -i nextjs`\r\n\r\n```\r\n// This file configures the initialization of Sentry on the browser.\r\n// The config you add here will be used whenever a page is visited.\r\n// https://docs.sentry.io/platforms/javascript/guides/nextjs/\r\n\r\nimport * as Sentry from '@sentry/nextjs';\r\n\r\nconst SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN;\r\n\r\nSentry.init({\r\n dsn: SENTRY_DSN || '\u003cPROVIDE_DSN>',\r\n // Adjust this value in production, or use tracesSampler for greater control\r\n tracesSampleRate: 1.0,\r\n // ...\r\n // Note: if you want to override the automatic release value, do not set a\r\n // `release` value here - use the environment variable `SENTRY_RELEASE`, so\r\n // that it will also get attached to your source maps\r\n});\r\n```\r\n\n\n### Steps to Reproduce\n\n1. check out https://github.com/patshologram/revalidation-error-with-middleware\r\n2. search for `PROVIDE_` and set the DSN, project and org name\r\n3. start with `yarn build && yarn start`\r\n4. call http://localhost:3000/api/revalidate\r\n\r\nSide-note: if sentry is removed from the `next.config.js`, on-demand revalidation works fine\n\n### Expected Result\n\nOn-demand revalidation can be executed without an error\n\n### Actual Result\n\n```\r\nPage changed from static to dynamic at runtime /, reason: headers\r\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error\r\n at Object.staticGenerationBailout (/Users/martonpa/Sources/revalidation-error-with-middleware/.next/server/chunks/516.js:3704:21)\r\n at headers (/Users/martonpa/Sources/revalidation-error-with-middleware/.next/server/chunks/516.js:3545:39)\r\n at Object.apply (/Users/martonpa/Sources/revalidation-error-with-middleware/.next/server/app/page.js:172:84)\r\n at Object.preloadComponent (/Users/martonpa/Sources/revalidation-error-with-middleware/node_modules/next/dist/server/app-render/preload-component.js:18:22)\r\n at /Users/martonpa/Sources/revalidation-error-with-middleware/node_modules/next/dist/server/app-render/index.js:471:85\r\n at async createComponentTree (/Users/martonpa/Sources/revalidation-error-with-middleware/node_modules/next/dist/server/app-render/index.js:471:29)\r\n at async /Users/martonpa/Sources/revalidation-error-with-middleware/node_modules/next/dist/server/app-render/index.js:551:52\r\n```","author":{"url":"https://github.com/patshologram","@type":"Person","name":"patshologram"},"datePublished":"2023-03-22T07:11:31Z","url":"https://github.com/getsentry/sentry-javascript/issues/7562"}
| 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:917f46a7-85b9-b609-147b-463bbd4f60fb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B538:31E3E4:80F05:AA3FE:6B04AF35 |
| html-safe-nonce | ac2effd0ae3aa99ca5b6cfd2415fac77e37606da83e6bcab2cf1d500463f0bf2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTM4OjMxRTNFNDo4MEYwNTpBQTNGRTo2QjA0QUYzNSIsInZpc2l0b3JfaWQiOiI2OTUxNzg3NDQ1MjMxMDcxMDI5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 62b2b53742b71e21db66932445d9285eb179349e0f43af082c42749b2b60fa2e |
| hovercard-subject-tag | issue:1635191602 |
| 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/7562/issue_layout |
| twitter:image | https://opengraph.githubassets.com/29f0c69bbbc342cae5dbed048be7a0d164b170e7615ca00f38d822b25d4fe7b2/getsentry/sentry-javascript/issues/7562 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/29f0c69bbbc342cae5dbed048be7a0d164b170e7615ca00f38d822b25d4fe7b2/getsentry/sentry-javascript/issues/7562 |
| 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 | patshologram |
| hostname | github.com |
| expected-hostname | github.com |
| None | f1d110ea058a0915c1d8aa3fc2069fa15801e128f591e5762525abe77490ecb1 |
| 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 | ffa22a65e4c46d376940fe34b05e6a7e9c7fdb9b |
| 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