{"record":{"id":"6f8509f012262a87","repo":"apache/beam","slug":"unable-to-decode-pardopayload-for-v-in-stage-v","errorCode":null,"errorMessage":"unable to decode ParDoPayload for %v in stage %v","messagePattern":"unable to decode ParDoPayload for (.+?) in stage (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/runners/prism/internal/stage.go","lineNumber":447,"sourceCode":"\tclonePColToBundle := func(pid string) *pipepb.PCollection {\n\t\tcol := proto.Clone(comps.GetPcollections()[pid]).(*pipepb.PCollection)\n\t\tpcollections[pid] = col\n\t\treturn col\n\t}\n\n\t// Update coders for Stateful transforms.\n\tfor _, tid := range stg.transforms {\n\t\tt := comps.GetTransforms()[tid]\n\n\t\ttransforms[tid] = t\n\n\t\tif t.GetSpec().GetUrn() != urns.TransformParDo {\n\t\t\tcontinue\n\t\t}\n\n\t\tpardo := &pipepb.ParDoPayload{}\n\t\tif err := (proto.UnmarshalOptions{}).Unmarshal(t.GetSpec().GetPayload(), pardo); err != nil {\n\t\t\treturn fmt.Errorf(\"unable to decode ParDoPayload for %v in stage %v\", tid, stg.ID)\n\t\t}\n\n\t\t// We need to ensure the coders can be handled by prism, and are available in the bundle descriptor.\n\t\t// So we rewrite the transform's Payload with updated coder ids here.\n\t\tvar rewrite bool\n\t\tvar rewriteErr error\n\t\tfor stateID, s := range pardo.GetStateSpecs() {\n\t\t\trewrite = true\n\t\t\trewriteCoder := func(cid *string) {\n\t\t\t\tnewCid, err := lpUnknownCoders(*cid, coders, comps.GetCoders())\n\t\t\t\tif err != nil {\n\t\t\t\t\trewriteErr = fmt.Errorf(\"unable to rewrite coder %v for state %v for transform %v in stage %v:%w\", *cid, stateID, tid, stg.ID, err)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\t*cid = newCid\n\t\t\t}\n\t\t\tswitch s := s.GetSpec().(type) {\n\t\t\tcase *pipepb.StateSpec_BagSpec:","sourceCodeStart":429,"sourceCodeEnd":465,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/prism/internal/stage.go#L429-L465","documentation":"buildDescriptor decodes every ParDo transform's payload when preparing a stage's bundle descriptor; failure to unmarshal a ParDoPayload returns this error identifying the transform and stage. Prism needs it to rewrite coder IDs so all coders are available in the bundle descriptor.","triggerScenarios":"A transform with URN TransformParDo whose GetSpec().GetPayload() cannot be unmarshaled to pipepb.ParDoPayload during buildDescriptor.","commonSituations":"SDK/runner version mismatch changing payload contents; corrupted or hand-built pipeline protos; cross-language pipelines emitting unexpected payloads.","solutions":["Align the Beam SDK version with the prism runner version","Inspect the specific transform's payload bytes for validity","Rebuild and resubmit the pipeline; avoid reusing stale serialized pipelines"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"pardo := &pipepb.ParDoPayload{}\nif err := (proto.UnmarshalOptions{}).Unmarshal(t.GetSpec().GetPayload(), pardo); err != nil {\n    return fmt.Errorf(\"ParDo %v payload invalid: %w\", tid, err)\n}","typeGuard":null,"tryCatchPattern":"if err := buildDescriptor(...); err != nil {\n    if strings.Contains(err.Error(), \"unable to decode ParDoPayload\") {\n        // dump the offending transform payload for inspection\n    }\n    return err\n}","preventionTips":["Align Beam SDK and prism versions","Avoid stale serialized pipeline reuse","Validate payloads round-trip through proto unmarshal in tests"],"tags":["go","beam","protobuf","descriptor"],"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"}