PerlandFailure catalogue

A mod could not change the game's code

Fatalmixin_apply_failed

A mod's mixin, the code it injects into Minecraft or into another mod, did not fit the code it targets, so the server stopped while loading.

What the log shows

Written example3 lines
[07:41:09] [main/ERROR]: Mixin apply for mod quicktrade failed quicktrade.mixins.json:VillagerMixin from mod quicktrade -> net.minecraft.class_1646: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException Critical injection failure: @Inject annotation on onRestock could not find any targets matching 'method_20264' in net.minecraft.class_1646.
org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: Critical injection failure: @Inject annotation on onRestock could not find any targets matching 'method_20264' in net.minecraft.class_1646.
	at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.validateTargets(InjectionInfo.java:656)

Your log will have other names, versions and times. Search a line of it from all failures.

What it means

Most mods change Minecraft through mixins: small pieces of code that the Mixin library weaves into the game’s own classes, or into another mod’s, as they load. A mixin names exactly what it changes, such as a method of a class. If that method is not there, or two mods change it in ways that cannot both apply, Mixin refuses and the loader stops the server.

The diagnosis reads any error or exception thrown by the Mixin library (classes under org.spongepowered.asm.mixin) and names the mod by the mixin configuration file the trace mentions.

Why it happens

  • The mod is made for another version of Minecraft. Mojang renames and moves code between versions, so a mixin written for 1.20.4 often finds nothing to change in 1.20.1.
  • The mod is made for another loader version. The loader’s own code it targets changed.
  • Two mods change the same code. One mod’s change leaves nothing for the other’s to attach to, or both replace the same method.
  • A required mod is the wrong version. The mixin targets a class of another mod that changed between that mod’s releases.

How to fix

  1. Check that the mod named in mod is the version made for the server’s Minecraft version and loader. Mod pages on Modrinth and CurseForge list both for every file.
  2. Update it to the newest release for your game version; mixin failures are often fixed in a later release.
  3. If the version is right, look for a second mod that changes the same thing. Remove the mods added most recently one at a time, starting with those of the same kind (performance, world generation, villagers), until the server starts.
  4. Report the conflict to the authors with the log once you have found the pair.
  5. Fabric and Quilt: names such as class_1646 or method_20264 are intermediary names; they still show which part of the game the mixin targets.

In Perland

The issue appears in the server’s Diagnosis tab with the mod whose mixin failed. On a server whose mods come from a modpack, the fix button leads to the server’s Sources, and Mod Studio is where you update or remove the pack’s mods. Otherwise, replace or remove the jar in the mods folder in the Files tab.

References

Details the diagnosis reports

Perland's server diagnosis returns this failure as the code mixin_apply_failed with these parameters, each present only when the log names it.

ParameterMeaning
modThe mod whose mixin failed, read from the mixin configuration file the trace names (the `create` of `create.mixins.json`); absent when the trace names none.

Log lines this page covers

  • org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException
  • org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError
  • org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException
  • org.spongepowered.asm.mixin.throwables.MixinApplyError