Galosphere

Galosphere

9M Downloads

[Server][1.18.2-1.2.1] Crash on startup - Packaged MidnightLib (0.5.2) references Fabric class not in Fabric API 1.18.2

TigerWalts opened this issue · 1 comments

commented
  • Fabric Loader 0.14.21
  • fabric-api-0.76.0+1.18.2.jar
  • Galosphere-1.18.2-1.2.1-Fabric.jar

MidnightLib 0.5.2 is trying to use net/fabricmc/fabric/api/command/v2/CommandRegistrationCallback but Fabric API 1.18.2 is still using v1.

java.lang.RuntimeException: Could not execute entrypoint stage 'server' due to errors, provided by 'midnightlib'!
	at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.lambda$invoke0$0(EntrypointUtils.java:51) ~[fabric-loader-0.14.21.jar:?]
	at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33) ~[fabric-loader-0.14.21.jar:?]
	at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:49) ~[fabric-loader-0.14.21.jar:?]
	at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35) ~[fabric-loader-0.14.21.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.Hooks.startServer(Hooks.java:63) ~[fabric-loader-0.14.21.jar:?]
	at net.minecraft.server.Main.main(Main.java:101) [server-intermediary.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:468) [fabric-loader-0.14.21.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.14.21.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23) [fabric-loader-0.14.21.jar:?]
	at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69) [fabric-loader-0.14.21.jar:?]
Caused by: java.lang.NoClassDefFoundError: net/fabricmc/fabric/api/command/v2/CommandRegistrationCallback
	at eu.midnightdust.lib.config.AutoCommand.register(AutoCommand.java:30) ~[midnightlib-0.5.2-35bad266bdb59ef5.jar:?]
	at eu.midnightdust.core.MidnightLibServer.lambda$onInitializeServer$0(MidnightLibServer.java:17) ~[midnightlib-0.5.2-35bad266bdb59ef5.jar:?]
	at java.util.HashMap.forEach(HashMap.java:1421) ~[?:?]
	at eu.midnightdust.core.MidnightLibServer.onInitializeServer(MidnightLibServer.java:14) ~[midnightlib-0.5.2-35bad266bdb59ef5.jar:?]
	at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47) ~[fabric-loader-0.14.21.jar:?]
	... 7 more
Caused by: java.lang.ClassNotFoundException: net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback
	at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[?:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:226) ~[fabric-loader-0.14.21.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:112) ~[fabric-loader-0.14.21.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
	at eu.midnightdust.lib.config.AutoCommand.register(AutoCommand.java:30) ~[midnightlib-0.5.2-35bad266bdb59ef5.jar:?]
	at eu.midnightdust.core.MidnightLibServer.lambda$onInitializeServer$0(MidnightLibServer.java:17) ~[midnightlib-0.5.2-35bad266bdb59ef5.jar:?]
	at java.util.HashMap.forEach(HashMap.java:1421) ~[?:?]
	at eu.midnightdust.core.MidnightLibServer.onInitializeServer(MidnightLibServer.java:14) ~[midnightlib-0.5.2-35bad266bdb59ef5.jar:?]
	at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47) ~[fabric-loader-0.14.21.jar:?]
	... 7 more
commented

Bumping this, just spent a ton of time tracking down this very issue.
Not attaching any logs as they're the same.
@0rc1nus, would it be possible to make a hotfix?

Also it'd be great if mod pages could be updated to mention the MidnightLib dependency. Even a tiny line of text could save someone a few hours of debugging if an issue similar to this one occurs.

@TigerWalts big thanks for reporting this ❤️