{"record":{"id":"bdf3976090b88465","repo":"kopia/kopia","slug":"error-listing-index-blobs-bdf397","errorCode":null,"errorMessage":"error listing index blobs","messagePattern":"error listing index blobs","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"repo/content/indexblob/index_blob_manager_v0.go","lineNumber":112,"sourceCode":"// before which all deleted index entries should be treated as non-existent.\nfunc (m *ManagerV0) ListActiveIndexBlobs(ctx context.Context) ([]Metadata, time.Time, error) {\n\tvar compactionLogMetadata, storageIndexBlobs []blob.Metadata\n\n\tvar eg errgroup.Group\n\n\t// list index and cleanup blobs in parallel.\n\teg.Go(func() error {\n\t\tv, err := blob.ListAllBlobs(ctx, m.st, V0CompactionLogBlobPrefix)\n\t\tcompactionLogMetadata = v\n\n\t\treturn errors.Wrap(err, \"error listing compaction blobs\")\n\t})\n\n\teg.Go(func() error {\n\t\tv, err := blob.ListAllBlobs(ctx, m.st, V0IndexBlobPrefix)\n\t\tstorageIndexBlobs = v\n\n\t\treturn errors.Wrap(err, \"error listing index blobs\")\n\t})\n\n\tif err := eg.Wait(); err != nil {\n\t\treturn nil, time.Time{}, errors.Wrap(err, \"error listing indexes\")\n\t}\n\n\tcontentlog.Log2(ctx, m.log, \"found index blobs\",\n\t\tblobparam.BlobMetadataList(\"storageIndexBlobs\", storageIndexBlobs),\n\t\tblobparam.BlobMetadataList(\"compactionLogMetadata\", compactionLogMetadata))\n\n\tindexMap := map[blob.ID]*Metadata{}\n\taddBlobsToIndex(indexMap, storageIndexBlobs)\n\n\tcompactionLogs, err := m.getCompactionLogEntries(ctx, compactionLogMetadata)\n\tif err != nil {\n\t\treturn nil, time.Time{}, errors.Wrap(err, \"error reading compaction log\")\n\t}\n","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/kopia/kopia/blob/82495e54b584c1ef6073c9e1be048f57f8aef078/repo/content/indexblob/index_blob_manager_v0.go#L94-L130","documentation":"Wraps a failure from blob.ListAllBlobs when listing V0IndexBlobPrefix blobs inside ListActiveIndexBlobs (index_blob_manager_v0.go:112). It runs in parallel with the compaction-log listing; if the storage ListBlobs for index blobs fails, this error is returned and then wrapped as 'error listing indexes'. The repository cannot enumerate its index blobs, so index reads/writes fail.","triggerScenarios":"blob.ListAllBlobs(ctx, m.st, V0IndexBlobPrefix) errors — storage backend list failure (auth, network, throttling) or context cancellation.","commonSituations":"Object storage IAM lacking list permission, transient 503 from the provider, client shutting down and canceling the context mid-list.","solutions":["Inspect the unwrapped storage error to identify auth vs network vs throttling.","Grant list permission on the storage container for the configured credentials.","Retry after the storage backend recovers; the listing is read-only."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Go: preflight listing on the index blob prefix before full enumeration\nif err := st.ListBlobs(ctx, blob.IDPrefix(\"n\"), func(blob.Metadata) error { return nil }); err != nil {\n\treturn errors.Wrap(err, \"index blob listing unavailable\")\n}","typeGuard":null,"tryCatchPattern":"if err := eg.Wait(); err != nil {\n\tif isTransientStorageError(err) { /* retry ListActiveIndexBlobs */ }\n\treturn errors.Wrap(err, \"error listing index blobs\")\n}","preventionTips":["Grant list permission for index blob prefixes to the storage credentials.","Handle eventual-consistency backends with retry on empty/failed lists.","Keep contexts alive for the duration of repository operations."],"tags":["storage","listing","index-blob","go"],"backgroundTag":"http-request-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"}