{"record":{"id":"8002719a009a356a","repo":"hashicorp/terraform","slug":"plugin-download-was-not-found-in-the-location-spec","errorCode":null,"errorMessage":"plugin download was not found in the location specified in the manifest","messagePattern":"plugin download was not found in the location specified in the manifest","errorType":"exception","errorClass":"ErrPluginNotFound","httpStatus":null,"severity":"error","filePath":"internal/pluginshared/errors.go","lineNumber":25,"sourceCode":"\t\"errors\"\n\t\"fmt\"\n)\n\nvar (\n\t// ErrPluginNotSupported is the error returned when the upstream HCP Terraform does not\n\t// have a manifest.\n\tErrPluginNotSupported = errors.New(\"plugin is not supported by the remote version of Terraform Enterprise\")\n\n\t// ErrRequestCanceled is the error returned when the context was cancelled.\n\tErrRequestCanceled = errors.New(\"request was canceled\")\n\n\t// ErrArchNotSupported is the error returned when the plugin does not have a build for the\n\t// current OS/Architecture.\n\tErrArchNotSupported = errors.New(\"plugin is not supported by your computer architecture/operating system\")\n\n\t// ErrPluginNotFound is the error returned when the plugin manifest points to a location\n\t// that was does not exist.\n\tErrPluginNotFound = errors.New(\"plugin download was not found in the location specified in the manifest\")\n)\n\n// ErrQueryFailed is the error returned when the plugin http client request fails\ntype ErrQueryFailed struct {\n\tinner error\n}\n\n// ErrCloudPluginNotVerified is the error returned when the archive authentication process fails\ntype ErrCloudPluginNotVerified struct {\n\tinner error\n}\n\n// Error returns a string representation of ErrQueryFailed\nfunc (e ErrQueryFailed) Error() string {\n\treturn fmt.Sprintf(\"failed to fetch plugin from HCP Terraform: %s\", e.inner)\n}\n\n// Unwrap returns the inner error of ErrQueryFailed","sourceCodeStart":7,"sourceCodeEnd":43,"githubUrl":"https://github.com/hashicorp/terraform/blob/d32a084675427f5ac3f7d2868578ef8b2c1dc525/internal/pluginshared/errors.go#L7-L43","documentation":"ErrPluginNotFound is returned by DownloadFile when the download URL from the manifest returns HTTP 404 (client.go:224-225). The manifest exists and listed a build for this arch, but the actual archive URL it points to is missing — the manifest and the published artifacts are out of sync.","triggerScenarios":"DownloadFile's switch hits case http.StatusNotFound at client.go:224. Common when a release was partially published (manifest updated before artifacts uploaded, or artifacts later removed), the URL was malformed, or a mirror is incomplete.","commonSituations":"Reading a manifest during a release cut-over window; mirror/CDN has not yet propagated the archive; manifest references a build that was yanked; stale cached manifest pointing at retired artifacts.","solutions":["Retry after a short delay if this coincides with a known release window (manifest may be ahead of artifacts).","Force-refresh the manifest (bypass cache / ETag 304) to ensure you are not reading a stale entry.","Verify the download host/path in the manifest is correct and reachable; check the upstream release assets actually exist.","Report to the plugin publisher if the 404 persists — it indicates a broken release."],"exampleFix":"// before\nerr := client.DownloadFile(url, &buf)\nif err != nil {\n    return err\n}\n\n// after\nerr := client.DownloadFile(url, &buf)\nif errors.Is(err, pluginshared.ErrPluginNotFound) {\n    return fmt.Errorf(\"plugin archive %q is missing although the manifest lists it; retry later or report to the publisher\", url)\n}\nif err != nil {\n    return err\n}","handlingStrategy":"retry","validationCode":"n/a — server-side artifact availability; cannot be validated client-side beyond an HTTP HEAD.","typeGuard":"func isPluginNotFound(err error) bool {\n    return errors.Is(err, pluginshared.ErrPluginNotFound)\n}","tryCatchPattern":"err := client.DownloadFile(url, &buf)\nif errors.Is(err, pluginshared.ErrPluginNotFound) {\n    // retry a few times if a release is being published; otherwise report\n    return maybeRetryOnReleaseWindow(err)\n}","preventionTips":["During release cut-overs, retry with backoff before failing.","Force-refresh the manifest to avoid stale entries pointing at yanked artifacts.","Report persistent 404s to the plugin publisher — the release is broken."],"tags":["plugin-download","http-404","release-sync","terraform"],"backgroundTag":null,"analyzedSha":"d32a084675427f5ac3f7d2868578ef8b2c1dc525","analyzedAt":"2026-08-11T18:43:52.779Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}