What it means
Most mods work by patching Minecraft's code as it loads, using a system called Mixin. If a patch can't be applied, the server crashes at startup with something like:
org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered
Caused by: org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [examplemod.mixins.json:EntityMixin] from phase [DEFAULT] in config [examplemod.mixins.json] FAILED during APPLY
Find the mod
The name before .mixins.json is the mod that tried to apply the patch. In the example above, it's examplemod. Read the whole crash, though: the mod applying the patch isn't always the one at fault.
Look further down for Caused by: lines. Common endings:
Critical injection failure ... target not found: the code the mod wanted to patch isn't there. The mod is for a different Minecraft version, or another mod has already changed that code.InvalidMixinException: the mod is broken or built for something else.ClassNotFoundExceptionorNoClassDefFoundError: a dependency is missing.
The fix
- Check the mod's Minecraft version. It must match your server's version exactly (1.21.1 isn't 1.21.4). The version is on the Startup tab.
- Check the loader. A Fabric mod on a NeoForge server (or the other way round) can't work. Check the file name and the mod's download page.
- Update it. Install the newest version of that mod for your Minecraft version from the Mods tab.
- Look for a conflict. If two mods patch the same thing, the crash often names both. Remove one, restart, and see whether it starts. Mod pages often list known incompatibilities.
- Remove it. If nothing works, take that mod out of the
modsfolder and start without it.
Client-only mods
Mods that only make sense on a player's game (shaders, minimaps, HUD tweaks) can crash a server with Mixin errors, because the code they patch doesn't exist on a server. Remove them from the server's mods folder; players keep them on their own game.
Questions
The crash names a mod I've never heard of.
It's probably a library or a dependency another mod installed. Search its name in your mods folder and on Modrinth to see what needs it.
Get help says something different from this page.
Get help reads your actual crash, so trust it for your case. This page covers the common causes.