LeoMinecraftModding / eternal-starlight

A minecraft mod that adds the magical and mysterious starlight dimension.
MIT License
25 stars 5 forks source link

Crash on Server Startup #1

Closed ThatOneCodeDev closed 3 months ago

ThatOneCodeDev commented 3 months ago

Good afternoon, I encountered a crash when attempting to start a dedicated server for my friends and myself to play on with the mod installed.

Steps to Reproduce:

  1. Set up a dedicated running NeoForge version 21.0.148 for Minecraft 1.21.
  2. Install the Eternal Starlight mod.
  3. Attempt to start the server.
  4. Observe the crash during the startup process.

Expected Behavior:

The mod should start in a dedicated server environment.

Actual Behavior:

The server crashes during startup due to an invalid mixin being loaded for the DEDICATED_SERVER environment.

Environment:

Note:

I am a C# developer primarily so I am just speculating what the cause could be here. It seems that the mixin cn/leolezury/eternalstarlight/common/mixin/client/MinecraftMixin is intended for the client-side only and is what causes the server environment to experience issues. I do not recall seeing anywhere that the mod is client only, so I assume this is un-intended behavior.

If I am totally incorrect with my assumption here, please feel free to help guide me in the right direction as I am trying to understand how this stuff works.

Crash Report:

[13:16:39.524] [main/ERROR] [common.asm.RuntimeDistCleaner/DISTXFORM]: Attempted to load class cn/leolezury/eternalstarlight/common/mixin/client/MinecraftMixin for invalid dist DEDICATED_SERVER 
[13:16:39.525] [main/FATAL] [mixin/]: Mixin prepare for mod eternal_starlight failed preparing client.MinecraftMixin in eternal_starlight-common.mixins.json: org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException Attempted to load class cn/leolezury/eternalstarlight/common/mixin/client/MinecraftMixin for invalid dist DEDICATED_SERVER org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException: Attempted to load class cn/leolezury/eternalstarlight/common/mixin/client/MinecraftMixin for invalid dist DEDICATED_SERVER
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinInfo.<init>(MixinInfo.java:865) ~[sponge-mixin-0.14.0+mixin.0.8.6.jar%2375!/:0.14.0+mixin.0.8.6] {}
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinConfig.prepareMixins(MixinConfig.java:934) ~[sponge-mixin-0.14.0+mixin.0.8.6.jar%2375!/:0.14.0+mixin.0.8.6] {}
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinConfig.prepare(MixinConfig.java:859) ~[sponge-mixin-0.14.0+mixin.0.8.6.jar%2375!/:0.14.0+mixin.0.8.6] {}
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.prepareConfigs(MixinProcessor.java:540) ~[sponge-mixin-0.14.0+mixin.0.8.6.jar%2375!/:0.14.0+mixin.0.8.6] {}
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.select(MixinProcessor.java:462) ~[sponge-mixin-0.14.0+mixin.0.8.6.jar%2375!/:0.14.0+mixin.0.8.6] {}
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.checkSelect(MixinProcessor.java:438) ~[sponge-mixin-0.14.0+mixin.0.8.6.jar%2375!/:0.14.0+mixin.0.8.6] {}
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:290) ~[sponge-mixin-0.14.0+mixin.0.8.6.jar%2375!/:0.14.0+mixin.0.8.6] {}
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:250) ~[sponge-mixin-0.14.0+mixin.0.8.6.jar%2375!/:0.14.0+mixin.0.8.6] {}
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.service.modlauncher.MixinTransformationHandler.processClass(MixinTransformationHandler.java:131) ~[sponge-mixin-0.14.0+mixin.0.8.6.jar%2375!/:0.14.0+mixin.0.8.6] {}
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.launch.MixinLaunchPluginLegacy.processClass(MixinLaunchPluginLegacy.java:131) ~[sponge-mixin-0.14.0+mixin.0.8.6.jar%2375!/:0.14.0+mixin.0.8.6] {}
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:156) ~[modlauncher-11.0.4.jar%2362!/:11.0.4+main.d2e20e43] {}
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:94) ~[modlauncher-11.0.4.jar%2362!/:?] {}
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) ~[modlauncher-11.0.4.jar%2362!/:?] {}
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.TransformingClassLoader.maybeTransformClassBytes(TransformingClassLoader.java:57) ~[modlauncher-11.0.4.jar%2362!/:?] {}
    at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.readerToClass(ModuleClassLoader.java:190) ~[securejarhandler-3.0.8.jar:?] {}
    at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.lambda$findClass$20(ModuleClassLoader.java:298) ~[securejarhandler-3.0.8.jar:?] {}
    at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:311) ~[securejarhandler-3.0.8.jar:?] {}
    at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.findClass(ModuleClassLoader.java:298) ~[securejarhandler-3.0.8.jar:?] {}
    at java.base/java.lang.ClassLoader.loadClass(Unknown Source) ~[?:?] {}
    at java.base/java.lang.Class.forName(Unknown Source) ~[?:?] {}
    at java.base/java.lang.Class.forName(Unknown Source) ~[?:?] {}
    at MC-BOOTSTRAP/fml_loader@4.0.21/net.neoforged.fml.loading.ImmediateWindowHandler$DummyProvider.lambda$updateModuleReads$1(ImmediateWindowHandler.java:173) ~[loader-4.0.21.jar%2360!/:4.0] {}
    at java.base/java.util.Optional.map(Unknown Source) [?:?] {}
    at MC-BOOTSTRAP/fml_loader@4.0.21/net.neoforged.fml.loading.ImmediateWindowHandler$DummyProvider.updateModuleReads(ImmediateWindowHandler.java:173) [loader-4.0.21.jar%2360!/:4.0] {}
    at MC-BOOTSTRAP/fml_loader@4.0.21/net.neoforged.fml.loading.ImmediateWindowHandler.acceptGameLayer(ImmediateWindowHandler.java:94) [loader-4.0.21.jar%2360!/:4.0] {}
    at MC-BOOTSTRAP/fml_loader@4.0.21/net.neoforged.fml.loading.FMLLoader.beforeStart(FMLLoader.java:160) [loader-4.0.21.jar%2360!/:4.0] {}
    at MC-BOOTSTRAP/fml_loader@4.0.21/net.neoforged.fml.loading.targets.CommonLaunchHandler.launchService(CommonLaunchHandler.java:115) [loader-4.0.21.jar%2360!/:4.0] {}
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-11.0.4.jar%2362!/:?] {}
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-11.0.4.jar%2362!/:?] {}
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-11.0.4.jar%2362!/:?] {}
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.Launcher.run(Launcher.java:103) [modlauncher-11.0.4.jar%2362!/:?] {}
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.Launcher.main(Launcher.java:74) [modlauncher-11.0.4.jar%2362!/:?] {}
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-11.0.4.jar%2362!/:?] {}
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-11.0.4.jar%2362!/:?] {}
    at cpw.mods.bootstraplauncher@2.0.2/cpw.mods.bootstraplauncher.BootstrapLauncher.run(BootstrapLauncher.java:210) [bootstraplauncher-2.0.2.jar:?] {}
    at cpw.mods.bootstraplauncher@2.0.2/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:69) [bootstraplauncher-2.0.2.jar:?] {}
