Skip to content

Bug after nextjs 16.3.0: getting infinite fetches for RSC calls after deploy #238

Description

@gergokee

Setup: redis sentinel in kubernetes cluster

Versions where i experienced the bug:
"@fortedigital/nextjs-cache-handler": "3.2.2",
"next": "16.3.0",
"redis": "6.2.0",

Root Cause:
In Next.js 16.3.0, /_tree segment prefetches require the TreePrefetch format (compact route tree structure). When segmentData is missing from the cache entry, the server falls back to returning the full rscData (InitialRSCPayload). The browser in 16.3.0 (no x-nextjs-postponed: 2) calls writeDynamicTreeResponseIntoCache expecting TreePrefetch format — fails to parse the full RSC — rejects the cache entry with a retry — loops forever.

This PR fixes it:
#237

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions