Title: Server cache not refreshing when sendDefaultPii: true since @sentry/nextjs@9.43 (DYNAMIC_SERVER_USAGE error) · Issue #17431 · getsentry/sentry-javascript · GitHub
Open Graph Title: Server cache not refreshing when sendDefaultPii: true since @sentry/nextjs@9.43 (DYNAMIC_SERVER_USAGE error) · Issue #17431 · getsentry/sentry-javascript
X Title: Server cache not refreshing when sendDefaultPii: true since @sentry/nextjs@9.43 (DYNAMIC_SERVER_USAGE error) · Issue #17431 · 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/17431
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Server cache not refreshing when sendDefaultPii: true since @sentry/nextjs@9.43 (DYNAMIC_SERVER_USAGE error)","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\n9.43\n\n### Framework Version\n\nNext 15.4.6\n\n### Link to Sentry event\n\n_No response_\n\n### Reproduction Example/SDK Setup\n\n_No response_\n\n### Steps to Reproduce\n\n- Upgrade @sentry/nextjs from 9.42 (works) to 9.43+ (issue persists in 10.5).\n- Build the app and navigate to a page with revalidate set.\n- Observe that x-nextjs-cache transitions from STALE → HIT.\n- However, Server Component data does not update.\n- Console error:\n-- [Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.] { digest: 'DYNAMIC_SERVER_USAGE' }\n-- cache-control response header has s-maxage=30 (unexpected).\n- Downgrade back to 9.42 → issue disappears.\n- In sentry.server.config.ts, setting sendDefaultPii: false also resolves the issue.\n\n``` ts\n// sentry.server.config.ts\nimport * as Sentry from \"@sentry/nextjs\";\n\nSentry.init({\n dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,\n environment: process.env.NEXT_PUBLIC_ENV,\n\n sendDefaultPii: true,\n sampleRate: 0.1,\n maxBreadcrumbs: 10,\n});\n```\n\n``` ts\n// instrumentation.ts\nimport * as Sentry from \"@sentry/nextjs\";\n\nexport async function register() {\n if (process.env.NEXT_RUNTIME === \"nodejs\") {\n await import(\"../sentry.server.config\");\n\n if (process.env.NEXT_PUBLIC_ENV !== \"development\") {\n await import(\"../logger.config\");\n await import(\"../opentelemetry.config\");\n }\n }\n\n if (process.env.NEXT_RUNTIME === \"edge\") {\n await import(\"../sentry.edge.config\");\n }\n}\n\nexport const onRequestError = Sentry.captureRequestError;\n```\n\n### Expected Result\n\n- Server cache should revalidate correctly.\n- Enabling sendDefaultPii: true should not break caching.\n\n### Actual Result\n\n- With sendDefaultPii: true, cache never refreshes.\n- Server Component rendering fails with a cryptic DYNAMIC_SERVER_USAGE error.","author":{"url":"https://github.com/giovannetti-eric","@type":"Person","name":"giovannetti-eric"},"datePublished":"2025-08-18T22:16:30Z","url":"https://github.com/getsentry/sentry-javascript/issues/17431"}
| 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:6e9cc53a-c23b-253b-12de-cb262465bf0d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BAE4:3134C2:C40D97:111EBAF:6B043945 |
| html-safe-nonce | 80c707456d040a7049e89293b55a60d0f93225f8cb9ef65edc6c49e7a80064d4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQUU0OjMxMzRDMjpDNDBEOTc6MTExRUJBRjo2QjA0Mzk0NSIsInZpc2l0b3JfaWQiOiI2OTI2NTM1Njk1MDk0Mzk4MTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | df3243a57cae203d5ebf22f01d48589dbefe08b927eabadd6baf123747a85f78 |
| hovercard-subject-tag | issue:3332297010 |
| 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/17431/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bacfdb786c080feaf6823acd780a5750965dd1dccf1c1d60d1da0ec9ec0f80be/getsentry/sentry-javascript/issues/17431 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bacfdb786c080feaf6823acd780a5750965dd1dccf1c1d60d1da0ec9ec0f80be/getsentry/sentry-javascript/issues/17431 |
| 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 | giovannetti-eric |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9185ccfefd80c1ff2d9ddcdb0cd2becf46b5a1efbbf30741a895e4bb8de25e64 |
| 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 | 06dc448a76fe4751ac1db26524aefa3aa3e889a8 |
| 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