{"record":{"id":"aa36d1d710b1840a","repo":"apache/beam","slug":"retrievecoders-coder-q-not-present-in-base-map","errorCode":null,"errorMessage":"retrieveCoders: coder %q not present in base map","messagePattern":"retrieveCoders: coder %q not present in base map","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"sdks/go/pkg/beam/runners/prism/internal/coders.go","lineNumber":235,"sourceCode":"\t\tSpec: &pipepb.FunctionSpec{\n\t\t\tUrn: urns.CoderLengthPrefix,\n\t\t},\n\t\tComponentCoderIds: []string{cID},\n\t}\n\tbundle[lpcID] = lpc\n\treturn lpcID, nil\n}\n\n// retrieveCoders recursively ensures that the coder along with all its direct\n// and indirect component coders, are present in the `bundle` map.\n// If a coder is already in `bundle`, it's skipped. Returns an error if any\n// required coder ID is not found.\nfunc 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}","sourceCodeStart":217,"sourceCodeEnd":253,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/prism/internal/coders.go#L217-L253","documentation":"retrieveCoders collects all coders required for a bundle descriptor from the base map into the bundle map. This error means a required coder ID is not present in the base coder map, so the descriptor for execution cannot be completed — the pipeline's coder graph has a dangling reference.","triggerScenarios":"buildDescriptor (or recursive retrieveCoders on component coders) encounters a coder ID referenced by a PCollection, window coder, or composite that was never defined in the base components.","commonSituations":"Pipeline protos with dropped/trimmed coders still referenced; SDK/runner version mismatches producing coder IDs unknown to the runner; custom coders added to PCollections without registering component coders.","solutions":["Ensure every referenced coder ID (including window and component coders) is defined in the pipeline components before submission","Check Beam SDK and prism runner version alignment and upgrade to a matching release","If reproducible with a standard pipeline, file a Beam issue with the pipeline proto for diagnosis"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if _, ok := base[cID]; !ok {\n    return fmt.Errorf(\"required coder %q not defined\", cID)\n}","typeGuard":null,"tryCatchPattern":"if err := retrieveCoders(cID, bundle, base); err != nil {\n    return fmt.Errorf(\"descriptor build failed: %w\", err)\n}","preventionTips":["Ensure window and component coders are defined alongside PCollection coders","Align Beam SDK and prism runner versions","File Beam issues with pipeline protos for reproducible dangling coder references"],"tags":["beam","go","prism-runner","coders"],"backgroundTag":"internal-invariant-violation","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"}