Caused by: java.lang.RuntimeException: Attempted to load class cn/leolezury/eternalstarlight/common/mixin/client/MinecraftMixin for invalid dist DEDICATED_SERVER
    at MC-BOOTSTRAP/fml_loader@4.0.21/net.neoforged.fml.common.asm.RuntimeDistCleaner.processClassWithFlags(RuntimeDistCleaner.java:60) ~[loader-4.0.21.jar%2360!/:4.0] {}
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:94) ~[modlauncher-11.0.4.jar%2362!/:?] {}
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) ~[modlauncher-11.0.4.jar%2362!/:?] {}
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.TransformingClassLoader.maybeTransformClassBytes(TransformingClassLoader.java:57) ~[modlauncher-11.0.4.jar%2362!/:?] {}
    at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.getMaybeTransformedClassBytes(ModuleClassLoader.java:332) ~[securejarhandler-3.0.8.jar:?] {}
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.TransformingClassLoader.buildTransformedClassNodeFor(TransformingClassLoader.java:65) ~[modlauncher-11.0.4.jar%2362!/:?] {}
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.LaunchPluginHandler.lambda$announceLaunch$10(LaunchPluginHandler.java:106) ~[modlauncher-11.0.4.jar%2362!/:?] {}
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.launch.MixinLaunchPluginLegacy.getClassNode(MixinLaunchPluginLegacy.java:222) ~[sponge-mixin-0.14.0+mixin.0.8.6.jar%2375!/:0.14.0+mixin.0.8.6] {}
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinInfo.loadMixinClass(MixinInfo.java:1312) ~[sponge-mixin-0.14.0+mixin.0.8.6.jar%2375!/:0.14.0+mixin.0.8.6] {}
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinInfo.<init>(MixinInfo.java:858) ~[sponge-mixin-0.14.0+mixin.0.8.6.jar%2375!/:0.14.0+mixin.0.8.6] {}
    ... 35 more

