{"record":{"id":"4dea31e08cb14aa9","repo":"HMCL-dev/HMCL","slug":"instance-is-not-a-mcbbs-modpack-cannot-update-th","errorCode":null,"errorMessage":"Instance  is not a Mcbbs modpack. Cannot update this instance.","messagePattern":"Instance  is not a Mcbbs modpack\\. Cannot update this instance\\.","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"HMCLCore/src/main/java/org/jackhuang/hmcl/modpack/mcbbs/McbbsModpackLocalInstallTask.java","lineNumber":122,"sourceCode":"Path json = repository.getLayout().getModpackConfigurationFile(instanceId);\nif (this.updateTarget != null && Files.notExists(json))\n    throw new IllegalArgumentException(\"Instance \" + instanceId + \" is not a Mcbbs modpack. Cannot update this instance.\");\n\n@Nullable ModpackConfiguration<McbbsModpackManifest> config = null;\ntry {\n    if (this.updateTarget != null && Files.exists(json)) {\n        config = JsonUtils.fromJsonFile(json, ModpackConfiguration.typeOf(McbbsModpackManifest.class));\n\n        if (config == null || !McbbsModpackProvider.INSTANCE.getName().equals(config.getType()))\n            throw new IllegalArgumentException(\"Instance \" + instanceId + \" is not a Mcbbs modpack. Cannot update this instance.\");\n    }\n} catch (JsonParseException | IOException ignore) {\n}","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/HMCL-dev/HMCL/blob/24702dc5a0214034f4c27166d5fd30cad08cec19/HMCLCore/src/main/java/org/jackhuang/hmcl/modpack/mcbbs/McbbsModpackLocalInstallTask.java#L104-L140","documentation":"Constructor guard: an update (as opposed to a fresh install) was requested for the instance, but its modpack configuration file is missing or declares a different provider type, so the instance is not an MCBBS modpack and cannot be updated in place.","triggerScenarios":"Thrown at HMCLCore/src/main/java/org/jackhuang/hmcl/modpack/mcbbs/McbbsModpackLocalInstallTask.java:122 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install the modpack as a new instance instead of updating","Verify the instance's modpack configuration file exists and was created by MCBBS modpack installation"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24702dc5a0214034f4c27166d5fd30cad08cec19","analyzedAt":"2026-09-10T12:36:46.680Z","contentChangedAt":"2026-09-10T12:36:46.680Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}