{"record":{"id":"d2a32acfb3d0e9df","repo":"hashicorp/packer","slug":"wrong-version-s-does-not-match-expected-s-d2a32a","errorCode":null,"errorMessage":"wrong version: %s does not match expected %s","messagePattern":"wrong version: (.+?) does not match expected (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packer/plugin-getter/remote/getter.go","lineNumber":301,"sourceCode":"\t\t\treturn fmt.Errorf(\"malformed filename %s: version %q must have a v prefix alongside a protocol version\", filename, parts[0])\n\t\t}\n\t\tentry.BinVersion, entry.ProtVersion, entry.Os, entry.Arch = parts[0], parts[1], parts[2], parts[3]\n\tcase len(parts) == 3 && !strings.HasPrefix(parts[0], \"v\"):\n\t\tentry.BinVersion, entry.Os, entry.Arch = \"v\"+parts[0], parts[1], parts[2]\n\t\tentry.ProtVersion = \"\"\n\tdefault:\n\t\treturn fmt.Errorf(\n\t\t\t\"malformed filename %s: expected %s{version}_x{protocol-version}_{os}_{arch} or %s{version}_{os}_{arch}\",\n\t\t\tfilename, req.FilenamePrefix(), req.FilenamePrefix())\n\t}\n\n\treturn nil\n}\n\nfunc (g *Getter) Validate(opt plugingetter.GetOptions, expectedVersion string, installOpts plugingetter.BinaryInstallationOptions, entry *plugingetter.ChecksumFileEntry) error {\n\texpectedBinVersion := \"v\" + expectedVersion\n\tif entry.BinVersion != expectedBinVersion {\n\t\treturn fmt.Errorf(\"wrong version: %s does not match expected %s\", entry.BinVersion, expectedBinVersion)\n\t}\n\tif entry.Os != installOpts.OS || entry.Arch != installOpts.ARCH {\n\t\treturn fmt.Errorf(\"wrong system, expected %s_%s\", installOpts.OS, installOpts.ARCH)\n\t}\n\n\tif entry.ProtVersion == \"\" {\n\t\t// The protocol version was resolved from the version's manifest.json\n\t\t// when its checksum file was fetched.\n\t\tpv, ok := g.protVersions[opt.VersionString()]\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"no protocol version known for version %s\", expectedVersion)\n\t\t}\n\t\tentry.ProtVersion = pv\n\t}\n\n\treturn installOpts.CheckProtocolVersion(entry.ProtVersion)\n}\n","sourceCodeStart":283,"sourceCodeEnd":319,"githubUrl":"https://github.com/hashicorp/packer/blob/eb36e3c3e48a036f3e8cc94087636ee72e1303c9/packer/plugin-getter/remote/getter.go#L283-L319","documentation":"Remote getter error from Validate: the version parsed from the checksum entry's filename doesn't equal the version selected for installation (missing the expected v-prefixed semver), indicating the checksum file lists a different build than the one downloaded.","triggerScenarios":"Thrown at packer/plugin-getter/remote/getter.go:301 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the checksum file corresponds to the exact release version being installed","Re-sync the mirror so index.json, checksums, and assets are from the same release"],"exampleFix":null,"handlingStrategy":"validation","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"}