facebook/react · error · Error
Missing a temporary reference set but the RSC response retur
Error message
Missing a temporary reference set but the RSC response returned a temporary reference. Pass a temporaryReference option with the set that was used with the reply.
What it means
A Flight row prefixed 'T' is a temporary reference - a value that only existed for the duration of one request and was stored in a TemporaryReferenceSet on the server (e.g. values written during renderToReadableStream or a reply). Decoding it requires the same set, passed via the temporaryReferences option; if response._tempRefs is null the client has no table to look the id up in and throws, with the message explaining exactly which option to pass.
Source
Thrown at packages/react-client/src/ReactFlightClient.js:2608
return Symbol.for(value.slice(2));
}
case 'h': {
// Server Reference
const ref = value.slice(2);
return getOutlinedModel(
response,
ref,
parentObject,
key,
loadServerReference,
);
}
case 'T': {
// Temporary Reference
const reference = '$' + value.slice(2);
const temporaryReferences = response._tempRefs;
if (temporaryReferences == null) {
throw new Error(
'Missing a temporary reference set but the RSC response returned a temporary reference. ' +
'Pass a temporaryReference option with the set that was used with the reply.',
);
}
return readTemporaryReference(temporaryReferences, reference);
}
case 'Q': {
// Map
const ref = value.slice(2);
return getOutlinedModel(response, ref, parentObject, key, createMap);
}
case 'W': {
// Set
const ref = value.slice(2);
return getOutlinedModel(response, ref, parentObject, key, createSet);
}
case 'B': {
// BlobView on GitHub (pinned to eafeac097b)
Solutions
- Create one TemporaryReferenceSet per request on the server, and pass that same set as the temporaryReferences option to the client decode API (createFromReadableStream/createFromFetch/decodeReply)
- Keep the set alive for the lifetime of the request/response pair - it must be the identical instance used when encoding, not a fresh one
- If you never intended temporary references, stop passing request-scoped or React Element values into the payload so no 'T' rows are emitted
- Check your framework version's docs: the option name is temporaryReferences and it travels with the response options object
Example fix
// before
const payload = createFromReadableStream(stream); // throws on 'T' rows
// after
const temporaryReferences = await getTempRefsForRequest(requestId); // same set the server used
const payload = createFromReadableStream(stream, {temporaryReferences}); Defensive patterns
Strategy: validation
Validate before calling
// Fail fast at decode setup if temp refs are in play but the set is missing
const options = usesTemporaryReferences
? {temporaryReferences: tempRefsForRequest}
: {};
if (usesTemporaryReferences && !options.temporaryReferences) {
throw new Error('Decode configuration error: temporaryReferences required');
}
const payload = createFromReadableStream(stream, options); Type guard
const hasTemporaryReferences = (
opts: unknown,
): opts is {temporaryReferences: Map<string, unknown>} =>
typeof opts === 'object' && opts !== null &&
(opts as any).temporaryReferences instanceof Map; Prevention
- Create the TemporaryReferenceSet at request start and thread the same instance to encoder and decoder
- Encapsulate the set's lifecycle in your router's request context so no call site forgets it
- Add integration tests covering payloads that contain request-scoped values
When it happens
Trigger: The server serialized with a TemporaryReferenceSet (request-scoped values like React Elements or server-only objects) and the client calls createFromReadableStream/createFromFetch/decodeReply without passing {temporaryReferences: theSameSet}; or a reply round-trip where encodeReply used a set but the client decoder was not given it.
Common situations: Server Actions/encodeReply flows that transport request-scoped objects; hand-rolled RSC routers that manage the Flight stream manually and forget to thread the per-request set back to the client; upgrading a framework where temporary-reference handling moved into options you now must pass.
Related errors
- React Element cannot be passed to Server Functions from the
- Symbols cannot be passed to a Server Function without a temp
- Type ${typeof value} is not supported as an argument to a Se
- Invalid reference.
- Trying to call a function from "use server" but the callServ
AI-assisted analysis of facebook/react@eafeac097b (2026-08-21).
Data as JSON: /api/errors/1c31504e21c0f820.
Report an issue: GitHub.