{"record":{"id":"f0ffa6ff796bab84","repo":"apache/beam","slug":"panic-err-propagating-lpunknowncoders-error","errorCode":null,"errorMessage":"panic(err) propagating lpUnknownCoders error","messagePattern":"panic\\(err\\) propagating lpUnknownCoders error","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/runners/prism/internal/execute.go","lineNumber":401,"sourceCode":"\t\t\t\tif err := s.Execute(egctx, j, wk, comps, em, rb); err != nil {\n\t\t\t\t\t// Ensure we clean up on bundle failure\n\t\t\t\t\tj.Logger.Error(\"Bundle Failed.\", slog.Any(\"error\", err))\n\t\t\t\t\tem.FailBundle(rb)\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\treturn nil\n\t\t\t})\n\t\t// Log a heartbeat every 60 seconds\n\t\tcase <-ticker.C:\n\t\t\tj.Logger.Info(\"pipeline is running\", slog.String(\"job\", j.String()))\n\t\t}\n\t}\n}\n\nfunc collectionPullDecoder(coldCId string, coders map[string]*pipepb.Coder, comps *pipepb.Components) func(io.Reader) []byte {\n\tcID, err := lpUnknownCoders(coldCId, coders, comps.GetCoders())\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn pullDecoder(coders[cID], coders)\n}\n\nfunc extractKVCoderID(coldCId string, coders map[string]*pipepb.Coder) (string, bool) {\n\tc := coders[coldCId]\n\tif c.GetSpec().GetUrn() == urns.CoderKV {\n\t\treturn c.GetComponentCoderIds()[0], true\n\t}\n\treturn \"\", false\n}\n\nfunc getWindowValueCoders(comps *pipepb.Components, col *pipepb.PCollection, coders map[string]*pipepb.Coder) (engine.WinCoderType, exec.WindowDecoder, exec.WindowEncoder) {\n\tws := comps.GetWindowingStrategies()[col.GetWindowingStrategyId()]\n\twcID, err := lpUnknownCoders(ws.GetWindowCoderId(), coders, comps.GetCoders())\n\tif err != nil {\n\t\tpanic(err)\n\t}","sourceCodeStart":383,"sourceCodeEnd":419,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/prism/internal/execute.go#L383-L419","documentation":"collectionPullDecoder resolves possibly unknown coders via lpUnknownCoders before building a pull decoder. If coder resolution fails (the coder ID chain is missing from the components), the error is propagated as a panic because the pipeline graph is deemed invalid.","triggerScenarios":"A PCollection references a coder ID that does not exist in the components' coder map, or lpUnknownCoders cannot reduce an unknown-leaf coder to a concrete one when building the stage's element decoder.","commonSituations":"Pipelines submitted with custom coders prism doesn't recognize, cross-language pipelines whose coder components weren't fully materialized, or hand-crafted/optimized job submissions with dropped components.","solutions":["Upgrade Beam; unknown-coder handling improvements land regularly.","Inspect the submitted pipeline's coders map for the missing coder ID and ensure custom coders are registered via expansion or included in components.","Simplify or remove custom coder usage (e.g. use standard coders) to work around the resolution failure.","File a Beam issue with the job JSON if all coders appear valid."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Validate coder chain resolves before submission\nc := comps.GetCoders()[coldCId]\nif c == nil {\n    return fmt.Errorf(\"coder %s missing from components\", coldCId)\n}\nfor _, comp := range c.GetComponentCoders() {\n    if comps.GetCoders()[comp] == nil {\n        return fmt.Errorf(\"component coder %s missing\", comp)\n    }\n}","typeGuard":null,"tryCatchPattern":"cID, err := lpUnknownCoders(coldCId, coders, comps.GetCoders())\nif err != nil {\n    return nil, fmt.Errorf(\"resolving coder %s: %w\", coldCId, err)\n}","preventionTips":["Register custom coders so they appear in components","Avoid hand-editing pipeline JSON","Keep Beam versions aligned across SDKs"],"tags":["go","panic","coder","pipeline-graph","beam-prism"],"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-20T03:17:13.778Z"}