{"record":{"id":"95e8a849ef72c19c","repo":"apache/beam","slug":"executetransform-gbk-stage-v-transform-q-v-couldn-t-process-95e8a8","errorCode":null,"errorMessage":"ExecuteTransform[GBK] stage %v, transform %q %v: couldn't process key coder:\n%w","messagePattern":"ExecuteTransform\\[GBK\\] stage (.+?), transform %q (.+?): couldn't process key coder:\n%w","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/runners/prism/internal/handlerunner.go","lineNumber":436,"sourceCode":"\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\")\n\t\t}\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"unimplemented runner transform[%v]\", urn))\n\t}","sourceCodeStart":418,"sourceCodeEnd":454,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/prism/internal/handlerunner.go#L418-L454","documentation":"After resolving the window coder, ExecuteTransform for GBK resolves the KV's key component coder (component 0) with lpUnknownCoders. Failure there triggers this panic, naming the stage, transform, and the wrapped cause. It indicates the key coder of the GBK input KV coder could not be processed/expanded by the runner.","triggerScenarios":"A GBK whose KV coder's componentCoderIds[0] refers to a coder that is missing, circular, or of an unsupported URN when resolved against the pipeline's coder components.","commonSituations":"Custom key types with coders not serialized into the pipeline; cross-language key coder mismatches; older SDK emitting coder references prism cannot expand.","solutions":["Inspect the wrapped error for the failing key coder ID or URN.","Ensure the key coder (and any nested coders) are fully specified in the pipeline components.","Update the SDK/prism versions so unsupported coder URNs are handled."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Check the GBK KV's key component coder resolves\nkvc := codersByID[gbkInputCoderID]\nif kvc.GetComponentCoderIds() == nil || len(kvc.GetComponentCoderIds()) < 2 {\n    log.Fatalf(\"GBK input coder is not a KV: %q\", gbkInputCoderID)\n}","typeGuard":null,"tryCatchPattern":"defer func() {\n    if r := recover(); r != nil && strings.Contains(fmt.Sprint(r), \"couldn't process key coder\") {\n        log.Fatalf(\"GBK key coder unresolved: %v\", r)\n    }\n}()","preventionTips":["Use standard encodable key types (strings, ints, bytes)","Register custom key coders with the coder registry","Keep SDK and prism proto definitions in sync"],"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"}