ipfs/kubo · error

unrecognized archive type: %s

Error message

unrecognized archive type: %s

What it means

Fired by unpackArchive in the repo migration tooling when the archive type argument is neither "tar.gz" nor "zip". It is a validation guard over the migration download's archive type; an unexpected value means an unsupported/unknown distribution archive format.

Source

Thrown at repo/fsrepo/migrations/unpack.go:21

import (
	"archive/tar"
	"archive/zip"
	"compress/gzip"
	"errors"
	"fmt"
	"io"
	"os"
)

func unpackArchive(arcPath, atype, root, name, out string) error {
	var err error
	switch atype {
	case "tar.gz":
		err = unpackTgz(arcPath, root, name, out)
	case "zip":
		err = unpackZip(arcPath, root, name, out)
	default:
		err = fmt.Errorf("unrecognized archive type: %s", atype)
	}
	if err != nil {
		return err
	}
	return nil
}

func unpackTgz(arcPath, root, name, out string) error {
	fi, err := os.Open(arcPath)
	if err != nil {
		return fmt.Errorf("cannot open archive file: %w", err)
	}
	defer fi.Close()

	gzr, err := gzip.NewReader(fi)
	if err != nil {
		return fmt.Errorf("error opening gzip reader: %w", err)
	}

View on GitHub (pinned to 329838acdf)

Solutions

  1. Use an archive of type tar.gz or zip
  2. Check for typos if the type came from a URL or config
  3. Re-download the asset from the official source in a supported format
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at repo/fsrepo/migrations/unpack.go:21 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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