{"record":{"id":"31d0a688ff32b433","repo":"apache/beam","slug":"invalid-transform-payload-for-v","errorCode":null,"errorMessage":"invalid transform payload for %v","messagePattern":"invalid transform payload for (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/core/runtime/exec/translate.go","lineNumber":505,"sourceCode":"\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\n\t\t// TODO(herohde) 1/28/2018: Once Dataflow's fully off the old way,\n\t\t// we can simply switch on the ParDo DoFn URN directly.\n\n\t\tvar tp v1pb.TransformPayload\n\t\tif err := protox.DecodeBase64(data, &tp); err != nil {\n\t\t\treturn nil, errors.Wrapf(err, \"invalid transform payload for %v\", transform)\n\t\t}\n\n\t\tswitch tpUrn := tp.GetUrn(); tpUrn {\n\t\tcase graphx.URNDoFn:\n\t\t\top, fn, _, in, _, err := graphx.DecodeMultiEdge(tp.GetEdge())\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\tswitch op {\n\t\t\tcase graph.ParDo:\n\t\t\t\tdofn, err := graph.AsDoFn(fn, graph.MainUnknown)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tswitch urn {\n\t\t\t\tcase urnPairWithRestriction:\n\t\t\t\t\tu = &PairWithRestriction{UID: b.idgen.New(), Fn: dofn, Out: out[0]}","sourceCodeStart":487,"sourceCodeEnd":523,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/core/runtime/exec/translate.go#L487-L523","documentation":"After extracting the DoFn/CombineFn payload string, makeLink decodes it as a base64-encoded v1pb.TransformPayload. If DecodeBase64/proto decoding fails, this wrapped error reports the transform that could not be decoded. This is the legacy Dataflow transform-payload path.","triggerScenarios":"Transform payload data string is not valid base64 or not a valid TransformPayload proto — e.g. empty data from an unhandled URN in the default branch, or legacy payloads — during makeLink.","commonSituations":"Dataflow-style harness paths where DoFns appear directly; pipelines built by older SDK encodings; unhandled transform URNs falling into the default branch with unusable data.","solutions":["Check that the transform URN is one makeLink handles, so the payload is decoded by the right branch rather than the legacy TransformPayload path","Ensure the payload string is proper base64 (protox.DecodeBase64) encoding of a TransformPayload","Regenerate the pipeline with a current SDK so modern payload encodings are used"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Check data is decodable base64 TransformPayload before plan build\nvar tp v1pb.TransformPayload\nif err := protox.DecodeBase64(data, &tp); err != nil {\n    return fmt.Errorf(\"undecodable transform payload: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"if err := exec.UnmarshalPlan(desc); err != nil {\n    if strings.Contains(err.Error(), \"invalid transform payload\") {\n        return fmt.Errorf(\"legacy transform payload undecodable for transform: %w\", err)\n    }\n    return err\n}","preventionTips":["Avoid the legacy Dataflow transform-payload path; use modern URNs handled explicitly in makeLink","Ensure payloads are standard base64-encoded TransformPayload protos","Test pipelines end-to-end with the same SDK version used to build them"],"tags":["go","apache-beam","protobuf","base64"],"backgroundTag":"invalid-argument-format","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"}