facebook/react · error · Error
574
574
Error message
Invalid forward reference.
What it means
In a reply, every reference must point at data already present - the server does not lazily stream chunks for replies. When getOutlinedModel resolves a reference to a chunk that is still PENDING (its defining field never arrived), React throws 'Invalid forward reference.'
Source
Thrown at packages/react-server/src/ReactFlightReplyServer.js:1150
bumpArrayCount(referenceArrayRoot, localLength, response);
}
}
// There's no Element nor Debug Info in the ReplyServer so we don't have to check those here.
return chunkValue;
case BLOCKED:
return waitForReference(
response,
chunk,
parentObject,
key,
referenceArrayRoot,
map,
path,
);
case PENDING:
// If we don't have the referenced chunk yet, then this must be a forward reference,
// which is not allowed.
throw new Error('Invalid forward reference.');
default:
// This is an error. Instead of erroring directly, we're going to encode this on
// an initialization handler.
if (initializingHandler) {
initializingHandler.errored = true;
initializingHandler.value = null;
initializingHandler.reason = chunk.reason;
} else {
initializingHandler = {
chunk: null,
value: null,
reason: chunk.reason,
deps: 0,
errored: true,
};
}
// Placeholder
return null as any;View on GitHub (pinned to eafeac097b)
Solutions
- Raise or verify the framework's action body-size limit so large submissions are not truncated.
- Ensure no middleware or proxy drops or reorders FormData fields.
- Catch the decode error and respond 400; do not retry the same payload.
- Align React versions on both sides of the boundary.
Defensive patterns
Strategy: try-catch
Try / catch
try {
const args = await decodeReply(formData);
} catch (e) {
return new Response('Payload incomplete', {status: 400});
} Prevention
- Size the action body limit above your largest legitimate submission so payloads are not truncated.
- Verify proxies and middleware forward all multipart parts untouched.
- Do not retry a failed submission with the same body; rebuild it from current state.
- Log truncated-payload errors distinctly to catch infrastructure issues early.
When it happens
Trigger: The FormData references id N (e.g. a field value like 'N:props') but the field that defines chunk N is missing, truncated, or was dropped - broken multipart bodies, framework body-size limits cutting off large submissions, or crafted payloads.
Common situations: Server action body size limits (for example serverActions.bodySizeLimit) truncating large payloads mid-stream; proxies stripping multipart parts; hand-built submissions from scrapers.
Related errors
AI-assisted analysis of facebook/react@eafeac097b (2026-08-21).
Data as JSON: /api/errors/3c3510b63522cdca.
Report an issue: GitHub.