Wrong Minecraft version

NoSuchMethodError: 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

  1. 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.
  2. 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.
  3. 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+).
LoadersFabric
SeverityStops the game
CategoryWrong Minecraft version

Check your own log

Related errors