{"record":{"id":"5904b93d9d450ca1","repo":"quarkusio/quarkus","slug":"unknown-launch-mode","errorCode":null,"errorMessage":"Unknown launch mode ","messagePattern":"Unknown launch mode ","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"core/deployment/src/main/java/io/quarkus/runner/bootstrap/AugmentActionImpl.java","lineNumber":145,"sourceCode":"                break;\n            case REMOTE_DEV_CLIENT:\n                //this seems a bit counterintuitive, but the remote dev client just keeps a production\n                //app up to date and ships it to the remote side, this allows the remote side to be fully\n                //up-to-date even if the process is restarted\n                launchMode = LaunchMode.NORMAL;\n                devModeType = DevModeType.REMOTE_LOCAL_SIDE;\n                break;\n            case CONTINUOUS_TEST:\n                //the process that actually launches the tests is a dev mode process\n                launchMode = LaunchMode.DEVELOPMENT;\n                devModeType = DevModeType.TEST_ONLY;\n                break;\n            case REMOTE_DEV_SERVER:\n                launchMode = LaunchMode.DEVELOPMENT;\n                devModeType = DevModeType.REMOTE_SERVER_SIDE;\n                break;\n            default:\n                throw new RuntimeException(\"Unknown launch mode \" + quarkusBootstrap.getMode());\n        }\n        this.launchMode = launchMode;\n        this.devModeType = devModeType;\n    }\n\n    @Override\n    public void performCustomBuild(String resultHandler, Object context, String... finalOutputs) {\n        try (QuarkusClassLoader classLoader = curatedApplication.createDeploymentClassLoader()) {\n            Class<? extends BuildItem>[] targets = Arrays.stream(finalOutputs)\n                    .map(new Function<String, Class<? extends BuildItem>>() {\n                        @Override\n                        public Class<? extends BuildItem> apply(String s) {\n                            try {\n                                return (Class<? extends BuildItem>) Class.forName(s, false, classLoader);\n                            } catch (ClassNotFoundException e) {\n                                throw new RuntimeException(e);\n                            }\n                        }","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/deployment/src/main/java/io/quarkus/runner/bootstrap/AugmentActionImpl.java#L127-L163","documentation":"AugmentActionImpl's constructor maps a QuarkusBootstrap.Mode to a LaunchMode/DevModeType pair; a mode without an explicit case (i.e. a mode not valid for building an AugmentAction) reaches the default branch and throws this RuntimeException. It means the bootstrap was created with a launch mode that AugmentAction does not support.","triggerScenarios":"Constructing an AugmentAction from a QuarkusBootstrap whose mode is one of the unhandled LaunchMode values (e.g. TEST, DEVELOPMENT variants not explicitly mapped) instead of NORMAL, PRODUCTION, or the explicitly mapped dev modes.","commonSituations":"Embedding Quarkus augmentation in custom tooling/tests and passing QuarkusBootstrap.Mode.TEST or an unusual mode; IDE runner or custom bootstrap code choosing the wrong mode; Quarkus version changes adding modes not handled by older embedding code.","solutions":["Build the QuarkusBootstrap with LaunchMode.NORMAL for production augmentation, or the documented dev-mode values for dev actions.","Inspect quarkusBootstrap.getMode() before creating the AugmentAction and map unsupported modes to NORMAL.","If embedding Quarkus, update to a Quarkus version consistent with your bootstrap-mode usage and check AugmentActionImpl for the supported set.","In tests, use QuarkusTest/test-specific bootstrap helpers rather than hand-built bootstraps with TEST mode."],"exampleFix":"// before\nQuarkusBootstrap.builder(app).setMode(QuarkusBootstrap.Mode.TEST).build().createInitialRuntimeApplication().createAugmentor();\n// after\nQuarkusBootstrap.builder(app).setMode(QuarkusBootstrap.Mode.PRODUCTION).build().createInitialRuntimeApplication().createAugmentor();","handlingStrategy":"validation","validationCode":"static void requireAugmentableMode(QuarkusBootstrap bootstrap) {\n    QuarkusBootstrap.Mode m = bootstrap.getMode();\n    if (m == QuarkusBootstrap.Mode.TEST)\n        throw new IllegalStateException(\"AugmentAction does not support mode \" + m);\n}","typeGuard":null,"tryCatchPattern":"try { createAugmentor(); } catch (RuntimeException e) { if (e.getMessage().startsWith(\"Unknown launch mode\")) { /* rebuild bootstrap with NORMAL/PRODUCTION */ } else throw e; }","preventionTips":["Always build augmentation bootstraps with Mode.NORMAL or PRODUCTION","Use QuarkusTest facilities for test-mode needs","Map application mode to bootstrap mode explicitly in embedding code"],"tags":["bootstrap","launch-mode","augmentation"],"backgroundTag":"unsupported-launch-mode","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}