{"record":{"id":"b6980645c69025b5","repo":"ipfs/kubo","slug":"error-opening-zip-reader-w","errorCode":null,"errorMessage":"error opening zip reader: %w","messagePattern":"error opening zip reader: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"repo/fsrepo/migrations/unpack.go","lineNumber":71,"sourceCode":"\t\t}\n\n\t\tif th.Name == lookFor {\n\t\t\tbin = tarr\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif bin == nil {\n\t\treturn errors.New(\"no binary found in archive\")\n\t}\n\n\treturn writeToPath(bin, out)\n}\n\nfunc unpackZip(arcPath, root, name, out string) error {\n\tzipr, err := zip.OpenReader(arcPath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error opening zip reader: %w\", err)\n\t}\n\tdefer zipr.Close()\n\n\tlookFor := root + \"/\" + name\n\tvar bin io.ReadCloser\n\tfor _, fis := range zipr.File {\n\t\tif fis.Name == lookFor {\n\t\t\trc, err := fis.Open()\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"error extracting binary from archive: %w\", err)\n\t\t\t}\n\n\t\t\tbin = rc\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif bin == nil {","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/repo/fsrepo/migrations/unpack.go#L53-L89","documentation":"Raised by unpackZip when zip.OpenReader fails to open the migrations archive at arcPath; the wrapped error usually indicates the file is missing, unreadable, or not a valid zip archive, so no entries (including the expected binary) can be listed.","triggerScenarios":"Thrown at repo/fsrepo/migrations/unpack.go:71 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the download for an intact archive","Check the download directory permissions","Download the asset manually if it persists"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}