{"record":{"id":"c1c39e2ee57ed609","repo":"ipfs/kubo","slug":"cannot-get-migrations-from-unknown-fetcher-type","errorCode":null,"errorMessage":"cannot get migrations from unknown fetcher type","messagePattern":"cannot get migrations from unknown fetcher type","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/ipfs/kubo/add_migrations.go","lineNumber":59,"sourceCode":"\t\t\tif migrations.DownloadDirectory != \"\" {\n\t\t\t\tvar paths []string\n\t\t\t\terr := filepath.Walk(migrations.DownloadDirectory, func(filePath string, info os.FileInfo, err error) error {\n\t\t\t\t\tif info.IsDir() {\n\t\t\t\t\t\treturn nil\n\t\t\t\t\t}\n\t\t\t\t\tpaths = append(paths, filePath)\n\t\t\t\t\treturn nil\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\terr = addMigrationFiles(ctx, node, paths, pin)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\tdefault:\n\t\t\treturn errors.New(\"cannot get migrations from unknown fetcher type\")\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// addMigrationFiles adds the files at paths to IPFS, optionally pinning them.\nfunc addMigrationFiles(ctx context.Context, node *core.IpfsNode, paths []string, pin bool) error {\n\tif len(paths) == 0 {\n\t\treturn nil\n\t}\n\tifaceCore, err := coreapi.NewCoreAPI(node)\n\tif err != nil {\n\t\treturn err\n\t}\n\tufs := ifaceCore.Unixfs()\n\n\t// Add migration files","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/cmd/ipfs/kubo/add_migrations.go#L41-L77","documentation":"During daemon startup, addMigrations downloads repo-migration assets and switches on the type of the fetcher that was used. Reaching the default branch means the fetcher is of a type the code doesn't know how to extract migration files from — an internal exhaustiveness guard.","triggerScenarios":"addMigrations is invoked by daemonFunc with a fetcher value that is neither of the recognized fetcher types handled by the switch — effectively only possible if the migrations fetcher configuration/constructor changes or returns an unexpected implementation.","commonSituations":"A kubo build where the migrations library introduced a new fetcher type the daemon wiring doesn't handle; custom builds or forks altering the fetcher selection; a bug in fetcher initialization.","solutions":["Upgrade kubo so the daemon wiring handles the fetcher type returned by the migrations library","Check the migrations-related config/env (e.g. IPFS_FETCHER / fetch constructor) and reset to defaults","File a bug with the kubo version and startup flags; this branch should be unreachable in stock builds","Run migrations out-of-band (`ipfs repo migrate`) instead of via the daemon path"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use stock kubo releases; this branch signals a build/wiring mismatch","Run `ipfs repo migrate` out-of-band if daemon migrations misbehave","Report the bug with version and fetcher config if hit"],"tags":["daemon","migrations","repo-upgrade"],"backgroundTag":"unsupported-fetcher-type","analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}