Industrial Revolution

Industrial Revolution

5M Downloads

[BUG] Industrial Revolution crashes dedicated server on startup with NoSuchFieldError

Moire9 opened this issue ยท 3 comments

commented

Description:
It's not possible to start a server with Industrial Revolution, due to a NoSuchFieldError in the MachineRegistry object initializer (MachineRegistry#<init>), trying to find the field MachineRegistry#modelProvider of type Map. Such a field does exist on line 59, but is marked as a client-side only field with an annotation. Thus it cannot be found on the server. I tried to clone the repo to try removing the annotation to see if it would fix the bug, but I can't get the mod to build.

Steps to Reproduce:

  • Setup fabric server
  • Install industrial revolution
  • Launch server

Technical Information:

  • Minecraft: 1.20.1
  • Java: 22 (2024-03-19), also tested on 17.0.11+9 (2024-04-16)
  • Fabric API: 0.92.1
  • Fabric Loader: 0.15.11
  • Industrial Revolution: ALL versions 1.16.0 to 1.16.5
  • Modpack: indrev, fabric-api, fabric-language-kotlin-1.11.0 kotlin 2.0.0

Logs:
server log

Details:
Full stack trace so you don't have to look at the log:

[22:40:49] [main/ERROR]: Failed to start the minecraft server
java.lang.RuntimeException: Could not execute entrypoint stage 'main' due to errors, provided by 'indrev'!
        at net.fabricmc.loader.impl.FabricLoaderImpl.lambda$invokeEntrypoints$2(FabricLoaderImpl.java:388) ~[fabric-loader-0.15.11.jar:?]
        at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33) ~[fabric-loader-0.15.11.jar:?]
        at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:386) ~[fabric-loader-0.15.11.jar:?]
        at net.fabricmc.loader.impl.game.minecraft.Hooks.startServer(Hooks.java:63) ~[fabric-loader-0.15.11.jar:?]
        at net.minecraft.server.Main.main(Main.java:112) ~[server-intermediary.jar:?]
        at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) ~[fabric-loader-0.15.11.jar:?]
        at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) ~[fabric-loader-0.15.11.jar:?]
        at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23) ~[fabric-loader-0.15.11.jar:?]
        at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69) ~[fabric-loader-0.15.11.jar:?]
Caused by: java.lang.NoSuchFieldError: Class me.steven.indrev.registry.MachineRegistry does not have member field 'java.util.Map modelProvider'
        at me.steven.indrev.registry.MachineRegistry.<init>(MachineRegistry.kt:59) ~[indrev-1.16.5-BETA.jar:?]
        at me.steven.indrev.registry.MachineRegistry.<clinit>(MachineRegistry.kt:188) ~[indrev-1.16.5-BETA.jar:?]
        at me.steven.indrev.IndustrialRevolution.onInitialize(IndustrialRevolution.kt:67) ~[indrev-1.16.5-BETA.jar:?]
        at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:384) ~[fabric-loader-0.15.11.jar:?]
        ... 6 more
commented

Also see #566 (comment)

There's an official fixed version but it's only on CurseForge

commented

I'm having this same problem but with version 1.18.2, I don't think there's any solution, right?

commented

@seriousfreezing should just downgrade Fabric Loader to 0.14.25 then