{"record":{"id":"985072bc9de643e3","repo":"hashicorp/vagrant","slug":"the-plugins-failed-to-load-properly-the-error-mes","errorCode":null,"errorMessage":"The plugins failed to load properly. The error message given is\nshown below.\n\n%{message}","messagePattern":"The plugins failed to load properly\\. The error message given is\nshown below\\.\n\n%(.+?)","errorType":"exception","errorClass":"Vagrant::Errors::PluginLoadError","httpStatus":null,"severity":"error","filePath":"lib/vagrant/plugin/manager.rb","lineNumber":374,"sourceCode":"                  raise\n                end\n              end\n            else\n              @logger.debug(\"Loading plugin `#{plugin_name}` with custom require: `#{plugin_info[\"require\"]}`\")\n              require plugin_info[\"require\"]\n            end\n            @logger.debug(\"Successfully loaded plugin `#{plugin_name}`.\")\n          end\n          if defined?(::Bundler)\n            @logger.debug(\"Bundler detected in use. Loading `:plugins` group.\")\n            ::Bundler.require(:plugins)\n          end\n        rescue ScriptError, StandardError => err\n          @logger.error(\"Plugin loading error: #{err.class} - #{err}\")\n          err.backtrace.each do |backtrace_line|\n            @logger.debug(backtrace_line)\n          end\n          raise Vagrant::Errors::PluginLoadError, message: err.to_s\n        end\n        nil\n      end\n\n      # Check if the requested plugin is installed\n      #\n      # @param [String] name Name of plugin\n      # @param [String] version Specific version of the plugin\n      # @return [Boolean]\n      def plugin_installed?(name, version=nil)\n        # Make the requirement object\n        version = Gem::Requirement.new([version.to_s]) if version\n\n        # If plugins are loaded, check for match in loaded specs\n        if ready?\n          return installed_specs.any? do |s|\n            match = s.name == name\n            next match if !version","sourceCodeStart":356,"sourceCodeEnd":392,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/lib/vagrant/plugin/manager.rb#L356-L392","documentation":"Raised from Vagrant::Plugin::Manager#load_plugins when requiring an installed plugin's gem files — or running ::Bundler.require(:plugins) — raises any ScriptError or StandardError (lib/vagrant/plugin/manager.rb:374). Typical causes: a plugin written against a different Vagrant plugin API version, an uncompiled native extension, a missing runtime dependency, or plugin code that raises at require time. Plugins load during Vagrant startup, so this can surface on any `vagrant` command, and %{message} contains the original exception text.","triggerScenarios":"Any vagrant invocation after a plugin is installed whose gem fails to require: LoadError for the plugin's own dependencies, SyntaxError in plugin code, NameError from API changes (e.g. a v1-era plugin touching removed constants), or a native extension built for a different Ruby than the new embedded one.","commonSituations":"Upgrading Vagrant (embedded Ruby major bump) without upgrading plugins; abandoned plugins incompatible with the current Vagrant; a gem install that left a broken native extension; plugin depending on a gem excluded from Vagrant's bundled environment.","solutions":["Identify the failing plugin from the %{message} text (class name or gem path) and cross-check with `vagrant plugin list`","Run `vagrant plugin update <name>` — a newer release may support your Vagrant version","If no fixed release exists, `vagrant plugin uninstall <name>` to get Vagrant bootable again","If uninstall also fails at startup, back up and remove the plugin's entry from ~/.vagrant.d/plugins.json by hand, then delete its gem from ~/.vagrant.d/gems"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"begin\n  env = Vagrant::Environment.new\n  env.load_plugins rescue Vagrant::Errors::PluginLoadError => e\n    warn \"plugin failed to load: #{e.message}\"\n    # identify and uninstall the offender, or restore a backup of plugins.json\n  end","preventionTips":["After every Vagrant upgrade, run `vagrant plugin list` and update all plugins","Install only maintained plugins; check their README for supported Vagrant versions","Keep a backup of a known-good ~/.vagrant.d/plugins.json to restore after a bad install","Avoid raising from plugin code at require time; defer work to command registration"],"tags":["plugins","load-error","startup","compatibility"],"backgroundTag":"plugin-load-failed","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}