Skip to content

RSC mode lacks version skew detection (non-RSC mode has it since v7.3) #14849

@agcty

Description

@agcty

I know RSC is still unstable_ -- this is just for tracking, not a demand for immediate action.

The non-RSC framework mode detects version mismatches via X-Remix-Reload-Document on /__manifest requests and triggers a full page reload with sessionStorage loop prevention (added in #13061). The RSC code path has none of this.

When a new deployment happens while a user has a stale client loaded, any client-side navigation fetches an RSC stream the old client can't decode. createFromReadableStream fails and the catch block at dom-export.js:632 throws the generic "Unable to decode RSC response" -- no recovery, no reload, just a broken page.

The RSC fetchAndApplyManifestPatches (dom-export.js:880-908) doesn't send a version param or check for X-Remix-Reload-Document. The manifest has a hardcoded version: "1".

We're working around this by passing a custom fetch to RSCHydratedRouter and createCallServer that adds a version header, and checking it server-side. It works, but it's the kind of thing that should live in the framework.

For reference, the non-RSC mode already handles this well -- it would be great to see the same treatment for RSC navigations, manifest patches, and server actions.

Metadata

Metadata

Assignees

No one assigned

    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