What the error looks like
[main/ERROR]: Mixin apply failed examplemod.mixins.json:ServerPlayerMixin -> net.minecraft.server.level.ServerPlayer
org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: @Inject annotation on tick could not find any targetsMixin is the library many mods use to patch Minecraft's code while the game loads. Mixin apply failed means one of those patches didn't fit. In the same report you may also see MixinTransformerError, MixinApplyError or InvalidInjectionException. They're the same story told by different classes.
Why a patch doesn't fit
- The mod was built for another Minecraft version. Method names and signatures move between releases, so a patch written for 1.20.1 can miss on 1.21.1.
- The mod is for another loader: a Forge mod on Fabric, or the other way round.
- Two mods patch the same method and the second one can't apply.
- A library mod is missing or too old, like MixinExtras or Architectury.
- The game or the loader was just updated and the mod wasn't.
Find which mod it is
The line names a mixin config such as examplemod.mixins.json. The part before .mixins.json is nearly always the mod ID, so search your mods folder for it. On Forge and NeoForge, the Suspected Mods: line under System Details often names it too. And think back: the mod you added or updated last is the likeliest suspect.
Fix it
- Remove the mod the line names, or the newest one you added, and start the game.
- Open the mod's page and download the file made for your exact Minecraft version and loader.
- Update its library mods, and Fabric API or the loader itself.
- Still failing? Move half your mods out of the folder, test, and keep halving until it stops. The last mod you moved back in is the one.
Questions
Is "Mixin apply failed" a crash?
Usually. It normally stops the game while it loads, so you see it as a crash at startup or when a world opens.
Will a newer Java fix it?
No. A mixin error means a mod doesn't match the game or another mod. A Java mismatch looks different, usually as UnsupportedClassVersionError.
Is my game installation broken?
No. The game files are fine, the mod is the problem. Take it out and you're back where you were.
Keep reading
- How to read a Minecraft crash reportA crash report looks like a wall of text, but the answer is usually in three places. Learn what Description, the stack trace and Caused by lines mean.
- How to fix a mod that "requires" another modA mod that says it requires another mod, which is missing, needs that second mod installed. Here is how to read the message and fix it on Fabric and Forge.
- How to fix UnsupportedClassVersionError in MinecraftUnsupportedClassVersionError means Minecraft or a mod needs a newer Java than the one running it. See which Java each version needs and how to check yours.
- How to share a log file without leaking private detailsLog files can hold your IP address, your Windows username and even login tokens. This is what to look for and how to share a log without exposing it.