{"record":{"id":"17c268f02186a0fe","repo":"hashicorp/vagrant","slug":"there-was-an-error-while-downloading-the-metadata-17c268","errorCode":null,"errorMessage":"There was an error while downloading the metadata for this box. The error message is shown below:\n\n%{message}","messagePattern":"There was an error while downloading the metadata for this box\\. The error message is shown below:\n\n%(.+?)","errorType":"exception","errorClass":"Vagrant::Errors::BoxMetadataDownloadError","httpStatus":null,"severity":"error","filePath":"lib/vagrant/box.rb","lineNumber":172,"sourceCode":"      tf = Tempfile.new(\"vagrant-load-metadata\")\n      tf.close\n\n      url = @metadata_url\n      if File.file?(url) || url !~ /^[a-z0-9]+:.*$/i\n        url = File.expand_path(url)\n        url = Util::Platform.cygwin_windows_path(url)\n        url = \"file:#{url}\"\n      end\n\n      opts = { headers: [\"Accept: application/json\"] }.merge(download_options)\n      d = Util::Downloader.new(url, tf.path, opts)\n      if @hook\n        @hook.call(:authenticate_box_downloader, downloader: d)\n      end\n      d.download!\n      BoxMetadata.new(File.open(tf.path, \"r\"), url: url)\n    rescue Errors::DownloaderError => e\n      raise Errors::BoxMetadataDownloadError,\n        message: e.extra_data[:message]\n    ensure\n      tf.unlink if tf\n    end\n\n    # Checks if the box has an update and returns the metadata, version,\n    # and provider. If the box doesn't have an update that satisfies the\n    # constraints, it will return nil.\n    #\n    # This will potentially make a network call if it has to load the\n    # metadata from the network.\n    #\n    # @param [String] version Version constraints the update must\n    #   satisfy. If nil, the version constrain defaults to being a\n    #   larger version than this box.\n    # @return [Array]\n    def has_update?(version=nil, download_options: {})\n      if !@metadata_url","sourceCodeStart":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/lib/vagrant/box.rb#L154-L190","documentation":"BoxMetadataDownloadError is raised in Box#load_metadata (lib/vagrant/box.rb:172) when Util::Downloader fails to fetch the box's metadata URL; the DownloaderError's message is embedded. It is the network-facing wrapper for any failure while pulling the catalog JSON that update checks and box adds depend on.","triggerScenarios":"load_metadata builds a Util::Downloader for @metadata_url (with Accept: application/json and any hook-based authentication) and calls d.download!; any Errors::DownloaderError (DNS failure, 404, 5xx, TLS error, proxy refusal) is re-raised as BoxMetadataDownloadError. Hit via 'vagrant box outdated', 'vagrant box update', auto-update checks, or adding from a catalog URL.","commonSituations":"Corporate proxy/MITM filtering blocking app.vagrantup.com or a private Atlas/Vagrant Cloud URL; mistyped or dead metadata_url in internally-hosted catalogs; expired signed URLs; offline machines running update checks.","solutions":["Fetch the metadata URL manually (curl -i <url>) to see the actual HTTP error and share it with whoever hosts the catalog","Fix network/proxy config: set HTTPS_PROXY/HTTP_PROXY, or add CA certs if TLS interception breaks the download","If the URL is dead/renamed, re-add the box from the corrected catalog URL","Disable unwanted automatic checks with 'vagrant box update --no-download' behavior or config.vm.box_check_update = false in the Vagrantfile"],"exampleFix":"# before (Vagrantfile)\nconfig.vm.box_check_update = true\n\n# after (offline/proxied environment)\nconfig.vm.box_check_update = false","handlingStrategy":"retry","validationCode":"require 'net/http'\nuri = URI(box.metadata_url)\nresp = Net::HTTP.get_response(uri)\nraise \"catalog unreachable: HTTP #{resp.code}\" unless resp.code == '200'","typeGuard":null,"tryCatchPattern":"begin\n  box.has_update?\nrescue Vagrant::Errors::BoxMetadataDownloadError => e\n  retry_if_transient(e.message, max: 3) # re-run after backoff; abort on 4xx/proxy errors\nend","preventionTips":["Set config.vm.box_check_update = false on offline/proxied machines","Keep proxy and CA configuration correct so metadata downloads succeed"],"tags":["vagrant","box","metadata","download","network","proxy"],"backgroundTag":"download-failed","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}