{"record":{"id":"c1c2e41cf55e9bfa","repo":"apache/beam","slug":"invalid-pardo-payload-for-v","errorCode":null,"errorMessage":"invalid ParDo payload for %v","messagePattern":"invalid ParDo payload for (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/core/runtime/exec/translate.go","lineNumber":481,"sourceCode":"\t\turnPerKeyCombineExtract,\n\t\turnPerKeyCombineConvert,\n\t\turnPairWithRestriction,\n\t\turnSplitAndSizeRestrictions,\n\t\turnProcessSizedElementsAndRestrictions,\n\t\turnTruncateSizedRestrictions:\n\t\tvar data string\n\t\tvar sides map[string]*pipepb.SideInput\n\t\tvar userState map[string]*pipepb.StateSpec\n\t\tvar userTimers map[string]*pipepb.TimerFamilySpec\n\t\tswitch urn {\n\t\tcase graphx.URNParDo,\n\t\t\turnPairWithRestriction,\n\t\t\turnSplitAndSizeRestrictions,\n\t\t\turnProcessSizedElementsAndRestrictions,\n\t\t\turnTruncateSizedRestrictions:\n\t\t\tvar pardo pipepb.ParDoPayload\n\t\t\tif err := proto.Unmarshal(payload, &pardo); err != nil {\n\t\t\t\treturn nil, errors.Wrapf(err, \"invalid ParDo payload for %v\", transform)\n\t\t\t}\n\t\t\tdata = string(pardo.GetDoFn().GetPayload())\n\t\t\tsides = pardo.GetSideInputs()\n\t\t\tuserState = pardo.GetStateSpecs()\n\t\t\tuserTimers = pardo.GetTimerFamilySpecs()\n\t\tcase urnPerKeyCombinePre, urnPerKeyCombineMerge, urnPerKeyCombineExtract, urnPerKeyCombineConvert:\n\t\t\tvar cmb pipepb.CombinePayload\n\t\t\tif err := proto.Unmarshal(payload, &cmb); err != nil {\n\t\t\t\treturn nil, errors.Wrapf(err, \"invalid CombinePayload payload for %v\", transform)\n\t\t\t}\n\t\t\tdata = string(cmb.GetCombineFn().GetPayload())\n\t\tdefault:\n\t\t\t// TODO(herohde) 12/4/2017: we see DoFns directly with Dataflow. Handle that\n\t\t\t// case here, for now, so that the harness can use this logic.\n\n\t\t\tdata = string(payload)\n\t\t}\n","sourceCodeStart":463,"sourceCodeEnd":499,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/core/runtime/exec/translate.go#L463-L499","documentation":"makeLink decodes the ParDoPayload proto from a ParDo-family transform's spec payload. If proto.Unmarshal fails (malformed/empty payload bytes), the error is wrapped with the transform name and returned, aborting plan translation.","triggerScenarios":"A transform with URN urnParDo (or SDF-related URNs like pair-with-restriction, split-and-size-restrictions, process-sized-elements) whose spec payload is not a valid serialized pipepb.ParDoPayload, during makeLink.","commonSituations":"Pipeline graphs built outside the standard Beam pipeline-construction path (hand-crafted protos, tests); cross-SDK graph conversions that don't populate ParDo payloads; corrupted payloads from legacy Dataflow-style DoFn handling.","solutions":["Ensure the transform spec payload is a valid serialized ParDoPayload (build pipelines through beam.ParDo/graphx encoding, not manual protos)","Log/inspect the payload bytes and verify they decode with pipepb.ParDoPayload in a test","Upgrade SDK versions if the runner emits a different payload encoding"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Verify payload decodes before plan translation\nvar pardo pipepb.ParDoPayload\nif err := proto.Unmarshal(spec.GetPayload(), &pardo); err != nil {\n    return fmt.Errorf(\"bad ParDoPayload: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"if err := exec.UnmarshalPlan(desc); err != nil {\n    if strings.Contains(err.Error(), \"invalid ParDo payload\") {\n        return fmt.Errorf(\"pipeline graph malformed at ParDo transform: %w\", err)\n    }\n    return err\n}","preventionTips":["Construct pipelines via beam.ParDo and standard graph encoding","Never serialize ParDo payloads manually","Round-trip test payload proto encode/decode in CI"],"tags":["go","apache-beam","protobuf"],"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-14T16:17:12.679Z"}