{"record":{"id":"6ff59d7445f3fabb","repo":"apache/beam","slug":"unknown-dofn-type-spec","errorCode":null,"errorMessage":"Unknown DoFn type: ${spec}","messagePattern":"Unknown DoFn type: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"sdks/typescript/src/apache_beam/worker/operators.ts","lineNumber":964,"sourceCode":"    } else if (spec.doFn?.urn === urns.JS_ASSIGN_TIMESTAMPS_DOFN_URN) {\n      return new AssignTimestampsParDoOperator(\n        transformId,\n        context.getReceiver(onlyElement(Object.values(transform.outputs))),\n        deserializeFn(spec.doFn.payload!).func,\n      );\n    } else if (spec.doFn?.urn === urns.SPLITTING_JS_DOFN_URN) {\n      return new SplittingDoFnOperator(\n        transformId,\n        Object.fromEntries(\n          Object.entries(transform.outputs).map(([tag, pcId]) => [\n            tag,\n            context.getReceiver(pcId),\n          ]),\n        ),\n        deserializeFn(spec.doFn.payload!),\n      );\n    } else {\n      throw new Error(\"Unknown DoFn type: \" + spec);\n    }\n  },\n);\n\n///\n\nexport function encodeToBase64<T>(element: T, coder: Coder<T>): string {\n  const writer = new protobufjs.Writer();\n  coder.encode(element, writer, CoderContext.wholeStream);\n  return Buffer.from(writer.finish()).toString(\"base64\");\n}\n\nexport function decodeFromBase64<T>(s: string, coder: Coder<T>): T {\n  return coder.decode(\n    new protobufjs.Reader(Buffer.from(s, \"base64\")),\n    CoderContext.wholeStream,\n  );\n}","sourceCodeStart":946,"sourceCodeEnd":982,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/typescript/src/apache_beam/worker/operators.ts#L946-L982","documentation":"The DoFn urn in the transform's spec (spec.doFn.urn) matched none of the JS DoFn urns this operator factory recognizes (JS_DOFN, JS_ASSIGN_TIMESTAMPS, SPLITTING_JS_DOFN, ...). The serialized spec is the input at fault: the runner sent a DoFn flavor the TypeScript worker cannot deserialize.","triggerScenarios":"Thrown at sdks/typescript/src/apache_beam/worker/operators.ts:964 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Match SDK versions between the pipeline and the TypeScript worker so all DoFn urns are recognized.","Use only DoFs supported by the JS SDK (plain JS DoFn, assign-timestamps, splitting) in cross-language pipelines.","Register a custom DoFn urn handler in the operator factory if you added a new urn."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}