{"record":{"id":"9cb8decd5110b28d","repo":"apache/beam","slug":"could-not-unmarshal-window-coder-for-pcollection-v-w","errorCode":null,"errorMessage":"could not unmarshal window coder for pcollection %v: %w","messagePattern":"could not unmarshal window coder for pcollection (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/core/runtime/exec/translate.go","lineNumber":370,"sourceCode":"\tc, err := b.coders.Coder(col.CoderId)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tif coder.IsW(c) {\n\t\t// TODO(herohde) 3/16/2018: remove potential WindowedValue from Dataflow.\n\t\t// However, windowing strategies are not yet passed through, so the main\n\t\t// path always gives us GlobalWindows.\n\n\t\treturn coder.SkipW(c), c.Window, nil\n\t}\n\n\tws, ok := b.desc.GetWindowingStrategies()[col.GetWindowingStrategyId()]\n\tif !ok {\n\t\treturn nil, nil, errors.Errorf(\"windowing strategy %v not found\", id)\n\t}\n\twc, err := b.coders.WindowCoder(ws.GetWindowCoderId())\n\tif err != nil {\n\t\treturn nil, nil, errors.Errorf(\"could not unmarshal window coder for pcollection %v: %w\", id, err)\n\t}\n\treturn c, wc, nil\n}\n\nfunc (b *builder) makePCollection(id string) (*PCollection, error) {\n\tif n, exists := b.nodes[id]; exists {\n\t\treturn n, nil\n\t}\n\n\tlist := b.succ[id]\n\n\tvar u Node\n\tswitch len(list) {\n\tcase 0:\n\t\t// Discard.\n\n\t\tu = &Discard{UID: b.idgen.New()}\n","sourceCodeStart":352,"sourceCodeEnd":388,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/core/runtime/exec/translate.go#L352-L388","documentation":"A follow-on failure in makeCoderForPCollection: the windowing strategy was found, but decoding its window coder via b.coders.WindowCoder(ws.GetWindowCoderId()) failed. The error wraps the underlying cause (unknown coder id, unsupported coder URN, etc.) with pcollection context.","triggerScenarios":"WindowingStrategy references a WindowCoderId that is absent from the coder registry or cannot be decoded, while building the plan for a pcollection.","commonSituations":"Runner not registering the window coder id in the coders map; unsupported/custom window coders; protocol mismatch between runner and Go SDK coder registries.","solutions":["Check the wrapped error to identify the missing/invalid window coder id and ensure it's registered in the component coder map","Ensure runners register all coders referenced by windowing strategies","Align SDK/runner versions and regenerate the pipeline"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Pre-check window coder registry completeness\nfor _, ws := range desc.GetWindowingStrategies() {\n    if _, err := coders.WindowCoder(ws.GetWindowCoderId()); err != nil {\n        return fmt.Errorf(\"window coder %s missing: %w\", ws.GetWindowCoderId(), err)\n    }\n}","typeGuard":null,"tryCatchPattern":"if err := exec.UnmarshalPlan(desc); err != nil {\n    var target *errors.Error\n    if strings.Contains(err.Error(), \"could not unmarshal window coder\") {\n        log.Printf(\"window coder decode failed: %v\", err) // inspect wrapped cause\n    }\n}","preventionTips":["Ensure runners register every window coder id referenced by strategies","Inspect the wrapped %w error for the root cause","Add integration tests covering windowed pipelines"],"tags":["go","apache-beam","coder","windowing"],"backgroundTag":"resource-not-found","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"}