{"record":{"id":"472cd85bbe427c02","repo":"facebook/react","slug":"376","errorCode":"376","errorMessage":"Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for(%s) cannot be found among global symbols.%s","messagePattern":"Only global symbols received from Symbol\\.for\\(\\.\\.\\.\\) can be passed to Client Components\\. The symbol Symbol\\.for\\((.+?)\\) cannot be found among global symbols\\.(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-server/src/ReactFlightServer.js","lineNumber":4308,"sourceCode":"        'Functions cannot be passed directly to Client Components ' +\n          'unless you explicitly expose it by marking it with \"use server\". ' +\n          'Or maybe you meant to call this function rather than return it.' +\n          describeObjectForErrorMessage(parent, parentPropertyName),\n      );\n    }\n  }\n\n  if (typeof value === 'symbol') {\n    const writtenSymbols = request.writtenSymbols;\n    const existingId = writtenSymbols.get(value);\n    if (existingId !== undefined) {\n      return serializeByValueID(existingId);\n    }\n    // $FlowFixMe[incompatible-type] `description` might be undefined\n    const name: string = value.description;\n\n    if (Symbol.for(name) !== value) {\n      throw new Error(\n        'Only global symbols received from Symbol.for(...) can be passed to Client Components. ' +\n          `The symbol Symbol.for(${\n            // $FlowFixMe[incompatible-type] `description` might be undefined\n            value.description\n          }) cannot be found among global symbols.` +\n          describeObjectForErrorMessage(parent, parentPropertyName),\n      );\n    }\n\n    request.pendingChunks++;\n    const symbolId = request.nextChunkId++;\n    emitSymbolChunk(request, symbolId, name);\n    writtenSymbols.set(value, symbolId);\n    return serializeByValueID(symbolId);\n  }\n\n  if (typeof value === 'bigint') {\n    if (enableTaint) {","sourceCodeStart":4290,"sourceCodeEnd":4326,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-server/src/ReactFlightServer.js#L4290-L4326","documentation":"Symbols can only cross the RSC boundary if they are registered global symbols: the server serializes a symbol by its description and the client recreates it with Symbol.for. A symbol created with Symbol('name') is unique to its creation site and can never be found again on the client, so React throws rather than emit a value that would silently mismatch.","triggerScenarios":"Passing const KIND = Symbol('kind') as a prop to a client component; exporting symbols created with bare Symbol('...') from modules whose values end up in client props.","commonSituations":"Enum-like constants defined with Symbol() instead of Symbol.for(); libraries exporting symbol keys used in prop objects; defensive-coding habits that use unique symbols to avoid collisions.","solutions":["Create shared symbols with Symbol.for('name') in a module imported by both server and client.","Replace the symbol with a plain string or number if global registry pollution is a concern.","Audit shared constant modules for bare Symbol() usage."],"exampleFix":"// before — constants.ts\nexport const STATUS = Symbol('status');\n\n// after\nexport const STATUS = Symbol.for('app.status');","handlingStrategy":"type-guard","validationCode":"export function assertGlobalSymbols(props: Record<string, unknown>) {\n  for (const [k, v] of Object.entries(props)) {\n    if (typeof v === 'symbol' && !isGlobalSymbol(v)) {\n      throw new Error(`prop ${k} uses a non-global symbol — use Symbol.for()`);\n    }\n  }\n}","typeGuard":"export function isGlobalSymbol(v: unknown): v is symbol {\n  return typeof v === 'symbol' && v.description != null && Symbol.for(v.description) === v;\n}","tryCatchPattern":null,"preventionTips":["Use Symbol.for for any symbol that must cross a process boundary.","Lint against bare Symbol('...') in shared constant modules."],"tags":["symbol","serialization","props","server-components"],"backgroundTag":"rsc-serialization","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}