{"record":{"id":"cf42bac0b165d96e","repo":"hashicorp/packer","slug":"could-not-find-a-q-file-in-zipfile","errorCode":null,"errorMessage":"could not find a %q file in zipfile","messagePattern":"could not find a %q file in zipfile","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packer/plugin-getter/plugins.go","lineNumber":867,"sourceCode":"\t\t\t\t\tif err != nil {\n\t\t\t\t\t\terrs = multierror.Append(errs, fmt.Errorf(\"zip : %v\", err))\n\t\t\t\t\t\treturn nil, errs\n\t\t\t\t\t}\n\n\t\t\t\t\tvar copyFrom io.ReadCloser\n\t\t\t\t\tfor _, f := range zr.File {\n\t\t\t\t\t\tif f.Name != expectedBinaryFilename {\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcopyFrom, err = f.Open()\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\terrs = multierror.Append(errs, fmt.Errorf(\"failed to open temp file: %w\", err))\n\t\t\t\t\t\t\treturn nil, errs\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tif copyFrom == nil {\n\t\t\t\t\t\terr := fmt.Errorf(\"could not find a %q file in zipfile\", expectedBinaryFilename)\n\t\t\t\t\t\terrs = multierror.Append(errs, err)\n\t\t\t\t\t\treturn nil, errs\n\t\t\t\t\t}\n\n\t\t\t\t\tvar outputFileData bytes.Buffer\n\t\t\t\t\tif _, err := io.Copy(&outputFileData, copyFrom); err != nil {\n\t\t\t\t\t\terr := fmt.Errorf(\"extract file: %w\", err)\n\t\t\t\t\t\terrs = multierror.Append(errs, err)\n\t\t\t\t\t\treturn nil, errs\n\t\t\t\t\t}\n\t\t\t\t\ttmpBinFileName := filepath.Join(os.TempDir(), expectedBinaryFilename)\n\t\t\t\t\ttmpOutputFile, err := os.OpenFile(tmpBinFileName, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0755)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\terr = fmt.Errorf(\"could not create temporary file to download plugin: %w\", err)\n\t\t\t\t\t\terrs = multierror.Append(errs, err)\n\t\t\t\t\t\treturn nil, errs\n\t\t\t\t\t}\n\t\t\t\t\tdefer func() {","sourceCodeStart":849,"sourceCodeEnd":885,"githubUrl":"https://github.com/hashicorp/packer/blob/eb36e3c3e48a036f3e8cc94087636ee72e1303c9/packer/plugin-getter/plugins.go#L849-L885","documentation":"Plugin installation error from InstallLatest: the expected binary (e.g. packer-plugin-docker_v1.2.3_x5.0_linux_amd64) is not among the files in the downloaded zip, so there is nothing to install. Typically a wrong or incomplete release asset.","triggerScenarios":"Thrown at packer/plugin-getter/plugins.go:867 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the release zip actually contains the plugin binary for your OS/arch","Retry with another version or mirror of the plugin release"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"eb36e3c3e48a036f3e8cc94087636ee72e1303c9","analyzedAt":"2026-09-05T13:20:43.127Z","contentChangedAt":"2026-09-05T13:20:43.127Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}