{"record":{"id":"6cf611a4e1b0b0d6","repo":"kopia/kopia","slug":"unable-to-find-snapshot-manifests","errorCode":null,"errorMessage":"unable to find snapshot manifests","messagePattern":"unable to find snapshot manifests","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"snapshot/manager.go","lineNumber":203,"sourceCode":"\n\treturn successful, nil\n}\n\n// ListSnapshotManifests returns the list of snapshot manifests for a given source or all sources if nil.\nfunc ListSnapshotManifests(ctx context.Context, rep repo.Repository, src *SourceInfo, tags map[string]string) ([]manifest.ID, error) {\n\tlabels := map[string]string{\n\t\ttypeKey: ManifestType,\n\t}\n\n\tif src != nil {\n\t\tlabels = sourceInfoToLabels(*src)\n\t}\n\n\tmaps.Copy(labels, tags)\n\n\tentries, err := rep.FindManifests(ctx, labels)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"unable to find snapshot manifests\")\n\t}\n\n\treturn entryIDs(entries), nil\n}\n\n// FindSnapshotsByRootObjectID returns the list of matching snapshots for a given rootID.\nfunc FindSnapshotsByRootObjectID(ctx context.Context, rep repo.Repository, rootID object.ID) ([]*Manifest, error) {\n\tids, err := ListSnapshotManifests(ctx, rep, nil, nil)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"error listing snapshot manifests\")\n\t}\n\n\tmanifests, err := LoadSnapshots(ctx, rep, ids)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"error loading snapshot manifests\")\n\t}\n\n\tvar result []*Manifest","sourceCodeStart":185,"sourceCodeEnd":221,"githubUrl":"https://github.com/kopia/kopia/blob/82495e54b584c1ef6073c9e1be048f57f8aef078/snapshot/manager.go#L185-L221","documentation":"snapshot.ListSnapshotManifests builds labels from a SourceInfo (optional) plus tags, then calls rep.FindManifests. A storage-level failure from FindManifests is wrapped with \"unable to find snapshot manifests\". An empty result is not an error - only actual enumeration failures produce this.","triggerScenarios":"Calling snapshot.ListSnapshotManifests(ctx, rep, si, tags) when the manifest query fails at the storage layer (backend errors, corrupted index, unreachable repository).","commonSituations":"Maintenance tasks (snapshot delete, GC listing) hitting transient object-store errors; repository index inconsistency; connecting to a partially synchronized repository replica.","solutions":["Check the wrapped error for the underlying storage cause.","Retry the listing operation after transient backend failures.","Verify repository health and rebuild indexes if corrupted (`kopia repository repair-index`)."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if err := rep.Refresh(ctx); err != nil {\n    return fmt.Errorf(\"cannot access repository manifests: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"ids, err := snapshot.ListSnapshotManifests(ctx, rep, si, tags)\nif err != nil {\n    return fmt.Errorf(\"manifest enumeration failed: %w\", err) // empty result is err==nil, len==0\n}","preventionTips":["Treat err==nil with zero entries as a normal empty result, not an error.","Apply retry-with-backoff for cloud storage backends in maintenance jobs.","Keep repository indexes healthy with periodic `kopia maintenance run`."],"tags":["storage","manifest","query"],"backgroundTag":"database-query-failed","analyzedSha":"82495e54b584c1ef6073c9e1be048f57f8aef078","analyzedAt":"2026-09-07T20:35:21.689Z","contentChangedAt":"2026-09-07T20:35:21.689Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}