{"record":{"id":"6dfb15500f88f8a5","repo":"hashicorp/vagrant","slug":"there-was-an-error-while-downloading-the-metadata","errorCode":null,"errorMessage":"There was an error while downloading the metadata for this box.\nThe error message is shown below:\n\n%{message}","messagePattern":"There was an error while downloading the metadata for this box\\.\nThe error message is shown below:\n\n%(.+?)","errorType":"exception","errorClass":"Vagrant::Errors::BoxMetadataDownloadError","httpStatus":null,"severity":"warning","filePath":"lib/vagrant/action/builtin/box_add.rb","lineNumber":146,"sourceCode":"\n          if expanded && url.length == 1\n            is_error = is_metadata_results.find do |b|\n              b.is_a?(Errors::DownloaderError)\n            end\n\n            if is_error\n              raise Errors::BoxAddShortNotFound,\n                error: is_error.extra_data[:message],\n                name: env[:box_url],\n                url: url\n            end\n          end\n\n          is_error = is_metadata_results.find do |b|\n            b.is_a?(Errors::DownloaderError)\n          end\n          if is_error\n            raise Errors::BoxMetadataDownloadError,  \n              message: is_error.extra_data[:message]\n          end\n\n          is_metadata = is_metadata_results.any? { |b| b === true }\n          if is_metadata && url.length > 1\n            raise Errors::BoxAddMetadataMultiURL,\n              urls: url.join(\", \")\n          end\n\n          if is_metadata\n            url = [url.first, authed_urls.first]\n            add_from_metadata(url, env, expanded)\n          else\n            add_direct(authed_urls, env)\n          end\n\n          @app.call(env)\n        end","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/lib/vagrant/action/builtin/box_add.rb#L128-L164","documentation":"The identical empty-run_list warning in run_chef_zero (chef_zero.rb:57-61), emitted just before CommandBuilder.command(:client, ..., local_mode: true). chef_zero runs chef-client in local mode against an in-guest Chef Zero server, so the run list must come entirely from the Vagrantfile — an empty list (default [] per base_runner.rb:64) means a no-op converge. The command still executes, so the warning is the only hint that provisioning did nothing.","triggerScenarios":"`vagrant provision` with `config.vm.provision \"chef_zero\"` whose block configures cookbooks_path/roles_path/data_bags_path etc. but never adds recipes or roles; or a run list that got emptied by config merging across Vagrantfiles.","commonSituations":"Migrating from chef_solo to chef_zero and dropping the add_recipe lines during the edit; assuming data bags or roles alone trigger convergence; overrides from a wrapper Vagrantfile discarding the inner block's run list.","solutions":["Add recipes/roles in the chef_zero block: chef.add_recipe \"myapp\" and chef.add_role \"base\".","Or set chef.run_list = [\"recipe[myapp]\", \"role[base]\"] explicitly.","Re-run `vagrant provision` and confirm the Chef output shows 'Running handlers' / recipes loaded rather than an instant exit."],"exampleFix":"# Vagrantfile — before\nconfig.vm.provision \"chef_zero\" do |chef|\n  chef.cookbooks_path = \"cookbooks\"\nend\n\n# after\nconfig.vm.provision \"chef_zero\" do |chef|\n  chef.cookbooks_path = \"cookbooks\"\n  chef.add_recipe \"myapp\"\nend","handlingStrategy":"validation","validationCode":"# Vagrantfile — guard inside the chef_zero block\nconfig.vm.provision \"chef_zero\" do |chef|\n  chef.cookbooks_path = \"cookbooks\"\n  chef.add_recipe \"myapp\"\n  raise \"chef_zero run_list is empty — local mode has no server-side run list\" if chef.run_list.empty?\nend","typeGuard":"def chef_run_list_empty?(cfg)\n  cfg.run_list.nil? || cfg.run_list.empty?\nend","tryCatchPattern":null,"preventionTips":["When converting blocks between chef_solo/chef_zero/chef_client, re-check the run list lines survived the edit.","Pin the intent in code: fail the Vagrantfile load if a chef provisioner would converge nothing.","Verify convergence in CI by asserting chef output contains at least one recipe name."],"tags":["chef-zero","chef-client","vagrant","provisioning","run-list"],"backgroundTag":"chef-empty-run-list","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}