{"record":{"id":"b6a29c443c52c59a","repo":"dgraph-io/badger","slug":"manifest-has-unsupported-version-d-we-support","errorCode":null,"errorMessage":"manifest has unsupported version: %d (we support %d).\nPlease see https://github.com/dgraph-io/badger/blob/main/docs/troubleshooting.md#i-see-manifest-has-unsupported-version-x-we-support-y-error on how to fix this","messagePattern":"manifest has unsupported version: (.+?) \\(we support (.+?)\\)\\.\nPlease see https://github\\.com/dgraph-io/badger/blob/main/docs/troubleshooting\\.md#i-see-manifest-has-unsupported-version-x-we-support-y-error on how to fix this","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"manifest.go","lineNumber":370,"sourceCode":"// that).  In normal conditions, truncOffset is the file size.\nfunc ReplayManifestFile(fp *os.File, extMagic uint16, opt Options) (Manifest, int64, error) {\n\tr := countingReader{wrapped: bufio.NewReader(fp)}\n\n\tvar magicBuf [8]byte\n\tif _, err := io.ReadFull(&r, magicBuf[:]); err != nil {\n\t\treturn Manifest{}, 0, errBadMagic\n\t}\n\tif !bytes.Equal(magicBuf[0:4], magicText[:]) {\n\t\treturn Manifest{}, 0, errBadMagic\n\t}\n\n\textVersion := y.BytesToU16(magicBuf[4:6])\n\tversion := y.BytesToU16(magicBuf[6:8])\n\n\tif version != badgerMagicVersion {\n\t\treturn Manifest{}, 0,\n\t\t\t//nolint:lll\n\t\t\tfmt.Errorf(\"manifest has unsupported version: %d (we support %d).\\n\"+\n\t\t\t\t\"Please see https://github.com/dgraph-io/badger/blob/main/docs/troubleshooting.md#i-see-manifest-has-unsupported-version-x-we-support-y-error\"+\n\t\t\t\t\" on how to fix this\",\n\t\t\t\tversion, badgerMagicVersion)\n\t}\n\tif extVersion != extMagic {\n\t\treturn Manifest{}, 0,\n\t\t\tfmt.Errorf(\"cannot open DB because the external magic number doesn't match, \"+\n\t\t\t\t\"expected: %d, version present in manifest: %d\", extMagic, extVersion)\n\t}\n\n\tstat, err := fp.Stat()\n\tif err != nil {\n\t\treturn Manifest{}, 0, err\n\t}\n\n\tbuild := createManifest()\n\tvar offset int64\n\tfor {","sourceCodeStart":352,"sourceCodeEnd":388,"githubUrl":"https://github.com/dgraph-io/badger/blob/2a001d466f6b71a917319a1db41f99860e16e269/manifest.go#L352-L388","documentation":"Error \"manifest has unsupported version: %d (we support %d).\nPlease see https://github.com/dgraph-io/badger/blob/main/docs/troubleshooting.md#i-see-manifest-has-unsupported-version-x-we-support-y-error on how to fix this\" thrown in dgraph-io/badger.","triggerScenarios":"Thrown at manifest.go:370 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the on-disk version in the error against your binary: the MANIFEST was written by a newer (or much older) Badger release than the code you are running","Upgrade the badger/v4 dependency to at least the version that wrote the database, then reopen","If downgrade is intended, export/dump the data with the newer version and re-import into a database created by the older version","Alternatively start a fresh database directory with the current binary and restore data from backup"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2a001d466f6b71a917319a1db41f99860e16e269","analyzedAt":"2026-09-05T13:00:02.264Z","contentChangedAt":"2026-09-05T13:00:02.264Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}