Title: nextjs: fetch() rejects after prerender completes on cacheComponents route with no dynamic data access (HANGING_PROMISE_REJECTION) · Issue #23592 · getsentry/sentry-javascript · GitHub
Open Graph Title: nextjs: fetch() rejects after prerender completes on cacheComponents route with no dynamic data access (HANGING_PROMISE_REJECTION) · Issue #23592 · getsentry/sentry-javascript
X Title: nextjs: fetch() rejects after prerender completes on cacheComponents route with no dynamic data access (HANGING_PROMISE_REJECTION) · Issue #23592 · getsentry/sentry-javascript
Description: SDK @sentry/nextjs 10.70.0 (upgraded from 10.23.0) Framework Next.js 16, cacheComponents: true Observed in production Route /rdva (no dynamic segment accessed when hit without query params) started throwing this error repeatedly in Sentr...
Open Graph Description: SDK @sentry/nextjs 10.70.0 (upgraded from 10.23.0) Framework Next.js 16, cacheComponents: true Observed in production Route /rdva (no dynamic segment accessed when hit without query params) started...
X Description: SDK @sentry/nextjs 10.70.0 (upgraded from 10.23.0) Framework Next.js 16, cacheComponents: true Observed in production Route /rdva (no dynamic segment accessed when hit without query params) started...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/23592
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"nextjs: fetch() rejects after prerender completes on cacheComponents route with no dynamic data access (HANGING_PROMISE_REJECTION)","articleBody":"### SDK\n@sentry/nextjs 10.70.0 (upgraded from 10.23.0)\n\n### Framework\nNext.js 16, `cacheComponents: true`\n\n### Observed in production\n\nRoute `/rdva` (no dynamic segment accessed when hit without query params) started throwing this error repeatedly in Sentry, first seen ~10h after upgrading @sentry/nextjs 10.23.0 → 10.70.0, still escalating 3 days later (10k+ occurrences, `handled: yes`, no reported user impact — traffic is a crawler bot hitting the bare route with no query params):\n\nError: During prerendering, fetch() rejects when the prerender is complete. Typically these errors are handled by React but if you move fetch() to a different context by using `setTimeout`, `after`, or similar functions you may observe this error and you should handle it in that context. This occurred at route \"/rdva\".\n\ndigest: HANGING_PROMISE_REJECTION\n\nStack trace goes through a Sentry trace wrapper in the SSR chunk before reaching Next's internal fetch/tracing frames, which is why I suspect Sentry's own instrumentation rather than application code — but I have not isolated a minimal repro yet.\n\n### What I've checked so far\n\n- The route's only conditional `fetch()` (app code) is guarded by a query param that isn't present when this error fires, so it shouldn't run at all on these requests.\n- Changelog between 10.23.0 and 10.70.0 includes several changes that touch this exact area: #21141 (nextjs: don't inject trace meta tags when Cache Components is enabled, 10.63.0), and in 10.64.0 a rework of the default OpenTelemetry tracer provider bundled with moving node fetch instrumentation into node-core (#21873, #21872).\n- Related but apparently distinct from #21333 / #21510 (captureException/captureMessage breaking cacheComponents prerendering via Date.now()/Math.random() — both already fixed). This one is about fetch() specifically and I couldn't find an existing issue matching this exact digest.\n\n### Reproduction\n\nNot yet isolated to a minimal repro — will update if I manage to reduce it. Posting in case others hit the same digest, since the closest match I found (#21333) turned out to be a different root cause.","author":{"url":"https://github.com/kevbarns","@type":"Person","name":"kevbarns"},"datePublished":"2026-08-25T14:54:14Z","url":"https://github.com/getsentry/sentry-javascript/issues/23592"}
| 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:8abf1648-c2dd-e5c3-6804-a0b23af3edea |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C75A:39680A:208ABE4:2A8A362:6B0412AD |
| html-safe-nonce | d987ac6c908916fefa495c644bfd433eaf79d123f9a8a6337fa7fa89dd9f5c0b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzVBOjM5NjgwQToyMDhBQkU0OjJBOEEzNjI6NkIwNDEyQUQiLCJ2aXNpdG9yX2lkIjoiNzAxMDM3NzEzNDIyNTIzMjU1OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 91b0466dc2d6a109050b5bc23bc8f23788002a8f9bd83983aea614c975964659 |
| hovercard-subject-tag | issue:5247292087 |
| 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/23592/issue_layout |
| twitter:image | https://opengraph.githubassets.com/de91a21da1646869f96a02ea928fbb366862d822ab58777d7d1420896fc91bb4/getsentry/sentry-javascript/issues/23592 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/de91a21da1646869f96a02ea928fbb366862d822ab58777d7d1420896fc91bb4/getsentry/sentry-javascript/issues/23592 |
| og:image:alt | SDK @sentry/nextjs 10.70.0 (upgraded from 10.23.0) Framework Next.js 16, cacheComponents: true Observed in production Route /rdva (no dynamic segment accessed when hit without query params) started... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kevbarns |
| 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