HMCL-dev/HMCL · error · IllegalArgumentException

Incorrect manifest type, actual=

Error message

Incorrect manifest type, actual=

What it means

Guard in injectLaunchOptions: the stored modpack configuration JSON declares a provider type different from 'mcbbs', so the configuration does not belong to an MCBBS modpack and applying its launch options would be incorrect.

Solutions

  1. Ensure the launch-options injection is invoked with the configuration of an MCBBS modpack instance
  2. Reinstall or repair the instance so its modpack configuration matches the MCBBS provider
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at HMCLCore/src/main/java/org/jackhuang/hmcl/modpack/mcbbs/McbbsModpackProvider.java:61 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of HMCL-dev/HMCL@24702dc5a0 (2026-09-10). Data as JSON: /api/errors/7799dca5850be8e8. Report an issue: GitHub.

Appendix: source

Thrown at HMCLCore/src/main/java/org/jackhuang/hmcl/modpack/mcbbs/McbbsModpackProvider.java:61

@Override
public void injectLaunchOptions(String modpackConfigurationJson, LaunchOptions.Builder builder) {
    ModpackConfiguration<McbbsModpackManifest> config = JsonUtils.GSON.fromJson(modpackConfigurationJson, ModpackConfiguration.typeOf(McbbsModpackManifest.class));

    if (!getName().equals(config.getType())) {
        throw new IllegalArgumentException("Incorrect manifest type, actual=" + config.getType() + ", expected=" + getName());
    }

    config.getManifest().injectLaunchOptions(builder);
}

View on GitHub (pinned to 24702dc5a0)