{"record":{"id":"22cbe2ef7f165125","repo":"quarkusio/quarkus","slug":"unknown-plugin-type","errorCode":null,"errorMessage":"Unknown plugin type!","messagePattern":"Unknown plugin type!","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"devtools/cli/src/main/java/io/quarkus/cli/plugin/PluginCommandFactory.java","lineNumber":50,"sourceCode":"\n    private Optional<PluginCommand> createPluginCommand(Plugin plugin) {\n        switch (plugin.getType()) {\n            case maven:\n                return plugin.getLocation().flatMap(PluginUtil::checkGACTV).map(g -> new JBangCommand(toGAVC(g), output));\n            case java:\n            case jar:\n            case jbang:\n                return plugin.getLocation().map(l -> new JBangCommand(l, output));\n            case executable:\n                return plugin.getLocation().map(l -> new ShellCommand(plugin.getName(), Paths.get(l), output));\n            case extension:\n                if (PluginUtil.checkGACTV(plugin.getLocation()).isPresent()) {\n                    return plugin.getLocation().flatMap(PluginUtil::checkGACTV).map(g -> new JBangCommand(toGAVC(g), output));\n                } else if (plugin.getLocation().filter(l -> l.endsWith(\".jar\")).isPresent()) {\n                    return plugin.getLocation().map(l -> new JBangCommand(l, output));\n                }\n            default:\n                throw new IllegalStateException(\"Unknown plugin type!\");\n        }\n    }\n\n    /**\n     * Create a command for the specified plugin\n     */\n    public Optional<CommandSpec> createCommand(Plugin plugin) {\n        return createPluginCommand(plugin).map(createCommandSpec(plugin.getDescription().orElse(\"\")));\n    }\n\n    public Function<PluginCommand, CommandSpec> createCommandSpec(String description) {\n        return command -> {\n            CommandSpec spec = CommandSpec.wrapWithoutInspection(command);\n            if (!StringUtil.isNullOrEmpty(description)) {\n                spec.usageMessage().description(description);\n            }\n            spec.parser().unmatchedArgumentsAllowed(true);\n            spec.parser().unmatchedOptionsArePositionalParams(true);","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/cli/src/main/java/io/quarkus/cli/plugin/PluginCommandFactory.java#L32-L68","documentation":"PluginCommandFactory.createPluginCommand hits this IllegalStateException when a Quarkus CLI plugin descriptor has a PluginType that the factory's switch does not handle (the default branch). It indicates the plugin metadata declares a type outside the known set (e.g. jar/jbang vs. other supported kinds).","triggerScenarios":"Installing or invoking a CLI plugin whose descriptor (plugin YAML in ~/.quarkus/cli/plugins) specifies a plugin type the current CLI version cannot dispatch, so the switch falls through to `default: throw new IllegalStateException(\"Unknown plugin type!\")`.","commonSituations":"A plugin created by a newer Quarkus CLI version introducing a new type; a hand-edited or corrupted plugin YAML with a mistyped `type:` field; leftover plugin descriptors after an upgrade/downgrade.","solutions":["Check the plugin descriptor YAML in ~/.quarkus/cli/plugins and set `type:` to a supported value (e.g. jar or jbang).","Remove the broken plugin entry (`quarkus plugin remove <name>` or delete its YAML) and reinstall it.","Upgrade the Quarkus CLI to match the version that wrote the plugin descriptor."],"exampleFix":"# before (~/.quarkus/cli/plugins/foo.yaml)\ntype: maven\n# after\ntype: jar","handlingStrategy":"try-catch","validationCode":"// inspect descriptor before install\ntype: $(yq '.type' ~/.quarkus/cli/plugins/<name>.yaml)\nif [ \"$type\" != \"jar\" ] && [ \"$type\" != \"jbang\" ]; then\n  echo \"Unsupported plugin type: $type\"; exit 1;\nfi","typeGuard":"public static boolean isKnownPluginType(Plugin p) {\n    return p.getType() == PluginType.JAR || p.getType() == PluginType.JBANG;\n}","tryCatchPattern":"try {\n    Command cmd = factory.createPluginCommand(plugin, output);\n} catch (IllegalStateException e) {\n    if (e.getMessage().contains(\"Unknown plugin type\")) {\n        log.error(\"Plugin %s has an unsupported type; reinstall or upgrade the CLI\".formatted(plugin.getName()));\n    } else throw e;\n}","preventionTips":["Keep the Quarkus CLI and plugins at compatible versions.","Do not hand-edit plugin descriptor YAMLs.","After upgrades, run `quarkus plugin list` to detect stale entries.","Reinstall plugins whose type field looks unfamiliar."],"tags":["cli","plugins","state-error"],"backgroundTag":"unknown-plugin-type","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}