{"record":{"id":"f6590f24d246a530","repo":"hashicorp/vagrant","slug":"the-information-file-that-you-ve-attempted-to-incl","errorCode":null,"errorMessage":"The information file that you've attempted to include doesn't exist or isn't a valid JSON file. Please check that the file exists and is titled 'info.json' and try again.","messagePattern":"The information file that you've attempted to include doesn't exist or isn't a valid JSON file\\. Please check that the file exists and is titled 'info\\.json' and try again\\.","errorType":"exception","errorClass":"Vagrant::Errors::PackageInvalidInfo","httpStatus":null,"severity":"error","filePath":"lib/vagrant/action/general/package.rb","lineNumber":84,"sourceCode":"          @app = app\n\n          env[\"package.files\"]  ||= {}\n          env[\"package.info\"]   ||= \"\"\n          env[\"package.output\"] ||= \"package.box\"\n\n          @fullpath = self.class.fullpath(env[\"package.output\"])\n        end\n\n        def call(env)\n          @env = env\n\n          self.class.validate!(env[\"package.output\"], env[\"package.directory\"])\n\n          package_with_folder_path if env[\"package.output\"].include?(File::SEPARATOR)\n\n          raise Errors::PackageOutputDirectory if File.directory?(fullpath)\n\n          raise Errors::PackageInvalidInfo if invalid_info?\n\n          @app.call(env)\n\n          @env[:ui].info I18n.t(\"vagrant.actions.general.package.compressing\", fullpath: fullpath)\n\n          copy_include_files\n          copy_info\n          setup_private_key\n          write_metadata_json\n          compress\n        end\n\n        def package_with_folder_path\n          folder_path = File.expand_path(\"..\", @fullpath)\n          create_box_folder(folder_path) unless File.directory?(folder_path)\n        end\n\n        def create_box_folder(folder_path)","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/lib/vagrant/action/general/package.rb#L66-L102","documentation":"When packaging with an info file (env[\"package.info\"], surfaced by tooling/plugins that drive `vagrant package`), invalid_info? requires the path to be an existing file whose basename is exactly 'info.json'. If the path is empty of nothing — but when set and the file is missing or named differently, PackageInvalidInfo is raised. (Despite the message mentioning JSON validity, the code checks existence and filename only.)","triggerScenarios":"Setting package.info to a path that does not exist, or to a file not named info.json (e.g. metadata.json, box_info.json) — via the package command's info option in tooling that exposes it, or programmatically through the Package action (lib/vagrant/action/general/package.rb:84, :237-244).","commonSituations":"Custom packaging scripts renaming the info file for clarity; passing a relative path that doesn't resolve from the cwd vagrant runs in; stale docs referencing an arbitrary filename.","solutions":["Rename the file to exactly `info.json` and keep it in place.","Verify the path you pass exists from the directory where vagrant runs (`ls $(pwd)/path/to/info.json`); prefer absolute paths.","Validate the file's contents parse as JSON (`python3 -m json.tool info.json`) so downstream consumers don't choke.","If you didn't intend to ship an info file, unset/drop the option entirely — when package.info is empty the check is skipped."],"exampleFix":"# before\nvagrant package --output my.box --info ./box-metadata.json   # wrong name\n\n# after\nmv box-metadata.json info.json\nvagrant package --output my.box --info ./info.json","handlingStrategy":"validation","validationCode":"# Ruby: validate the info file before packaging\ninfo = ENV[\"PACKAGE_INFO\"]\nif info && !info.empty?\n  abort \"info file missing\" unless File.file?(info)\n  abort \"must be named info.json\" unless File.basename(info) == \"info.json\"\n  require \"json\"; JSON.parse(File.read(info))\nend","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Name the packaging info file exactly `info.json` — the basename is part of the contract.","Pass absolute paths for the info file so cwd changes don't break packaging scripts.","JSON-parse the file in your packaging pipeline so content errors surface before vagrant runs."],"tags":["vagrant","package","packaging","info-json"],"backgroundTag":"invalid-input-file","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}