ipfs/kubo · error
error opening gzip reader: %w
Error message
error opening gzip reader: %w
What it means
Fired by unpackTgz when gzip.NewReader fails on the opened archive — the file exists but is not valid gzip data (corrupted download, wrong format). It wraps the gzip error and aborts migration binary extraction.
Source
Thrown at repo/fsrepo/migrations/unpack.go:38
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)
}
defer gzr.Close()
var bin io.Reader
tarr := tar.NewReader(gzr)
lookFor := root + "/" + name
for {
th, err := tarr.Next()
if err != nil {
if err == io.EOF {
break
}
return fmt.Errorf("cannot read archive: %w", err)
}
if th.Name == lookFor {
bin = tarrView on GitHub (pinned to 329838acdf)
Solutions
- Retry to get a fresh download; truncated transfers are the usual cause
- Check proxy/AV interference that can mangle binary downloads
- Download the migration archive manually if it persists
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at repo/fsrepo/migrations/unpack.go:38 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/cb1a21bd1f8e4085.
Report an issue: GitHub.