apache/beam · error
failed to parse artifact url payload
Error message
failed to parse artifact url payload
What it means
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.
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
Defensive patterns
Strategy: validation
Validate before calling
var p pipepb.ArtifactUrlPayload
if err := proto.Unmarshal(dep.TypePayload, &p); err != nil {
return fmt.Errorf("dependency %s has invalid url payload", dep.TypeUrn)
} Try / catch
if _, err := newMaterialize(ctx, deps...); err != nil && strings.Contains(err.Error(), "failed to parse artifact url payload") {
// regenerate artifact metadata with correct ArtifactUrlPayload proto
} Prevention
- Serialize ArtifactUrlPayload (not FilePayload) for URNUrlArtifact dependencies
- Keep proto definitions in sync across SDKs
- Test URL artifact materialization in cross-language pipelines
When it happens
Trigger: dep.TypeUrn == URNUrlArtifact with TypePayload that is empty, truncated, or serialized from a different message type — proto.Unmarshal fails.
Common situations: SDK version mismatch producing incompatible URL artifact payloads; manually crafted artifact information in custom runners; corrupted pipeline proto transport.
Understand the failure class
Background: "cannot parse invalid wire-format data", "cannot unmarshal", "failed unmarshalling": protobuf unmarshal errors explained — this error's family across 10 libraries.
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- failed to create artifact type payload
- failed to parse artifact file payload
- Aliased enumerations not currently supported.
- Any not yet supported
- artifact not found
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/f322b2445cf9f30e.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/go/pkg/beam/artifact/materialize.go:122
var list []retrievable
for _, dep := range resolution.Replacements {
path, err := extractStagingToPath(dep)
if err != nil {
return nil, err
}
filePayload := pipepb.ArtifactFilePayload{
Path: path,
}
if dep.TypeUrn == URNFileArtifact {
typePayload := pipepb.ArtifactFilePayload{}
if err := proto.Unmarshal(dep.TypePayload, &typePayload); err != nil {
return nil, errors.Wrap(err, "failed to parse artifact file payload")
}
filePayload.Sha256 = typePayload.Sha256
} else if dep.TypeUrn == URNUrlArtifact {
typePayload := pipepb.ArtifactUrlPayload{}
if err := proto.Unmarshal(dep.TypePayload, &typePayload); err != nil {
return nil, errors.Wrap(err, "failed to parse artifact url payload")
}
filePayload.Sha256 = typePayload.Sha256
}
newTypePayload, err := proto.Marshal(&filePayload)
if err != nil {
return nil, errors.Wrap(err, "failed to create artifact type payload")
}
artifacts = append(artifacts, &pipepb.ArtifactInformation{
TypeUrn: URNFileArtifact,
TypePayload: newTypePayload,
RoleUrn: dep.RoleUrn,
RolePayload: dep.RolePayload,
})
rolePayload, err := proto.Marshal(&pipepb.ArtifactStagingToRolePayload{
StagedName: path,
})
if err != nil {View on GitHub (pinned to 12126d8942)