Skip to content

fix(next/client): fall back to full-page navigation on segment cache fetch failure - #97815

Open
patrickswedish wants to merge 1 commit into
vercel:canaryfrom
patrickswedish:fix/segment-cache-navigation-failure-97807
Open

patrickswedish wants to merge 1 commit into
vercel:canaryfrom
patrickswedish:fix/segment-cache-navigation-failure-97807

Conversation

@patrickswedish

@patrickswedish patrickswedish commented Aug 24, 2026 •

Copy link
Copy Markdown

Fixes #97807

What?

When segment cache payload fetching encounters a network error or rejected server response, fall back to a full-page (MPA) browser navigation instead of silently swallowing the error and freezing user navigation.

Why?

Fixes #97807.
Currently, when a prefetch or dynamic RSC payload fetch stalls or rejects with a network error,
avigateImpl(...).catch(() => state)\ returns the current state with zero fallback. The user's click is permanently dropped, leaving them stuck on the previous view.

Intentional aborts (e.g. \AbortError, \TimeoutError) are preserved so superseded navigations still retain state. For actual network failures, falling back to \completeHardNavigation\ restores expected web semantics.

How?

  • Inspect error in
    avigateImpl.catch().
  • Return current state if aborted; otherwise invoke \completeHardNavigation(state, url, navigateType).
  • Added unit test in \�pp-router-state.test.ts.

@patrickswedish
patrickswedish force-pushed the fix/segment-cache-navigation-failure-97807 branch from eb2af75 to b3203e9 Compare October 22, 2026 05:10
@patrickswedish patrickswedish changed the title fix(next/client): fall back to full-page navigation on segment cache … fix(next/client): fall back to full-page navigation on segment cache fetch failure Oct 22, 2026
…fetch failure

Fixes vercel#97807

# Conflicts:
#	packages/next/src/client/components/app-router-state.ts
@patrickswedish
patrickswedish force-pushed the fix/segment-cache-navigation-failure-97807 branch from b3203e9 to 0e38369 Compare November 2, 2026 22:48

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Segment cache silently drops navigations when the RSC payload fetch stalls or fails (can also commit a stale canonical URL)

1 participant