{"record":{"id":"f322b2445cf9f30e","repo":"apache/beam","slug":"failed-to-parse-artifact-url-payload","errorCode":null,"errorMessage":"failed to parse artifact url payload","messagePattern":"failed to parse artifact url payload","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/artifact/materialize.go","lineNumber":122,"sourceCode":"\tvar list []retrievable\n\tfor _, dep := range resolution.Replacements {\n\t\tpath, err := extractStagingToPath(dep)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tfilePayload := pipepb.ArtifactFilePayload{\n\t\t\tPath: path,\n\t\t}\n\t\tif dep.TypeUrn == URNFileArtifact {\n\t\t\ttypePayload := pipepb.ArtifactFilePayload{}\n\t\t\tif err := proto.Unmarshal(dep.TypePayload, &typePayload); err != nil {\n\t\t\t\treturn nil, errors.Wrap(err, \"failed to parse artifact file payload\")\n\t\t\t}\n\t\t\tfilePayload.Sha256 = typePayload.Sha256\n\t\t} else if dep.TypeUrn == URNUrlArtifact {\n\t\t\ttypePayload := pipepb.ArtifactUrlPayload{}\n\t\t\tif err := proto.Unmarshal(dep.TypePayload, &typePayload); err != nil {\n\t\t\t\treturn nil, errors.Wrap(err, \"failed to parse artifact url payload\")\n\t\t\t}\n\t\t\tfilePayload.Sha256 = typePayload.Sha256\n\t\t}\n\t\tnewTypePayload, err := proto.Marshal(&filePayload)\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrap(err, \"failed to create artifact type payload\")\n\t\t}\n\t\tartifacts = append(artifacts, &pipepb.ArtifactInformation{\n\t\t\tTypeUrn:     URNFileArtifact,\n\t\t\tTypePayload: newTypePayload,\n\t\t\tRoleUrn:     dep.RoleUrn,\n\t\t\tRolePayload: dep.RolePayload,\n\t\t})\n\n\t\trolePayload, err := proto.Marshal(&pipepb.ArtifactStagingToRolePayload{\n\t\t\tStagedName: path,\n\t\t})\n\t\tif err != nil {","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/artifact/materialize.go#L104-L140","documentation":"Error returned by newMaterializeWithClient when proto.Unmarshal of a dependency's TypePayload into ArtifactUrlPayload fails for a URN_URL_ARTIFACT dependency. It means the pipeline's artifact metadata contains a url-artifact type payload that is not a validly encoded ArtifactUrlPayload proto — typically a corrupted or version-mismatched pipeline artifact resolution.","triggerScenarios":"dep.TypeUrn == URNUrlArtifact with TypePayload that is empty, truncated, or serialized from a different message type — proto.Unmarshal fails.","commonSituations":"SDK version mismatch producing incompatible URL artifact payloads; manually crafted artifact information in custom runners; corrupted pipeline proto transport.","solutions":["Ensure the producer serializes ArtifactUrlPayload for URL artifacts and align SDK versions","Validate dep.TypePayload before materialization (try a test unmarshal of ArtifactUrlPayload)","Regenerate the artifact metadata with the current Beam tooling"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"var p pipepb.ArtifactUrlPayload\nif err := proto.Unmarshal(dep.TypePayload, &p); err != nil {\n    return fmt.Errorf(\"dependency %s has invalid url payload\", dep.TypeUrn)\n}","typeGuard":null,"tryCatchPattern":"if _, err := newMaterialize(ctx, deps...); err != nil && strings.Contains(err.Error(), \"failed to parse artifact url payload\") {\n    // regenerate artifact metadata with correct ArtifactUrlPayload proto\n}","preventionTips":["Serialize ArtifactUrlPayload (not FilePayload) for URNUrlArtifact dependencies","Keep proto definitions in sync across SDKs","Test URL artifact materialization in cross-language pipelines"],"tags":["protobuf","artifact","url","pipeline"],"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"}