Wrong Minecraft versionNoSuchMethodError: ModMetadata.getCustomElement on Fabric Startup
What it looks like in the log
java.lang.NoSuchMethodError: net.fabricmc.loader.api.metadata.ModMetadata.getCustomElement(Ljava/lang/String;)Lcom/google/gson/JsonElement;
How to fix it
- Check your `mods` folder for outdated mods built for early Fabric versions—most commonly OptiFabric on Minecraft 1.14.4 or 1.15.2—and update them if a newer release exists.
- If you are using OptiFabric for Minecraft 1.14.4, remove the official OptiFabric JAR and either replace it with an updated community fork (such as Sjouwer's `OptiFabric-1.14.4-Updated`) or remove OptiFabric and OptiFine altogether.
- Alternatively, edit your launcher instance settings to downgrade Fabric Loader to version `0.11.7`, which is the last loader version that still includes `getCustomElement` (only do this if none of your other mods require Fabric Loader 0.12+).
| Loaders | Fabric |
|---|
| Severity | Stops the game |
|---|
| Category | Wrong Minecraft version |
|---|
Check your own log