{"record":{"id":"5790a41a832745b2","repo":"apache/beam","slug":"executetransform-gbk-stage-v-transform-q-v-couldn-t-process","errorCode":null,"errorMessage":"ExecuteTransform[GBK] stage %v, transform %q %v: couldn't process window coder:\n%w","messagePattern":"ExecuteTransform\\[GBK\\] stage (.+?), transform %q (.+?): couldn't process window coder:\n%w","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/runners/prism/internal/handlerunner.go","lineNumber":432,"sourceCode":"\tfor _, out := range t.GetOutputs() {\n\t\tonlyOut = out\n\t}\n\n\tswitch urn {\n\tcase urns.TransformFlatten:\n\t\t// Already done and collated.\n\t\tdata = inputData\n\n\tcase urns.TransformGBK:\n\t\tws := windowingStrategy(comps, tid)\n\t\tkvc := onlyInputCoderForTransform(comps, tid)\n\n\t\tcoders := map[string]*pipepb.Coder{}\n\n\t\t// TODO assert this is a KV. It's probably fine, but we should fail anyway.\n\t\twcID, err := lpUnknownCoders(ws.GetWindowCoderId(), coders, comps.GetCoders())\n\t\tif err != nil {\n\t\t\tpanic(fmt.Errorf(\"ExecuteTransform[GBK] stage %v, transform %q %v: couldn't process window coder:\\n%w\", stageID, tid, prototext.Format(t), err))\n\t\t}\n\t\tkcID, err := lpUnknownCoders(kvc.GetComponentCoderIds()[0], coders, comps.GetCoders())\n\t\tif err != nil {\n\t\t\tpanic(fmt.Errorf(\"ExecuteTransform[GBK] stage %v, transform %q %v: couldn't process key coder:\\n%w\", stageID, tid, prototext.Format(t), err))\n\t\t}\n\t\tecID, err := lpUnknownCoders(kvc.GetComponentCoderIds()[1], coders, comps.GetCoders())\n\t\tif err != nil {\n\t\t\tpanic(fmt.Errorf(\"ExecuteTransform[GBK] stage %v, transform %q %v: couldn't process value coder:\\n%w\", stageID, tid, prototext.Format(t), err))\n\t\t}\n\t\treconcileCoders(coders, comps.GetCoders())\n\n\t\twc := coders[wcID]\n\t\tkc := coders[kcID]\n\t\tec := coders[ecID]\n\n\t\tdata = append(data, gbkBytes(ws, wc, kc, ec, inputData, coders))\n\t\tif len(data[0]) == 0 {\n\t\t\tpanic(\"no data for GBK\")","sourceCodeStart":414,"sourceCodeEnd":450,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/prism/internal/handlerunner.go#L414-L450","documentation":"When the prism runner executes a GBK (GroupByKey) transform, it must resolve the stage's window coder via lpUnknownCoders before it can decode/encode grouped data. If lpUnknownCoders returns an error (unknown or unsatisfiable coder reference), ExecuteTransform panics with this message, embedding the stage ID, transform ID, prototext of the transform, and the wrapped cause.","triggerScenarios":"A GBK stage whose components reference a window coder ID that lpUnknownCoders cannot resolve or rewrite from comps.GetCoders().","commonSituations":"Corrupted or hand-modified pipeline protos; custom coders registered on one side of a cross-language pipeline but not the other; SDK coder URNs unsupported by prism.","solutions":["Read the wrapped error to identify which coder reference failed resolution.","Ensure all coders referenced by the GBK's windowing strategy are present in the pipeline's coder components.","Use standard Beam coders or register custom coders so they are emitted into the pipeline proto."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Confirm the GBK input's windowing strategy references a registered coder\nws := transform.WindowingStrategy\nif _, ok := codersByID[ws.GetWindowCoderId()]; !ok {\n    log.Fatalf(\"window coder %q not registered\", ws.GetWindowCoderId())\n}","typeGuard":null,"tryCatchPattern":"// This is a panic, not an error return — recover it\nfunc runWithRecover() (err error) {\n    defer func() {\n        if r := recover(); r != nil {\n            err = fmt.Errorf(\"GBK coder failure: %v\", r)\n        }\n    }()\n    return beamx.Run(ctx, p)\n}","preventionTips":["Prefer built-in Beam coders for windowing metadata","Register custom coders so they are emitted into the pipeline proto","Avoid hand-editing serialized pipeline protos"],"tags":["go","beam","gbk","coders"],"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"}