// crash guide

Minecraft server crash: Mixin apply failed

Mods change Minecraft's code with small patches called mixins. This crash means one of those patches couldn't be applied, usually because a mod is the wrong version or two mods are changing the same code. The log names the patch and the game class it was patching, which points you to the mod.

Updated  ยท  Forge, NeoForge, Fabric, Quilt

What the error looks like

Start with logs/latest.log. Most mixin crashes happen at startup and may not leave a crash report, but if there's a new file in crash-reports/, check it too. Forge and NeoForge also write logs/debug.log with more detail. On a Pelican panel, the live console shows the same lines and the file manager opens both folders.

Forge and NeoForge

[main/ERROR] [mixin/]: Mixin apply failed examplemod.mixins.json:MinecraftServerMixin -> net.minecraft.server.MinecraftServer: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException Critical injection failure: @Inject annotation on onTick could not find any targets matching 'tickServer' in net.minecraft.server.MinecraftServer. Using refmap examplemod.refmap.json [PREINJECT Applicator Phase -> ...]

A few lines later comes the stack trace that stops the server:

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:MinecraftServerMixin] from phase [DEFAULT] in config [examplemod.mixins.json] FAILED during APPLY
Caused by: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: Critical injection failure: @Inject annotation on onTick could not find any targets matching 'tickServer' ...

Fabric and Quilt

Fabric's build of Mixin puts the mod ID right in the message:

[main/ERROR]: Mixin apply for mod examplemod failed examplemod.mixins.json:ServerWorldMixin from mod examplemod -> net.minecraft.class_3218: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException Critical injection failure: @Inject annotation on onTick could not find any targets matching ...
java.lang.RuntimeException: Mixin transformation of net.minecraft.class_3218 failed
Caused by: 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:ServerWorldMixin from mod examplemod] from phase [DEFAULT] in config [examplemod.mixins.json] FAILED during APPLY

Names like class_3218 and method_12345 on Fabric (1.21.11 and older), or m_12345_ and func_12345_a on older Forge, are the game's normal runtime names. They don't mean anything is corrupted. From 26.1 on, Minecraft isn't obfuscated, so the names are readable on every loader.

Other forms of the same crash

Search the log forWhat it usually means
could not find any targets matchingThe method the mod wants to patch isn't there. Wrong version, or another mod rewrote it.
failed injection check, (0/1) succeededThe method was found, but not the exact spot inside it. Another mod may have changed that code, or the version is wrong.
Invalid descriptor onThe target method exists, but its arguments changed. Usually a version mismatch.
InvalidMixinException: @Shadow ... was not located in the target classA field or method the mod relies on is gone. Usually a version mismatch.
@Redirect conflict. SkippingTwo mods tried to replace the same call. This is a warning that names both mixin configs. The skipped patch often fails next with “failed injection check”.

Not every mixin line is the crash. Warnings like Reference map '...' could not be read, does not specify "minVersion" property and @Mixin target ... was not found show up on healthy servers too. A Mixin apply failed line marked WARN, with the server still starting, was an optional patch. It probably isn't what stopped your server, even if a log scanner flags it.

What it means

Mods don't ship a modified copy of Minecraft. They ship patches instead. Each mod lists them in a config file inside its jar, like examplemod.mixins.json. A patch says: in this class, find this method (or one call inside it), and add or replace code there. Mixin applies it the moment that class loads.

The patch fails when that code isn't where it expects. Two usual reasons:

The mod named in the error owns the patch that failed. It may be the victim, not the cause.

Common in these packs: Fabric packs, where mods change the game mostly through mixins, such as Create: Astral and Prominence II, especially after you add or update mods yourself. Forge and NeoForge packs get them too, often from performance mods.

How to fix it

  1. Stop the server and take a backup. On a Pelican panel, that's the Backups tab. You may end up removing mods, and removing a mod that adds blocks or items takes them out of your world.
  2. Read the three names. In examplemod.mixins.json:MinecraftServerMixin -> net.minecraft.server.MinecraftServer you get the config (which mod), the patch, and the target class (what it was patching).
    • Fabric and Quilt: for mod examplemod gives you the mod ID directly.
    • Forge and NeoForge: the config name usually contains the mod ID. If it doesn't, open the likely jars as zip files and look for that file, usually at the top level.
    • If the target class is from another mod rather than the game (not net.minecraft or com.mojang), the patch was probably written for a different version of that mod.
  3. Undo your last change. If the server worked before you added or updated a mod, move that jar from mods/ to a mods-disabled/ folder in the server root, or put the old version back. If it broke after a whole pack update, roll the update back.
  4. Check that every version matches. Each mod must be built for your exact Minecraft version and loader. A 1.20.1 mod doesn't belong on a 1.20.4 server, even if it seems to load. Addons often need a specific version of the mod they extend. For a modpack, use the server pack for the same pack version your players have.
  5. Update the usual suspects. Update the named mod, the mod that owns the target class, your loader (newest build for your Minecraft version, unless your modpack needs a specific one), and mods that patch a lot of code, like Lithium, FerriteCore and ModernFix. Sodium, Embeddium and Rubidium are client-side rendering mods. If they're on the server, take them out (see client-only mods).
  6. Find the other mod. If every version is right and it still fails, a second mod is patching the same code.
    • Search latest.log (and debug.log) for already redirected by. That warning names both mixin configs, which usually point to the two mods.
    • Add -Dmixin.debug.verbose=true to the Java flags, before -jar (or before the @ args file that newer Forge and NeoForge start with). On a Pelican panel, the start command is on the Startup tab, if your server lets you edit it. Mixin then logs a line for every patch it applies, with the class it patches. Search for your target class to see which other configs patch it. Remove the flag afterwards, because the log gets large.
    • Still stuck? Move half the mods to mods-disabled/, test, and halve again. Keep the libraries the rest need; a missing dependency error names them. Set level-name=mixintest in server.properties so you test on a throwaway world, then set it back.
  7. Fix the pair. Check both mods' issue trackers. Conflicts are often already reported and fixed in a newer version. Lithium (config/lithium.properties) and ModernFix (config/modernfix-mixins.properties) let you turn off single patch groups by setting them to false; their docs list the names. Otherwise, drop one of the two mods.

Loader notes

How to check it's fixed

Not sure this is your crash?

Paste your log into the free crash log analyzer. It spots mixin failures in Forge, NeoForge, Fabric and Quilt logs and names the mod when the log does.

Related crash guides

Modded hosting is relaunching.

DSN hosts modded Minecraft only, with 5 on-demand backups for testing mod changes, nightly off-site backups, and a live console and file manager for working through a conflict. We're moving DSN Servers to new hardware, and ordering is closed until then. Join the launch list and we'll email you when servers open.

Join the launch list