{"record":{"id":"0b55c6c4d853f5e4","repo":"kopia/kopia","slug":"unable-to-convert-entry-to-info","errorCode":null,"errorMessage":"unable to convert entry to info","messagePattern":"unable to convert entry to info","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"repo/content/index/index_v1.go","lineNumber":246,"sourceCode":"// GetInfo returns information about a given content. If a content is not found, nil is returned.\nfunc (b *indexV1) GetInfo(contentID ID, result *Info) (bool, error) {\n\tvar entryBuf [v1MaxEntrySize]byte\n\n\te, err := b.findEntry(entryBuf[:0], contentID)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\tif e == nil {\n\t\treturn false, nil\n\t}\n\n\tif len(e) != v1EntryLength {\n\t\treturn false, errors.Errorf(\"invalid entry length: %v\", len(e))\n\t}\n\n\tif err := b.entryToInfoStruct(contentID, e, result); err != nil {\n\t\treturn false, errors.Wrap(err, \"unable to convert entry to info\")\n\t}\n\n\treturn true, nil\n}\n\n// Close closes the index.\nfunc (b *indexV1) Close() error {\n\tif closer := b.closer; closer != nil {\n\t\treturn errors.Wrap(closer(), \"error closing index file\")\n\t}\n\n\treturn nil\n}\n\nvar errInvalidKeySize = errors.New(\"invalid key length\")\n\ntype indexBuilderV1 struct {\n\tpackBlobIDOffsets map[blob.ID]uint32","sourceCodeStart":228,"sourceCodeEnd":264,"githubUrl":"https://github.com/kopia/kopia/blob/82495e54b584c1ef6073c9e1be048f57f8aef078/repo/content/index/index_v1.go#L228-L264","documentation":"This wraps any error returned by entryToInfoStruct while converting a fixed-length v1 entry's raw bytes into an Info struct (e.g. invalid compression header byte or pack offset decoding failure). The library throws it to add context: an entry was found in the index, but its value bytes could not be decoded into content metadata. It almost always accompanies an underlying decode error.","triggerScenarios":"Calling GetInfo on an indexV1 entry whose packed value bits (flags, pack offset/length fields) are invalid — e.g. a reserved/unknown compression header ID byte in a corrupt or future-format entry.","commonSituations":"Index blobs written by a newer kopia version being read by an older binary, corrupted cache/index data, or storage returning stale/partial blobs.","solutions":["Upgrade to a matching (or newer) kopia version so all entry fields decode correctly","Clear the local index/content cache and re-sync indexes from storage","Run repository verification/repair to detect and rebuild corrupt index blobs","Inspect the wrapped (Cause) error for the specific decoding failure"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"found, err := idx.GetInfo(contentID, &info)\nif err != nil {\n    var unwrapped error = errors.Unwrap(err)\n    log.Printf(\"index entry decode failed: %v (cause: %v)\", err, unwrapped)\n    return fmt.Errorf(\"content %v: %w\", contentID, err)\n}","preventionTips":["Upgrade kopia binaries before they read indexes written by newer versions","Monitor for storage bit-rot with checksum verification","Rebuild index caches after version downgrades","Inspect wrapped causes to distinguish decode vs I/O failures"],"tags":["index","decoding","corruption"],"backgroundTag":"schema-validation-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"}