{"record":{"id":"1eb99684db463552","repo":"apache/beam","slug":"unable-to-unmarshal-pardopayload-for-v-q-w","errorCode":null,"errorMessage":"unable to unmarshal ParDoPayload for %v - %q: %w","messagePattern":"unable to unmarshal ParDoPayload for (.+?) - %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/runners/prism/internal/jobservices/management.go","lineNumber":158,"sourceCode":"\t\tcase urns.TransformImpulse,\n\t\t\turns.TransformGBK,\n\t\t\turns.TransformFlatten,\n\t\t\turns.TransformCombinePerKey,\n\t\t\turns.TransformCombineGlobally,      // Used by Java SDK\n\t\t\turns.TransformCombineGroupedValues, // Used by Java SDK\n\t\t\turns.TransformMerge,                // Used directly by Python SDK if \"pre-optimized\"\n\t\t\turns.TransformPreCombine,           // Used directly by Python SDK if \"pre-optimized\"\n\t\t\turns.TransformExtract,              // Used directly by Python SDK if \"pre-optimized\"\n\t\t\turns.TransformAssignWindows:\n\t\t// Very few expected transforms types for submitted pipelines.\n\t\t// Most URNs are for the runner to communicate back to the SDK for execution.\n\t\tcase urns.TransformReshuffle, urns.TransformRedistributeArbitrarily, urns.TransformRedistributeByKey:\n\t\t\t// Reshuffles and Redistributes are permitted and have special handling during optimization.\n\n\t\tcase urns.TransformParDo:\n\t\t\tvar pardo pipepb.ParDoPayload\n\t\t\tif err := proto.Unmarshal(t.GetSpec().GetPayload(), &pardo); err != nil {\n\t\t\t\twrapped := fmt.Errorf(\"unable to unmarshal ParDoPayload for %v - %q: %w\", tid, t.GetUniqueName(), err)\n\t\t\t\tjob.Failed(wrapped)\n\t\t\t\treturn nil, wrapped\n\t\t\t}\n\n\t\t\tisStateful := false\n\n\t\t\t// Validate all the state features\n\t\t\tfor _, spec := range pardo.GetStateSpecs() {\n\t\t\t\tisStateful = true\n\t\t\t\tcheck(\"StateSpec.Protocol.Urn\", spec.GetProtocol().GetUrn(),\n\t\t\t\t\turns.UserStateBag, urns.UserStateMultiMap, urns.UserStateOrderedList)\n\t\t\t}\n\t\t\t// Validate all the timer features\n\t\t\tfor _, spec := range pardo.GetTimerFamilySpecs() {\n\t\t\t\tisStateful = true\n\t\t\t\tcheck(\"TimerFamilySpecs.TimeDomain.Urn\", spec.GetTimeDomain(), pipepb.TimeDomain_EVENT_TIME, pipepb.TimeDomain_PROCESSING_TIME)\n\t\t\t}\n","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/prism/internal/jobservices/management.go#L140-L176","documentation":"During job preparation, prism validates transform specs. For a ParDo transform it attempts to proto.Unmarshal the transform's spec payload into pipepb.ParDoPayload. If unmarshaling fails (payload missing, truncated, or not a ParDoPayload), the job is marked Failed and Prepare returns this wrapped error including the transform ID, unique name, and cause.","triggerScenarios":"A pipeline submitted to prism contains a transform with URN urn:beam:transform:pardo:v1 whose spec payload cannot be unmarshaled as ParDoPayload, encountered in management.go's Prepare validation switch.","commonSituations":"SDK/proto version mismatch where the payload was serialized with an incompatible schema; hand-built pipeline protos with the wrong spec bytes; corrupt serialization when the graph is generated by a non-Go SDK.","solutions":["Check the wrapped (%w) error for the concrete proto unmarshal cause.","Ensure the pipeline is generated and serialized by an SDK version compatible with the prism runner's Beam proto definitions.","Verify the transform's spec payload is actually a serialized ParDoPayload (not another payload type) and regenerate the pipeline."],"exampleFix":"// before: wrong payload type on a ParDo URN\nt.spec.payload = anypb(anotherPayload)\n\n// after\nt.spec.payload = pipepb.ParDoPayload{...} // correctly serialized ParDoPayload","handlingStrategy":"validation","validationCode":"// Client-side: verify ParDo spec payloads unmarshal before submission\nvar pardo pipepb.ParDoPayload\nif err := proto.Unmarshal(t.GetSpec().GetPayload(), &pardo); err != nil {\n    log.Fatalf(\"transform %q spec is not a valid ParDoPayload: %v\", t.GetUniqueName(), err)\n}","typeGuard":null,"tryCatchPattern":"if err := beamx.Run(ctx, p); err != nil && strings.Contains(err.Error(), \"unable to unmarshal ParDoPayload\") {\n    log.Fatalf(\"pipeline graph serialization is broken; regenerate the pipeline: %v\", err)\n}","preventionTips":["Keep the submitting SDK's proto version compatible with prism's","Never hand-craft transform spec payloads","Regenerate pipeline graphs after any Beam dependency upgrade"],"tags":["go","beam","protobuf","job-submission"],"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"}