The message
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:SomeMixin from mod examplemod] from phase [DEFAULT] in config [examplemod.mixins.json] FAILED during APPLY
Caused by: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: Critical injection failure: …The full message is in the game folder: logs/latest.log for every start, and crash-reports/ for crashes that got far enough to write a report. In Prism, CurseForge and the Modrinth App, the instance's folder button opens the game folder.
What it means
Mixin is how most mods change the game: they insert code into Minecraft's own methods while it loads. Each mod expects those methods to look a certain way. When they do not, because the mod was made for another Minecraft version or because another mod already changed the same place, the change fails and the game stops.
The mod is almost always in the message. Look for “from mod <id>” or the config name before “.mixins.json”: “sodium.mixins.json” is Sodium. Ignore the long Java lines below it.
NeoForge says it more plainly: “Mixin application of … from <mod name> (<id>) has failed”.
How to fix it
- 1Find the first “Caused by:” line with “Mixin” in logs/latest.log or in the crash report, and note the mod id in it.
- 2Check that this mod's file is made for your exact Minecraft version, not only the same major one. 1.21.1 and 1.21.4 are different for Mixin.
- 3Update the mod. If it is already the newest, try its previous version.
- 4If two mods change the same thing (both rendering mods, both performance mods), remove one of them. Mod pages often list known conflicts.
- 5If the mod id is a library (fabric-api, architectury), update the library and the mods that use it together.
- 6Start again. If another Mixin error appears with a different mod, fix that one the same way.
With Packquill
Packquill pulls the mod's name out of the Mixin error, says whether the mod does not fit this Minecraft version or failed to apply, and offers to update it, pick another version, or switch it off. Switching off renames the file, so it can come back.
Packquill is free for Windows and Linux. It backs up every change, so anything it does can be undone.
Questions
The error names fabric-api. Is Fabric API broken?
Rarely. Usually Fabric API is older or newer than what another mod expects, or a mod changes the same code. Update Fabric API first, then the mods named next to it.
What is a “.mixins.json” file?
A list inside a mod of the changes it makes to the game. Its name starts with the mod's id, which is why it points to the mod.
Can OptiFine cause Mixin errors?
Yes. OptiFine rewrites large parts of the game, so Mixin changes from Sodium, Iris and others often fail next to it. Use Sodium and Iris instead.