apache/beam · error
no location for
Error message
no location for %v
What it means
validate finishes by checking that every artifact listed in the manifest was claimed by some location; an artifact still marked fresh has no GCS location and could never be served, so this error is returned. Raised during NewRetrievalServer.
Solutions
- Ensure every staged artifact gets a Location entry (name + GCS URI) before CommitManifest.
- Regenerate the manifest through the standard staging flow so locations are recorded automatically.
- If an artifact genuinely has no blob, remove it from the manifest's artifact list.
- Debug why locations were dropped: compare artifact names vs location names in the uploaded ProxyManifest object in GCS.
Example fix
// before
md := &jobpb.ProxyManifest{Manifest: manifest} // no locations recorded
// after
md := &jobpb.ProxyManifest{Manifest: manifest, Location: locs} // locs has one entry per artifact Defensive patterns
Strategy: validation
Validate before calling
func allArtifactsHaveLocations(md *jobpb.ProxyManifest) error {
located := map[string]bool{}
for _, l := range md.GetLocation() {
located[l.Name] = true
}
for _, a := range md.GetManifest().GetArtifact() {
if !located[a.Name] {
return fmt.Errorf("artifact %v has no location", a.Name)
}
}
return nil
} Try / catch
if err := gcsproxy.NewRetrievalServer(manifestPath); err != nil {
if strings.Contains(err.Error(), "no location for") {
// re-stage so every artifact gets a recorded GCS URI
}
} Prevention
- Record a Location for every artifact in the same staging pass that uploads it.
- Never construct ProxyManifest without the Location field populated.
- Inspect the committed manifest object in GCS when staging behavior seems off.
When it happens
Trigger: md.GetManifest().GetArtifact() contains an artifact whose Name never appears in md.GetLocation(), so after the location loop its keys entry is still true.
Common situations: Location entries lost during manifest merge or truncation; artifact added after locations were computed; a bug in custom staging code that stages artifacts but never records their URIs.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- multiple artifact with name
- multiple locations for
- no artifact named for location
- failed to marshal proxy manifest
- Given message schema
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/4e0f699e73c2ec0d.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/go/pkg/beam/artifact/gcsproxy/retrieval.go:143
if _, seen := keys[a.Name]; seen {
return errors.Errorf("multiple artifact with name %v", a.Name)
}
keys[a.Name] = true
}
for _, l := range md.GetLocation() {
fresh, seen := keys[l.Name]
if !seen {
return errors.Errorf("no artifact named %v for location %v", l.Name, l.Uri)
}
if !fresh {
return errors.Errorf("multiple locations for %v:%v", l.Name, l.Uri)
}
keys[l.Name] = false
}
for key, fresh := range keys {
if fresh {
return errors.Errorf("no location for %v", key)
}
}
return nil
}
func parseObject(blob string) (string, string) {
bucket, object, err := gcsx.ParseObject(blob)
if err != nil {
panic(err)
}
return bucket, object
}
View on GitHub (pinned to 12126d8942)