{"record":{"id":"047ecf790a3eaa32","repo":"apache/beam","slug":"failed-to-parse-artifact-file-payload-stage","errorCode":null,"errorMessage":"failed to parse artifact file payload","messagePattern":"failed to parse artifact file payload","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/runners/universal/runnerlib/stage.go","lineNumber":124,"sourceCode":"\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\tcase *jobpb.ArtifactRequestWrapper_GetArtifact:\n\t\t\tswitch typeUrn := request.GetArtifact.Artifact.TypeUrn; typeUrn {\n\t\t\t// TODO(https://github.com/apache/beam/issues/21459): Legacy Type URN. If requested, provide the binary.\n\t\t\t// To be removed later in 2022, once thoroughly obsolete.\n\t\t\tcase graphx.URNArtifactGoWorker:\n\t\t\t\tif err := stageFile(binary, stream); err != nil {\n\t\t\t\t\tif err == io.EOF {\n\t\t\t\t\t\tcontinue // so we can get the real error from stream.Recv.\n\t\t\t\t\t}\n\t\t\t\t\treturn errors.Wrapf(err, \"failed to stage Go worker binary: %v\", binary)\n\t\t\t\t}\n\t\t\tcase graphx.URNArtifactFileType:\n\t\t\t\ttypePl := pipepb.ArtifactFilePayload{}\n\t\t\t\tif err := proto.Unmarshal(request.GetArtifact.Artifact.TypePayload, &typePl); err != nil {\n\t\t\t\t\treturn errors.Wrap(err, \"failed to parse artifact file payload\")\n\t\t\t\t}\n\t\t\t\tif err := stageFile(typePl.GetPath(), stream); err != nil {\n\t\t\t\t\tif err == io.EOF {\n\t\t\t\t\t\tcontinue // so we can get the real error from stream.Recv.\n\t\t\t\t\t}\n\t\t\t\t\treturn errors.Wrapf(err, \"failed to stage file %v\", typePl.GetPath())\n\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn errors.Errorf(\"request has unexpected artifact type %s\", typeUrn)\n\t\t\t}\n\n\t\tdefault:\n\t\t\treturn errors.Errorf(\"request has unexpected type %T\", request)\n\t\t}\n\t}\n}\n","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/universal/runnerlib/stage.go#L106-L142","documentation":"stageFiles returns this when proto.Unmarshal fails to decode the ArtifactFilePayload for a staged artifact whose type URN is graphx.URNArtifactFileType. The artifact request contained a TypePayload that is not a valid serialized ArtifactFilePayload protobuf.","triggerScenarios":"The artifact request from the server has ArtifactTypePayload bytes that fail proto unmarshaling into pipepb.ArtifactFilePayload — corrupted payload or protocol incompatibility.","commonSituations":"SDK/JobService protobuf version mismatch producing incompatible payload encodings, or a corrupted artifact descriptor in the staging session.","solutions":["Align Beam SDK and job server versions so payload schemas match","Restart the staging session to regenerate artifact descriptors","Inspect the artifact metadata returned by the server for anomalies","Report/upgrade if the job server is emitting non-standard payloads"],"exampleFix":"// before\nif err := proto.Unmarshal(request.GetArtifact().GetTypePayload(), &typePl); err != nil {\n  return errors.Wrap(err, \"failed to parse artifact file payload\")\n}\n// after: upgrade SDK and job server to matching Beam versions, then retry staging","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := submit(...); err != nil && strings.Contains(err.Error(), \"failed to parse artifact file payload\") {\n  // protobuf/schema skew: upgrade SDK and job server to matching versions\n}","preventionTips":["Keep SDK and JobApi protobuf versions aligned","Regenerate/refresh artifact descriptors per staging session","Avoid mixing Beam releases between client and job server"],"tags":["protobuf","artifact-staging","unmarshal","version-skew"],"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"}