Fix common mixin and crash errors
Three things go wrong with a mod, in this order: the build fails, a mixin fails when the game starts, or the game crashes while it runs. Each leaves a different message in a different place. Find out which one you have, then go to its section.
| What you see | Where | Go to |
|---|---|---|
Gradle stops with BUILD FAILED |
The build output | The build fails |
@Mixin target ... was not found or Critical injection failure |
The game log, at start-up | A mixin fails |
The game closes and writes a file in run/crash-reports/ |
The crash report | The game crashes |
Checked against Linen 0.2.1 on 20 November 2026. The messages are the ones Crash Doctor and Linen Check look for.
The build fails
Section titled “The build fails”Read the first error, not the last. Gradle prints the real cause near the top of the failure and a long stack trace under it.
In Linen, errors appear in the Problems view, each linked to its line.
Java and Gradle errors are about the setup, not your code. The common ones:
| Message | Cause | Fix |
|---|---|---|
Unsupported class file major version 69 |
Gradle runs on a Java that is newer than it understands | Unsupported class file major version |
Dependency requires at least JVM runtime version 25 |
Gradle runs on a Java that is too old for a plugin | Wrong Java version |
| The build fails on Java 25 with an old Gradle wrapper | The wrapper is older than the Java | Gradle is too old for Java 25 |
| Gradle won’t sync after you changed a version number | Stale caches, or a version that doesn’t exist | Gradle sync fails after a version change |
In Linen. Linen’s Problems view lists the Java errors with links to their lines, and Getting started on Home shows
the Java this mod needs and warns when JAVA_HOME points at another one. If you use Claude Code in Linen, /fix sends it
the errors Linen shows now.
A mixin fails
Section titled “A mixin fails”Mixin prints one of these in the game log when the game starts:
@Mixin target <class> was not found <your mixin>Critical injection failure: <injector> could not find any targets matching <method> in <class>.Critical injection failure: <injector> <handler> in <your mixin> failed injection check, (0/1) succeeded. Scanned 1 target(s).- The class was not found. The class in
@Mixin(...)doesn’t exist in this version, or it only exists on the client and your mixin is listed for both sides. - No method matches. The class exists, but
method = "..."matches nothing. The method was renamed, or its parameters changed, or the name alone matches several methods and needs its descriptor. - The injection check failed. The method was found, but the
@Atpoint matched nothing in it.
Mixin target not found goes through each message with Mixin’s own sources. Mixins on 26.1 covers what changed there.
A fourth mistake prints nothing at all: the mixin class exists but is missing from your <mod id>.mixins.json, so it
never runs.
In Linen (all free): Linen Check reads your mixins the way the game will and names the file and the fix. If you use Claude Code in Linen, Claude can read the target class and method from your own Minecraft jar and check which versions have a method, which is what a mixin needs. Don’t let an AI guess a target, see Make a Minecraft mod with AI.
The game crashes
Section titled “The game crashes”A crash report has a Description: line near the top and a stack trace under it. Read down to the last Caused by: line. That is
the root exception, and the lines under it that name your own package are where to look.
The crashes modders meet most, with the text the report or log contains:
| Text in the report | What it means |
|---|---|
UnsupportedClassVersionError |
The game runs on an older Java than the mod was compiled for |
Incompatible mods found, Missing or unsupported mandatory dependencies or MissingModsException |
A mod your mod needs is missing, or is the wrong version |
could not find any targets matching or InvalidInjectionException |
A mixin injection failed. See the section above |
MixinApplyError or InvalidMixinException |
A mixin could not be applied to its class |
Some intrusive holders were not registered |
A block, item or entity was created but never registered |
Trying to access unbound value or Registry Object not present |
Your code used a registered object before registration had happened |
NullPointerException with your package in the trace |
A bug in your own code, on the line the trace names |
In Linen. When the game crashes, Crash Doctor opens on its own with the cause, the fix, and links to your mod’s lines in
the stack trace. It is free, reads the report on your computer and sends nothing anywhere. The Game Log keeps the full
output, with filters. In the Claude panel, /crash hands Claude the last crash to read and fix in your code.
Crash Doctor reads the report. It does not run your mod or prove the fix works. After you change something, play again.
With Claude Code
Section titled “With Claude Code”Claude Code is optional and runs on your own Claude plan. Type /crash in the panel to hand it the last crash, or /fix for your current errors. It can look the failing method up in the game’s code for your version instead of guessing. All of it is free. See Make a Minecraft mod with AI and How Linen uses AI.
Related
Section titled “Related”- Troubleshooting: every error page in these docs.
- Which Java version.
- Crash Doctor and the Inspector on the features page.