{"record":{"id":"6f19345497c0c981","repo":"apache/beam","slug":"lpunknowncoders-couldn-t-handle-component-d-q-of-q-v-w","errorCode":null,"errorMessage":"lpUnknownCoders: couldn't handle component %d %q of %q %v:\n%w","messagePattern":"lpUnknownCoders: couldn't handle component (.+?) %q of %q (.+?):\n%w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"sdks/go/pkg/beam/runners/prism/internal/coders.go","lineNumber":183,"sourceCode":"\t}\n\t// If it is a leaf, move its components (if any) to the coders map.\n\tif leaf {\n\t\t// Copy the components from the base.\n\t\tfor _, cc := range c.GetComponentCoderIds() {\n\t\t\tbundle[cc] = base[cc]\n\t\t}\n\t\treturn cID, nil\n\t}\n\n\t// Now we have a known composite.\n\t// We may need to LP its components. If so, we make a new composite with the\n\t// LP'd components.\n\tvar needNewComposite bool\n\tvar comps []string\n\tfor i, cc := range c.GetComponentCoderIds() {\n\t\trcc, err := lpUnknownCoders(cc, bundle, base)\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"lpUnknownCoders: couldn't handle component %d %q of %q %v:\\n%w\", i, cc, cID, prototext.Format(c), err)\n\t\t}\n\t\tif cc != rcc {\n\t\t\tneedNewComposite = true\n\t\t}\n\t\tcomps = append(comps, rcc)\n\t}\n\tif needNewComposite {\n\t\tlpc := &pipepb.Coder{\n\t\t\tSpec:              c.GetSpec(),\n\t\t\tComponentCoderIds: comps,\n\t\t}\n\t\tbundle[lpcID] = lpc\n\t\treturn lpcID, nil\n\t}\n\treturn cID, nil\n}\n\n// forceLpCoder always add a new LP-coder for a given coder into the \"base\" map","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/prism/internal/coders.go#L165-L201","documentation":"When lpUnknownCoders recursively processes a composite coder's components, a failure on any child coder is wrapped with its index, ID, and prototext form. This error means a component coder within a composite could not be resolved or length-prefixed, propagating the root cause up the coder tree.","triggerScenarios":"Traversing a composite coder (e.g. custom or xlang coder) whose GetComponentCoderIds contains an ID missing from the base map or otherwise failing lpUnknownCoders — see error 4666 for the typical root cause.","commonSituations":"Cross-language pipelines where the expansion service emitted component coders not registered in the pipeline's coder map; deeply nested custom coders with dangling references.","solutions":["Follow the wrapped error chain to the leaf coder that is missing and ensure it is registered in the pipeline coders map","Re-run/inspect the expansion service output for xlang transforms to confirm all component coders were emitted","Test with a simpler pipeline to isolate which transform produces the broken composite coder"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"for _, cc := range c.GetComponentCoderIds() {\n    if _, ok := base[cc]; !ok {\n        return fmt.Errorf(\"component coder %q of %q missing\", cc, cID)\n    }\n}","typeGuard":null,"tryCatchPattern":"rcc, err := lpUnknownCoders(cc, bundle, base)\nif err != nil {\n    return fmt.Errorf(\"composite %q broken: %w\", cID, err)\n}","preventionTips":["Validate composite coder trees recursively before execution","For xlang pipelines, inspect expansion output for complete component coders","Isolate failing transforms with minimal repro pipelines"],"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"}