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 files

View on GitHub (pinned to 329838acdf)

Solutions

  1. Upgrade kubo so the daemon wiring handles the fetcher type returned by the migrations library
  2. Check the migrations-related config/env (e.g. IPFS_FETCHER / fetch constructor) and reset to defaults
  3. File a bug with the kubo version and startup flags; this branch should be unreachable in stock builds
  4. Run migrations out-of-band (`ipfs repo migrate`) instead of via the daemon path
Defensive patterns

Strategy: fallback

Prevention

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


AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03). Data as JSON: /api/errors/c1c39e2ee57ed609. Report an issue: GitHub.