ipfs/kubo · error
cannot get migrations from unknown fetcher type
Error message
cannot get migrations from unknown fetcher type
What it means
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.
Source
Thrown at cmd/ipfs/kubo/add_migrations.go:59
if migrations.DownloadDirectory != "" {
var paths []string
err := filepath.Walk(migrations.DownloadDirectory, func(filePath string, info os.FileInfo, err error) error {
if info.IsDir() {
return nil
}
paths = append(paths, filePath)
return nil
})
if err != nil {
return err
}
err = addMigrationFiles(ctx, node, paths, pin)
if err != nil {
return err
}
}
default:
return errors.New("cannot get migrations from unknown fetcher type")
}
}
return nil
}
// addMigrationFiles adds the files at paths to IPFS, optionally pinning them.
func addMigrationFiles(ctx context.Context, node *core.IpfsNode, paths []string, pin bool) error {
if len(paths) == 0 {
return nil
}
ifaceCore, err := coreapi.NewCoreAPI(node)
if err != nil {
return err
}
ufs := ifaceCore.Unixfs()
// Add migration filesView on GitHub (pinned to 329838acdf)
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
Defensive patterns
Strategy: fallback
Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- nothing downloaded by ipfs fetcher
- fs-repo requires migration
- external migration phase failed: %w
- embedded migration phase failed: %w
- ipfs api address could not be found
AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03).
Data as JSON: /api/errors/c1c39e2ee57ed609.
Report an issue: GitHub.