{"record":{"id":"5bcb552631d113e3","repo":"apache/beam","slug":"could-not-unmarshal-timer-coder-from-v-expected-two","errorCode":null,"errorMessage":"could not unmarshal timer coder from %v, expected two component but got %d","messagePattern":"could not unmarshal timer coder from (.+?), expected two component but got (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/core/runtime/graphx/coder.go","lineNumber":353,"sourceCode":"\t\t}\n\t\tc, err := DecodeCoderRef(&ref)\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrapf(err, \"could not unmarshal CoderRef from %v, failed to decode CoderRef \\\"%v\\\"\", c, string(payload))\n\t\t}\n\t\treturn c, nil\n\n\tcase urnIterableCoder, urnStateBackedIterableCoder:\n\t\tif len(components) != 1 {\n\t\t\treturn nil, errors.Errorf(\"could not unmarshal iterable coder from %v, expected one component but got %d\", c, len(components))\n\t\t}\n\t\telm, err := b.Coder(components[0])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn coder.NewI(elm), nil\n\tcase urnTimerCoder:\n\t\tif len(components) != 2 {\n\t\t\treturn nil, errors.Errorf(\"could not unmarshal timer coder from %v, expected two component but got %d\", c, len(components))\n\t\t}\n\t\telm, err := b.Coder(components[0])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tw, err := b.WindowCoder(components[1])\n\t\tif err != nil {\n\t\t\treturn nil, errors.Errorf(\"could not unmarshal window coder for timer: %w\", err)\n\t\t}\n\t\treturn coder.NewT(elm, w), nil\n\tcase urnRowCoder:\n\t\tvar s pipepb.Schema\n\t\tif err := proto.Unmarshal(c.GetSpec().GetPayload(), &s); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tt, err := schema.ToType(&s)\n\t\tif err != nil {\n\t\t\treturn nil, err","sourceCodeStart":335,"sourceCodeEnd":371,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/core/runtime/graphx/coder.go#L335-L371","documentation":"Error returned by makeCoder when decoding a timer coder URN whose component list does not have exactly two entries (element coder + window coder). The wire-format timer coder is defined as a pair; any other arity means the CoderRef from the pipeline proto is malformed or was produced by an incompatible runner/SDK version.","triggerScenarios":"Decoding a timer coder whose components list has other than 2 entries — malformed graph or producer/consumer coder-encoding mismatch.","commonSituations":"Runner/SDK version skew around timer support; hand-assembled coder JSON missing the window component; older pipelines predating timer coder support decoded by newer harness.","solutions":["Ensure the timer coder lists exactly two components: [elementCoder, windowCoder]","Regenerate the pipeline with a Go SDK version supporting timer coders","Align SDK versions on submitter and runner","Fix hand-written coder JSON to add the missing window coder component"],"exampleFix":"// before: timer coder with only 1 component\n// after: {\"urn\":\"beam:coder:timer:v1\",\"components\":[{\"urn\":\"beam:coder:bytes:v1\",\"components\":[]},{\"urn\":\"beam:coder:global_window:v1\",\"components\":[]}]}","handlingStrategy":"validation","validationCode":"if ref.Urn == \"beam:coder:timer:v1\" && len(ref.Components) != 2 {\n    return fmt.Errorf(\"timer coder must have exactly 2 components (element, window), got %d\", len(ref.Components))\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Ensure runner supports timer coders before enabling timers","Keep submitter and harness SDK versions in sync","Include both element and window components when building timer coders"],"tags":["go","apache-beam","coder","timer"],"backgroundTag":"missing-required-argument","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"}