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 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):
Error: 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".
digest: HANGING_PROMISE_REJECTION
Stack 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.
What I've checked so far
Reproduction
Not 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.
SDK
@sentry/nextjs 10.70.0 (upgraded from 10.23.0)
Framework
Next.js 16,
cacheComponents: trueObserved in production
Route
/rdva(no dynamic segment accessed when hit without query params) startedthrowing 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 bareroute with no query params):
Error: 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 thiserror and you should handle it in that context. This occurred at route "/rdva".
digest: HANGING_PROMISE_REJECTION
Stack 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.
What I've checked so far
fetch()(app code) is guarded by a query paramthat isn't present when this error fires, so it shouldn't run at all on these
requests.
exact area: fix(nextjs): Don't inject trace meta tags when Cache Components is enabled #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
(ref(node-core): Move node fetch instrumentation into node-core #21873, ref(node): Fold breadcrumb & trace propagation into node fetch instrumentation #21872).
Sentry.captureException/captureMessagebreak Next.js prerendering with Cache Components enabled #21333 / captureException duringnext buildprerender fails cacheComponents routes (safe-random runner never registered in build workers) #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.
Reproduction
Not 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.