{"record":{"id":"1c31504e21c0f820","repo":"facebook/react","slug":"missing-a-temporary-reference-set-but-the-rsc-resp","errorCode":null,"errorMessage":"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.","messagePattern":"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\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-client/src/ReactFlightClient.js","lineNumber":2608,"sourceCode":"        return Symbol.for(value.slice(2));\n      }\n      case 'h': {\n        // Server Reference\n        const ref = value.slice(2);\n        return getOutlinedModel(\n          response,\n          ref,\n          parentObject,\n          key,\n          loadServerReference,\n        );\n      }\n      case 'T': {\n        // Temporary Reference\n        const reference = '$' + value.slice(2);\n        const temporaryReferences = response._tempRefs;\n        if (temporaryReferences == null) {\n          throw new Error(\n            'Missing a temporary reference set but the RSC response returned a temporary reference. ' +\n              'Pass a temporaryReference option with the set that was used with the reply.',\n          );\n        }\n        return readTemporaryReference(temporaryReferences, reference);\n      }\n      case 'Q': {\n        // Map\n        const ref = value.slice(2);\n        return getOutlinedModel(response, ref, parentObject, key, createMap);\n      }\n      case 'W': {\n        // Set\n        const ref = value.slice(2);\n        return getOutlinedModel(response, ref, parentObject, key, createSet);\n      }\n      case 'B': {\n        // Blob","sourceCodeStart":2590,"sourceCodeEnd":2626,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-client/src/ReactFlightClient.js#L2590-L2626","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nconst payload = createFromReadableStream(stream); // throws on 'T' rows\n\n// after\nconst temporaryReferences = await getTempRefsForRequest(requestId); // same set the server used\nconst payload = createFromReadableStream(stream, {temporaryReferences});","handlingStrategy":"validation","validationCode":"// Fail fast at decode setup if temp refs are in play but the set is missing\nconst options = usesTemporaryReferences\n  ? {temporaryReferences: tempRefsForRequest}\n  : {};\nif (usesTemporaryReferences && !options.temporaryReferences) {\n  throw new Error('Decode configuration error: temporaryReferences required');\n}\nconst payload = createFromReadableStream(stream, options);","typeGuard":"const hasTemporaryReferences = (\n  opts: unknown,\n): opts is {temporaryReferences: Map<string, unknown>} =>\n  typeof opts === 'object' && opts !== null &&\n  (opts as any).temporaryReferences instanceof Map;","tryCatchPattern":null,"preventionTips":["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"],"tags":["rsc","flight","temporary-references","serialization","server-functions"],"backgroundTag":"missing-temporary-reference-set","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}