{"record":{"id":"b8630f4cb13e75dc","repo":"apache/beam","slug":"retrievecoders-couldn-t-handle-component-d-q-of-q-v-w","errorCode":null,"errorMessage":"retrieveCoders: couldn't handle component %d %q of %q %v:\n%w","messagePattern":"retrieveCoders: couldn't handle component (.+?) %q of %q (.+?):\n%w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/runners/prism/internal/coders.go","lineNumber":248,"sourceCode":"func retrieveCoders(cID string, bundle, base map[string]*pipepb.Coder) error {\n\t// Look up the canonical location.\n\tc, ok := base[cID]\n\tif !ok {\n\t\t// We messed up somewhere.\n\t\treturn fmt.Errorf(\"retrieveCoders: coder %q not present in base map\", cID)\n\t}\n\n\tif _, ok := bundle[cID]; ok {\n\t\treturn nil\n\t}\n\t// Add the original coder to the coders map.\n\tbundle[cID] = c\n\n\tfor i, cc := range c.GetComponentCoderIds() {\n\t\t// now we need to retrieve the component coders as well\n\t\terr := retrieveCoders(cc, bundle, base)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"retrieveCoders: couldn't handle component %d %q of %q %v:\\n%w\", i, cc, cID, prototext.Format(c), err)\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// reconcileCoders ensures that the bundle coders are primed with initial coders from\n// the base pipeline components.\nfunc reconcileCoders(bundle, base map[string]*pipepb.Coder) {\n\tfor {\n\t\tvar comps []string\n\t\tfor _, c := range bundle {\n\t\t\tfor _, ccid := range c.GetComponentCoderIds() {\n\t\t\t\tif _, ok := bundle[ccid]; !ok {\n\t\t\t\t\t// We don't have the coder yet, so in we go.\n\t\t\t\t\tcomps = append(comps, ccid)\n\t\t\t\t}\n\t\t\t}","sourceCodeStart":230,"sourceCodeEnd":266,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/prism/internal/coders.go#L230-L266","documentation":"retrieveCoders in the prism runner recursively resolves a component coder chain from the pipeline proto, building a bundle of coders keyed by ID. When resolving any component coder ID fails, it wraps the underlying error with the component index, coder ID, and the prototext of the parent coder. This surfaces malformed or unresolvable coder graphs in a submitted pipeline.","triggerScenarios":"A pipeline's ComponentCoderIds reference a coder ID absent from the pipeline components, a component coder is itself malformed, or a custom coder URN unsupported by prism appears in the chain.","commonSituations":"Submitting pipelines from SDKs with coder encoding mismatches (version skew between SDK and prism), hand-crafted or serialized pipeline protos with dangling coder references, or custom coders prism cannot handle.","solutions":["Check the pipeline proto components: ensure every ComponentCoderId resolves to an existing coder in the same Environment","Upgrade the submitting SDK so its coder encoding matches the prism runner version","Remove or replace custom coder URNs unsupported by prism with standard coders","Read the wrapped inner error (%w) for the root cause at the specific component index"],"exampleFix":"// before: pipeline built with dangling component coder ref\n// after: validate coder graph before submit\nfor _, c := range comps.GetCoders() {\n  for _, cid := range c.GetComponentCoderIds() {\n    if comps.GetCoders()[cid] == nil {\n      return fmt.Errorf(\"dangling component coder ref %q in %q\", cid, c.GetUrn())\n    }\n  }\n}","handlingStrategy":"validation","validationCode":"comps := pipe.GetComponents()\nfor _, c := range comps.GetCoders() {\n  for _, cid := range c.GetComponentCoderIds() {\n    if comps.GetCoders()[cid] == nil {\n      return fmt.Errorf(\"coder %q references missing component coder %q\", c.GetSpec().GetUrn(), cid)\n    }\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Build pipelines only via SDK APIs, never hand-assemble coder protos","Keep submitting SDK and prism versions aligned"],"tags":["go","beam","prism-runner","coders","protobuf"],"backgroundTag":"schema-validation-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"}