{"record":{"id":"496de0e537776af0","repo":"apache/beam","slug":"could-not-unmarshal-window-coder-for-timer-w","errorCode":null,"errorMessage":"could not unmarshal window coder for timer: %w","messagePattern":"could not unmarshal window coder for timer: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/core/runtime/graphx/coder.go","lineNumber":361,"sourceCode":"\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\n\t\t}\n\t\treturn coder.NewR(typex.New(t)), nil\n\tcase urnNullableCoder:\n\t\tif len(components) != 1 {\n\t\t\treturn nil, errors.Errorf(\"could not unmarshal nullable 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 {","sourceCodeStart":343,"sourceCodeEnd":379,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/core/runtime/graphx/coder.go#L343-L379","documentation":"Error returned by makeCoder when the second component of a timer coder (the window coder, resolved via b.WindowCoder) fails to decode. The underlying error is wrapped, meaning the timer's windowing strategy coder referenced by the pipeline proto is itself invalid or unresolvable in this coder environment.","triggerScenarios":"Decoding a timer coder whose window-coder component uses an unsupported URN or has a corrupt payload, e.g. custom windows unknown to the harness.","commonSituations":"Custom window functions serialized but not registered on the decoding harness; SDK version mismatch for window coder encodings; corrupted pipeline payloads.","solutions":["Read the wrapped cause for the specific window coder failure","Use built-in windows (GlobalWindows, FixedWindows, etc.) or ensure custom windows decode via the registered custom window handling","Align SDK versions between producer and harness","Validate the timer coder's second component is a valid window coder"],"exampleFix":"// before: timer coder window component referencing unregistered custom window\n// after: use beam.FixedWindows(...) / GlobalWindows or register the custom window type before decoding","handlingStrategy":"try-catch","validationCode":"// validate the timer's window component decodes before decoding the timer\nif len(ref.Components) == 2 {\n    if _, err := graphx.WindowCoderFromJSON([]byte(ref.Components[1].Payload)); err != nil {\n        return fmt.Errorf(\"timer window component invalid: %w\", err)\n    }\n}","typeGuard":null,"tryCatchPattern":"tc, err := graphx.Coder(model, ref)\nif err != nil {\n    if strings.Contains(err.Error(), \"window coder\") {\n        return fmt.Errorf(\"timer windowing unsupported on this harness: %w\", err)\n    }\n    return err\n}","preventionTips":["Use built-in windows in timer pipelines","Register custom window encodings before graph decode","Match SDK versions across submitter and harness"],"tags":["go","apache-beam","coder","windowing"],"backgroundTag":"protobuf-unmarshal-failed","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}