Skip to content

Fix Fabric crash on startup without game test API - #248

Merged
rubensworks merged 1 commit into
master-26from
fix-fabric-gametest-mixin-prod
Sep 26, 2026
Merged

rubensworks merged 1 commit into
master-26from
fix-fabric-gametest-mixin-prod

Conversation

@rubensworks

Copy link
Copy Markdown
Member

Fixes CyclopsMC/ColossalChests#213 (the crash comes from CyclopsCore, not ColossalChests).

Cause

MixinFabricGameTestModInitializer targets net.fabricmc.fabric.impl.gametest.FabricGameTestModInitializer. That class is in fabric-gametest-api-v1, which only exists in dev, not in the production Fabric API jar.

This used to be only a warning. Fabric Loader 0.19.4 maps mods that depend on fabricloader >=0.19.4 to Mixin compatibility 0.17.4. Under that level, a missing target in a required config throws InvalidMixinException. Since the 26.3 update, master-26 declares fabricloader >=0.19.5, so the game now crashes on launch. master-26-lts (loader 0.18.5) is not affected.

Fix

Mark the mixin @Pseudo and reference the target by name, so it is skipped when the class is missing.

Validation

  • :loader-fabric:build passes.
  • Production Fabric 26.3 server (loader 0.19.5, Fabric API 0.161.0+26.3):
    • Unpatched jar reproduces the reported @Mixin target ... was not found crash.
    • Patched jar starts up fine (only a WARN that the class is missing).
  • :loader-fabric:runGameTestServer: all 2 required tests pass. They are registered only through this mixin, so it still applies in dev.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FAW7gtK1CZ7WoHxTM81k9V


Generated by Claude Code

Fabric API does not ship fabric-gametest-api-v1 in production, and
Fabric Loader 0.19.4+ makes missing mixin targets fatal for mods that
depend on it, so the game test mixin crashed on launch. Mark it as a
pseudo mixin so it is skipped when the target is absent.

Closes CyclopsMC/ColossalChests#213

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FAW7gtK1CZ7WoHxTM81k9V
@sonarqubecloud

Copy link
Copy Markdown

@coveralls

coveralls commented Sep 26, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 31.278%. remained the same — fix-fabric-gametest-mixin-prod into master-26

@rubensworks
rubensworks merged commit d2b125d into master-26 Sep 26, 2026
7 of 8 checks passed
@rubensworks
rubensworks deleted the fix-fabric-gametest-mixin-prod branch September 26, 2026 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants