{"record":{"id":"a9ad2ff28409269d","repo":"facebook/react","slug":"568","errorCode":"568","errorMessage":"Already initialized typed array.","messagePattern":"Already initialized typed array\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-server/src/ReactFlightReplyServer.js","lineNumber":1243,"sourceCode":"  }\n  return model;\n}\n\nfunction parseTypedArray<T: $ArrayBufferView | ArrayBuffer>(\n  response: Response,\n  reference: string,\n  constructor: any,\n  bytesPerElement: number,\n  parentObject: Object,\n  parentKey: string,\n  referenceArrayRoot: null | NestedArrayContext,\n): null {\n  const id = parseInt(reference.slice(2), 16);\n  const prefix = response._prefix;\n  const key = prefix + id;\n  const chunks = response._chunks;\n  if (chunks.has(id)) {\n    throw new Error('Already initialized typed array.');\n  }\n  chunks.set(\n    id,\n    // We don't need to put the actual Blob in the chunk,\n    // because it shouldn't be accessed by anything else.\n    createErroredChunk(response, new Error('Already initialized typed array.')),\n  );\n\n  // We should have this backingEntry in the store already because we emitted\n  // it before referencing it. It should be a Blob.\n  const backingEntry: Blob = getBackingEntry(response._formData, key) as any;\n\n  const promise: Promise<ArrayBuffer> = backingEntry.arrayBuffer();\n\n  // Since loading the buffer is an async operation we'll be blocking the parent\n  // chunk.\n\n  let handler: InitializationHandler;","sourceCodeStart":1225,"sourceCodeEnd":1261,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-server/src/ReactFlightReplyServer.js#L1225-L1261","documentation":"parseTypedArray revives a serialized typed array (backed by a Blob entry in FormData) under a fresh chunk id. If that id already exists in the response chunk map, the payload declared the same typed array twice, so React throws and additionally plants an errored chunk for that id.","triggerScenarios":"Two typed-array entries in the reply share one chunk id - duplicated multipart fields, replayed/captured FormData, or an encoder from a mismatched React version reusing ids.","commonSituations":"Replayed submissions from caches; forged requests; version skew between the serializing client and the decoding server.","solutions":["Reject the submission: catch around decodeReply and return 400.","Never replay or reuse captured action payloads; submit fresh ones.","Ensure client and server React versions match."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const args = await decodeReply(formData);\n} catch (e) {\n  return new Response('Bad request', {status: 400});\n}","preventionTips":["Never replay captured action FormData; always submit freshly built payloads.","Ensure proxies/retries do not duplicate multipart parts.","Keep React versions aligned across client and server."],"tags":["react","server-actions","deserialization","typed-array"],"backgroundTag":"malformed-serialized-payload","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}