HMCL-dev/HMCL · error · JsonParseException
Curse Forge modpack manifest Mod loader id cannot be blank.
Error message
Curse Forge modpack manifest Mod loader id cannot be blank.
What it means
Validation of a modLoaders entry in a CurseForge manifest: the loader's 'id' must be non-blank. A missing id means HMCL cannot determine which mod loader (forge/fabric) the pack uses, so the manifest is rejected.
Solutions
- Provide a valid loader id such as "forge-47.2.0" or "fabric-0.15.0" in each modLoaders entry
- Re-export the manifest from the CurseForge app
- Check the JSON uses the `id` key expected by the deserializer
Example fix
// before
{"minecraft":{"modLoaders":[{"id":"","primary":true}]}}
// after
{"minecraft":{"modLoaders":[{"id":"forge-47.2.0","primary":true}]}} Defensive patterns
Strategy: validation
Validate before calling
for (CurseManifestModLoader ml : manifest.getMinecraft().getModLoaders()) { if (isBlank(ml.getId())) throw new IllegalArgumentException("modLoader id blank"); } Type guard
boolean hasLoaderId(CurseManifestModLoader ml) { return ml != null && ml.getId() != null && !ml.getId().isBlank(); } Try / catch
try { modLoader.validate(); } catch (JsonParseException e) { log.error("Manifest mod loader blank", e); } Prevention
- Fill in modLoaders[].id (e.g. forge-<version>) for every manifest
- Avoid hand-editing manifests; re-export instead
- Validate the whole manifest with validate() before shipping
When it happens
Trigger: Parsing a curse manifest whose minecraft.modLoaders[] entry has an empty/whitespace `id`, then calling validate().
Common situations: Manually written manifest with an unfilled modLoaders entry, export tool bug, or JSON key mismatch ("name" instead of "id") leaving id null.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- Instance
- Missing Project ID or File ID.
- CurseForge Manifest.gameVersion cannot be blank.
- Invalid library path:
- /assets/
AI-assisted analysis of HMCL-dev/HMCL@24702dc5a0 (2026-09-10).
Data as JSON: /api/errors/33c58c2177bdc355.
Report an issue: GitHub.
Appendix: source
Thrown at HMCLCore/src/main/java/org/jackhuang/hmcl/modpack/curse/CurseManifestModLoader.java:40
@Override
public void validate() throws JsonParseException {
if (StringUtils.isBlank(id))
throw new JsonParseException("Curse Forge modpack manifest Mod loader id cannot be blank.");
}View on GitHub (pinned to 24702dc5a0)