facebook/react · error · Error
599
599
Error message
Expected an initialized chunk but got an initialized stream chunk instead. This payload may have been submitted by an older version of React.
What it means
After a chunk initializes, its reason field should be an array-nesting context or null. If it instead contains an 'error' property it is a FlightStreamController, meaning the chunk was initialized as a stream. Replies written by an older React encode chunks differently, so React throws this explicit version-mismatch error rather than mis-parsing the payload.
Source
Thrown at packages/react-server/src/ReactFlightReplyServer.js:1069
const id = parseInt(path[0], 16);
let chunk = getChunk(response, id);
switch (chunk.status) {
case RESOLVED_MODEL:
initializeModelChunk(chunk);
// $FlowFixMe[incompatible-type] We just initialized this chunk so it can't be a ResolvedModelChunk anymore.
chunk = chunk as Exclude<SomeChunk<T>, ResolvedModelChunk<T>>;
break;
}
// The status might have changed after initialization.
switch (chunk.status) {
case INITIALIZED:
let value = chunk.value;
const arrayRootOrController:
| null
| NestedArrayContext
| FlightStreamController = chunk.reason;
if (arrayRootOrController !== null && 'error' in arrayRootOrController) {
throw new Error(
'Expected an initialized chunk but got an initialized stream chunk instead. ' +
'This payload may have been submitted by an older version of React.',
);
}
let arrayRoot = arrayRootOrController;
let localLength: number = 0;
const rootArrayContexts = response._rootArrayContexts;
for (let i = 1; i < path.length; i++) {
const name = path[i];
if (
typeof value === 'object' &&
// $FlowFixMe[invalid-compare] This check is still needed at runtime.
value !== null &&
(getPrototypeOf(value) === ObjectPrototype ||
getPrototypeOf(value) === ArrayPrototype) &&
hasOwnProperty.call(value, name)
) {View on GitHub (pinned to eafeac097b)
Solutions
- Align the React version on the client that produced the payload with the server that decodes it, and release them together.
- Bust service worker and CDN caches for client bundles on every deploy.
- Catch the error on the action route and respond with a 'please reload' page; the next submission from the fresh bundle succeeds.
Defensive patterns
Strategy: try-catch
Try / catch
try {
const args = await decodeReply(formData);
} catch (e) {
if (String(e).includes('older version of React')) {
// version-skewed client: ask for one reload, then it self-heals
return new Response(reloadPageHtml, {status: 409, headers: {'content-type': 'text/html'}});
}
return new Response('Bad request', {status: 400});
} Prevention
- Release client and server React packages in lockstep with identical versions.
- Version cache keys so a new deploy invalidates cached client bundles and RSC payloads.
- Skip-serving or update service workers on deploy to avoid stale submitters.
- Return a friendly reload prompt when a version-mismatch decode error is caught.
When it happens
Trigger: A form/action payload serialized by an older react-dom client is decoded by a newer react-server: a long-lived tab or service-worker-cached bundle submits after the server was upgraded.
Common situations: Rolling deploys where users keep pages open across releases; service workers or CDN caches serving stale client chunks; mixing canary and stable React packages in one build.
Related errors
AI-assisted analysis of facebook/react@eafeac097b (2026-08-21).
Data as JSON: /api/errors/895ae1d4ff118cc5.
Report an issue: GitHub.