{"record":{"id":"9445b033f1af383b","repo":"hashicorp/vagrant","slug":"the-capability-cap-could-not-be-found-this-i","errorCode":null,"errorMessage":"The capability '%{cap}' could not be found. This is an internal error that users should never see. Please report a bug.","messagePattern":"The capability '%(.+?)' could not be found\\. This is an internal error that users should never see\\. Please report a bug\\.","errorType":"exception","errorClass":"Vagrant::Errors::CapabilityNotFound","httpStatus":null,"severity":"error","filePath":"lib/vagrant/capability_host.rb","lineNumber":97,"sourceCode":"    end\n\n    # Tests whether the given capability is possible.\n    #\n    # @param [Symbol] cap_name Capability name\n    # @return [Boolean]\n    def capability?(cap_name)\n      !capability_module(cap_name.to_sym).nil?\n    end\n\n    # Executes the capability with the given name, optionally passing more\n    # arguments onwards to the capability. If the capability returns a value,\n    # it will be returned.\n    #\n    # @param [Symbol] cap_name Name of the capability\n    def capability(cap_name, *args)\n      cap_mod = capability_module(cap_name.to_sym)\n      if !cap_mod\n        raise Errors::CapabilityNotFound,\n          cap:  cap_name.to_s,\n          host: @cap_host_chain[0][0].to_s\n      end\n\n      cap_method = nil\n      begin\n        cap_method = cap_mod.method(cap_name)\n      rescue NameError\n        raise Errors::CapabilityInvalid,\n          cap: cap_name.to_s,\n          host: @cap_host_chain[0][0].to_s\n      end\n\n      args = @cap_args + args\n      @cap_logger.info(\n        \"Execute capability: #{cap_name} #{args.inspect} (#{@cap_host_chain[0][0]})\")\n      cap_method.call(*args)\n    end","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/lib/vagrant/capability_host.rb#L79-L115","documentation":"CapabilityNotFound is raised in CapabilityHost#capability (lib/vagrant/capability_host.rb:97) when capability_module(cap_name.to_sym) returns nil, i.e. no module anywhere in the resolved capability host chain provides that capability name. The error includes the capability and the primary host, and is documented as an internal error users should not see — hitting it usually means a missing/outdated plugin or a bad capability call.","triggerScenarios":"Calling capability(:some_cap) on a guest/host/provider chain where no registered module defines it — e.g. plugin code or a Vagrantfile-adjacent script invoking machine.guest.capability(:not_a_real_cap), or core code calling a capability that only exists when an optional plugin (e.g. a provider guest plugin) is installed.","commonSituations":"Plugins skipped in an expunge/reinstall; version skew where an action expects a capability added in a newer plugin; typos in capability names in custom plugins; capabilities that are provider-specific called on the wrong provider.","solutions":["Update Vagrant and all plugins to matching versions: 'vagrant plugin update' (and upgrade Vagrant itself)","If it comes from your own code, guard the call with capability?(cap_name) before invoking (the predicate exists right above the raise)","Verify the capability name and which plugin provides it in that plugin's source; install the missing plugin","Otherwise report a bug with the stack trace, since the message marks it internal"],"exampleFix":"# before\nmachine.guest.capability(:insert_public_key)\n\n# after\nif machine.guest.capability?(:insert_public_key)\n  machine.guest.capability(:insert_public_key)\nend","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"# built-in predicate: checks the capability chain resolves a module\nreturn unless machine.guest.capability?(:insert_public_key)\nmachine.guest.capability(:insert_public_key)","tryCatchPattern":null,"preventionTips":["Guard optional capabilities with capability? before calling them","Keep Vagrant and plugins version-aligned so expected capabilities exist"],"tags":["vagrant","capability","plugin","dispatch","internal"],"backgroundTag":"plugin-capability-missing","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}