Exception in thread "main" java.lang.RuntimeException: org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [eternal_starlight-common.mixins.json:client.MinecraftMixin from mod eternal_starlight] from phase [DEFAULT] in config [eternal_starlight-common.mixins.json] FAILED during PREPARE
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:32)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.Launcher.run(Launcher.java:103)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.Launcher.main(Launcher.java:74)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
    at cpw.mods.bootstraplauncher@2.0.2/cpw.mods.bootstraplauncher.BootstrapLauncher.run(BootstrapLauncher.java:210)
    at cpw.mods.bootstraplauncher@2.0.2/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:69)
Caused by: org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [eternal_starlight-common.mixins.json:client.MinecraftMixin from mod eternal_starlight] from phase [DEFAULT] in config [eternal_starlight-common.mixins.json] FAILED during PREPARE
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinError(MixinProcessor.java:638)
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinPrepareError(MixinProcessor.java:585)
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.prepareConfigs(MixinProcessor.java:543)
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.select(MixinProcessor.java:462)
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.checkSelect(MixinProcessor.java:438)
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:290)
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:250)
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.service.modlauncher.MixinTransformationHandler.processClass(MixinTransformationHandler.java:131)
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.launch.MixinLaunchPluginLegacy.processClass(MixinLaunchPluginLegacy.java:131)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:156)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:94)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.TransformingClassLoader.maybeTransformClassBytes(TransformingClassLoader.java:57)
    at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.readerToClass(ModuleClassLoader.java:190)
    at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.lambda$findClass$20(ModuleClassLoader.java:298)
    at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:311)
    at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.findClass(ModuleClassLoader.java:298)
    at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
    at java.base/java.lang.Class.forName(Unknown Source)
    at java.base/java.lang.Class.forName(Unknown Source)
    at MC-BOOTSTRAP/fml_loader@4.0.21/net.neoforged.fml.loading.ImmediateWindowHandler$DummyProvider.lambda$updateModuleReads$1(ImmediateWindowHandler.java:173)
    at java.base/java.util.Optional.map(Unknown Source)
    at MC-BOOTSTRAP/fml_loader@4.0.21/net.neoforged.fml.loading.ImmediateWindowHandler$DummyProvider.updateModuleReads(ImmediateWindowHandler.java:173)
    at MC-BOOTSTRAP/fml_loader@4.0.21/net.neoforged.fml.loading.ImmediateWindowHandler.acceptGameLayer(ImmediateWindowHandler.java:94)
    at MC-BOOTSTRAP/fml_loader@4.0.21/net.neoforged.fml.loading.FMLLoader.beforeStart(FMLLoader.java:160)
    at MC-BOOTSTRAP/fml_loader@4.0.21/net.neoforged.fml.loading.targets.CommonLaunchHandler.launchService(CommonLaunchHandler.java:115)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30)
    ... 8 more
Caused by: org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException: Attempted to load class cn/leolezury/eternalstarlight/common/mixin/client/MinecraftMixin for invalid dist DEDICATED_SERVER
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinInfo.<init>(MixinInfo.java:865)
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinConfig.prepareMixins(MixinConfig.java:934)
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinConfig.prepare(MixinConfig.java:859)
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.prepareConfigs(MixinProcessor.java:540)
    ... 32 more
Caused by: java.lang.RuntimeException: Attempted to load class cn/leolezury/eternalstarlight/common/mixin/client/MinecraftMixin for invalid dist DEDICATED_SERVER
    at MC-BOOTSTRAP/fml_loader@4.0.21/net.neoforged.fml.common.asm.RuntimeDistCleaner.processClassWithFlags(RuntimeDistCleaner.java:60)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:94)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.TransformingClassLoader.maybeTransformClassBytes(TransformingClassLoader.java:57)
    at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.getMaybeTransformedClassBytes(ModuleClassLoader.java:332)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.TransformingClassLoader.buildTransformedClassNodeFor(TransformingClassLoader.java:65)
    at MC-BOOTSTRAP/cpw.mods.modlauncher@11.0.4/cpw.mods.modlauncher.LaunchPluginHandler.lambda$announceLaunch$10(LaunchPluginHandler.java:106)
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.launch.MixinLaunchPluginLegacy.getClassNode(MixinLaunchPluginLegacy.java:222)
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinInfo.loadMixinClass(MixinInfo.java:1312)
    at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinInfo.<init>(MixinInfo.java:858)
    ... 35 more
2024-08-10T13:16:39.597Z    WARN    mc-server-runner    Minecraft server failed. Inspect logs above for errors that indicate cause. 
ThatOneCodeDev commented 3 months ago

2024-08-10-5.log Attached is the Latest.log from the instance where the mod installation was attempted.

LeoLezury commented 3 months ago

Thanks! It will be fixed in the next version.

LeoLezury commented 3 months ago

Fixed in 0.1.2🎉

ThatOneCodeDev commented 3 months ago

Can confirm, the docker-container starts and the mod loads. Thanks for the quick fix!