hashicorp/packer · error
malformed manifest.json for version %s: %w
Error message
malformed manifest.json for version %s: %w
What it means
resolveProtocolVersion downloads a plugin version's manifest.json and parses it to cache the plugin protocol version used by Validate. This error fires when the fetched manifest is unparseable or structurally invalid (e.g. missing/ill-formed checksum entries), wrapped with the underlying cause. It usually indicates a corrupted or non-standard release published for that plugin version; reinstall the plugin or use a different version.
Source
Thrown at packer/plugin-getter/remote/getter.go:203
version, idx.pluginType, g.BaseURL, dir)
}
return idx, g.BaseURL + "/" + dir + "/" + version, nil
}
// resolveProtocolVersion reads the plugin protocol version from a version's
// manifest.json and caches it for Validate.
func (g *Getter) resolveProtocolVersion(versionURL, pluginType, version string) error {
if _, ok := g.protVersions[version]; ok {
return nil
}
data, err := g.fetch(versionURL + "/" + pluginType + "_" + version + "_manifest.json")
if err != nil {
return fmt.Errorf(
"%w\nThe checksum entries of this version carry no plugin protocol version in their names, so the mirrored version must include its manifest.json, as published on releases.hashicorp.com", err)
}
var meta plugingetter.ManifestMeta
if err := json.Unmarshal(data, &meta); err != nil {
return fmt.Errorf("malformed manifest.json for version %s: %w", version, err)
}
if meta.Metadata.ProtocolVersion == "" {
return fmt.Errorf("manifest.json for version %s declares no protocol_version", version)
}
if g.protVersions == nil {
g.protVersions = map[string]string{}
}
g.protVersions[version] = "x" + meta.Metadata.ProtocolVersion
return nil
}
func (g *Getter) Get(what string, opts plugingetter.GetOptions) (io.ReadCloser, error) {
log.Printf("[TRACE] Getting %s of %s plugin from %s", what, opts.PluginRequirement.Identifier, g.Name)
switch what {
case "releases":
idx, _, err := g.loadIndex(opts)
if err != nil {View on GitHub (pinned to eb36e3c3e4)
Solutions
- Fix or replace the mirror's manifest.json with the file published on releases.hashicorp.com
- Bypass the mirror and install from the official release endpoint
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at packer/plugin-getter/remote/getter.go:203 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
AI-assisted analysis of hashicorp/packer@eb36e3c3e4 (2026-09-05).
Data as JSON: /api/errors/195985cd5b195f81.
Report an issue: GitHub.