Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running Modrinth "create_plus" modpack (Minecraft 1.19.2) in container #3241

Closed
Knufle opened this issue Jan 9, 2025 · 5 comments · Fixed by #3242
Closed

Error running Modrinth "create_plus" modpack (Minecraft 1.19.2) in container #3241

Knufle opened this issue Jan 9, 2025 · 5 comments · Fixed by #3242

Comments

@Knufle
Copy link

Knufle commented Jan 9, 2025

Describe the problem

I am attempting to run a Minecraft server using the itzg/minecraft-server:java17-alpine container with the Modrinth modpack "create_plus" for Minecraft version 1.19.2. However, the server crashes with an exception on startup.

Any guidance or suggestions to resolve this issue would be greatly appreciated.

Thank you for your help!

Container definition

services:
  minecraft_create_plus_modpack:
    image: itzg/minecraft-server:java17-alpine
    tty: true
    stdin_open: true
    ports:
      - "25565:25565"
    environment:
      EULA: "TRUE"
      TYPE: "MODRINTH"
      MODRINTH_MODPACK: "create_plus"
      VERSION: "1.19.2"
    volumes:
      - mc_data:/data
    restart: unless-stopped
volumes:
  mc_data:

Container logs

Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:32)

	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53)

	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71)

	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:106)

	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:77)

	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)

	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)

	at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141)

Caused by: java.lang.reflect.InvocationTargetException

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

	at java.base/java.lang.reflect.Method.invoke(Unknown Source)

	at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.CommonServerLaunchHandler.lambda$launchService$0(CommonServerLaunchHandler.java:29)

	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30)

	... 7 more

Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered

	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:392)

	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/[email protected]/cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:156)

	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:88)

	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120)

	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.TransformingClassLoader.maybeTransformClassBytes(TransformingClassLoader.java:50)

	at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.readerToClass(ModuleClassLoader.java:113)

	at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.lambda$findClass$15(ModuleClassLoader.java:219)

	at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:229)

	at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.findClass(ModuleClassLoader.java:219)

	at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:135)

	at java.base/java.lang.ClassLoader.loadClass(Unknown Source)

	at TRANSFORMER/[email protected]/net.minecraft.world.level.block.Blocks.<clinit>(Blocks.java:228)

	at TRANSFORMER/[email protected]/net.minecraft.world.level.levelgen.carver.CarverDebugSettings.<clinit>(CarverDebugSettings.java:9)

	at TRANSFORMER/[email protected]/net.minecraft.world.level.levelgen.carver.CarverConfiguration.m_224838_(CarverConfiguration.java:20)

	at MC-BOOTSTRAP/[email protected]/com.mojang.serialization.codecs.RecordCodecBuilder.mapCodec(RecordCodecBuilder.java:76)

	at TRANSFORMER/[email protected]/net.minecraft.world.level.levelgen.carver.CarverConfiguration.<clinit>(CarverConfiguration.java:16)

	at TRANSFORMER/[email protected]/net.minecraft.world.level.levelgen.carver.WorldCarver.<clinit>(WorldCarver.java:32)

	at TRANSFORMER/[email protected]/net.minecraft.data.worldgen.Carvers.<clinit>(Carvers.java:21)

	at TRANSFORMER/[email protected]/net.minecraft.data.BuiltinRegistries.m_236012_(BuiltinRegistries.java:53)

	at TRANSFORMER/[email protected]/net.minecraft.data.BuiltinRegistries.m_236009_(BuiltinRegistries.java:87)

	at TRANSFORMER/[email protected]/net.minecraft.data.BuiltinRegistries.m_236004_(BuiltinRegistries.java:114)

	at java.base/java.util.LinkedHashMap.forEach(Unknown Source)

	at TRANSFORMER/[email protected]/net.minecraft.data.BuiltinRegistries.<clinit>(BuiltinRegistries.java:113)

	at TRANSFORMER/[email protected]/net.minecraft.core.Registry.<clinit>(Registry.java:665)

	at TRANSFORMER/[email protected]/net.minecraft.server.Bootstrap.m_135870_(Bootstrap.java:43)

	at TRANSFORMER/[email protected]/net.minecraft.server.Main.main(Main.java:110)

	... 13 more

Caused by: org.spongepowered.asm.mixin.throwables.ClassMetadataNotFoundException: net.minecraft.client.Minecraft

	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transformMethod(MixinPreProcessorStandard.java:754)

	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transform(MixinPreProcessorStandard.java:739)

	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:310)

	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.createContextFor(MixinPreProcessorStandard.java:280)

	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinInfo.createContextFor(MixinInfo.java:1288)

	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:292)

	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:383)

	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:365)

	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363)

	... 41 more

2025-01-09T00:08:58.666Z	WARN	mc-server-runner	Minecraft server failed. Inspect logs above for errors that indicate cause. DO NOT report this line as an error.	{"exitCode": 1}

2025-01-09T00:08:58.666Z	INFO	mc-server-runner	Done
@itzg
Copy link
Owner

itzg commented Jan 9, 2025

It's very easy to do with mod failures, but you missed the important error log which was a few lines before the ones you captured:

2025-01-09T01:02:32.746416379Z [01:02:32] [main/ERROR] [ne.mi.fm.lo.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/Minecraft for invalid dist DEDICATED_SERVER

Looks like "distxform" needs to be excluded since it was implemented correctly to skip registering itself from server environments.

@itzg
Copy link
Owner

itzg commented Jan 9, 2025

This seems to fix it:

    environment:
      EULA: "TRUE"
      TYPE: "MODRINTH"
      MODRINTH_MODPACK: "create_plus"
      MODRINTH_EXCLUDE_FILES: |
        cwb
        feytweaks
        connectedness
        craftpresence
        screenshot_viewer
        zume
        reforgium
        figura
      MODRINTH_FORCE_SYNCHRONIZE: true

@Knufle
Copy link
Author

Knufle commented Jan 9, 2025

@itzg First of all thank you so much for helping, I wasn't expecting a response that fast.

Now, if you allow me I have two questions:

  1. You mentioned the problem is related to "distxform" but you didn't exclude it, why is that?
  2. What are all these other mods you added to the exclusion list and how did you learn they were the ones that needed to be added?

@itzg
Copy link
Owner

itzg commented Jan 9, 2025

It turned out that "distxform" identifier wasn't a mod name, but rather some kind of identifier in the Forge or mixin loading code. I got lucky and happened to notice this error further up:

2025-01-09T02:43:11.335572128Z [02:43:11] [main/WARN] [mixin/]: @Mixin target net.minecraft.client.gui.Font was not found feytweaks.mixins.json:accessors.TextRendererAccessor
2025-01-09T02:43:11.338526086Z [02:43:11] [main/ERROR] [ne.mi.fm.lo.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/renderer/LevelRenderer for invalid dist DEDICATED_SERVER
2025-01-09T02:43:11.339017919Z [02:43:11] [main/WARN] [mixin/]: Error loading class: net/minecraft/client/renderer/LevelRenderer (java.lang.RuntimeException: Attempted to load class net/minecraft/client/renderer/LevelRenderer for invalid dist DEDICATED_SERVER)
2025-01-09T02:43:11.339022503Z [02:43:11] [main/WARN] [mixin/]: @Mixin target net.minecraft.client.renderer.LevelRenderer was not found feytweaks.mixins.json:accessors.WorldRendererAccessor
2025-01-09T02:43:11.464413669Z [02:43:11] [main/ERROR] [ne.mi.fm.lo.RuntimeDistCleaner/DISTXFORM]: Attempted to load class 

So I first excluded "feytweaks"

Then it started to get easier since the next error was:

2025-01-09T02:49:17.185115880Z 		createaddition-1.19.2-1.2.3.jar                   |Create Crafts & Additions     |createaddition                |1.19.2-1.2.3        |NONE      |Manifest: NOSIGNATURE[02:49:17] [main/ERROR] [minecraft/Main]: Failed to start the minecraft server
2025-01-09T02:49:17.185127005Z net.minecraftforge.fml.LoadingFailedException: Loading errors encountered: [
2025-01-09T02:49:17.185128380Z 	Cubes Without Borders has class loading errors
2025-01-09T02:49:17.185129547Z §7java.lang.RuntimeException: Attempted to load class dev/kir/cubeswithoutborders/client/forge/CubesWithoutBordersImpl for invalid dist DEDICATED_SERVER
2025-01-09T02:49:17.185130964Z ]
2025-01-09T02:49:17.185131797Z 

Excluded "cwb", then the last round of errors:

2025-01-09T02:50:43.931701587Z 	Forge: net.minecraftforge:43.4.6[02:50:43] [main/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID cfa78407-c2d0-42cc-809a-6f4943957222
2025-01-09T02:50:43.932724212Z [02:50:43] [main/ERROR] [minecraft/Main]: Failed to start the minecraft server
2025-01-09T02:50:43.932733670Z net.minecraftforge.fml.LoadingFailedException: Loading errors encountered: [
2025-01-09T02:50:43.932735045Z 	Zume (zume) has failed to load correctly
2025-01-09T02:50:43.932736129Z §7java.lang.NoClassDefFoundError: net/minecraft/client/CameraType,
2025-01-09T02:50:43.932737629Z 	Reforgium (reforgium) has failed to load correctly
2025-01-09T02:50:43.932738545Z §7java.lang.ExceptionInInitializerError: null,
2025-01-09T02:50:43.932739420Z 	Figura (figura) has failed to load correctly
2025-01-09T02:50:43.932740295Z §7java.lang.BootstrapMethodError: java.lang.RuntimeException: Attempted to load class net/minecraft/client/player/LocalPlayer for invalid dist DEDICATED_SERVER,
2025-01-09T02:50:43.932741379Z 	Connectedness (connectedness) has failed to load correctly
2025-01-09T02:50:43.932742254Z §7java.lang.RuntimeException: Attempted to load class net/minecraft/client/multiplayer/ClientPacketListener for invalid dist DEDICATED_SERVER,
2025-01-09T02:50:43.932743254Z 	CraftPresence (craftpresence) has failed to load correctly
2025-01-09T02:50:43.932744087Z §7java.lang.RuntimeException: Attempted to load class net/minecraft/client/gui/screens/Screen for invalid dist DEDICATED_SERVER,
2025-01-09T02:50:43.932745045Z 	Screenshot Viewer (screenshot_viewer) has failed to load correctly
2025-01-09T02:50:43.932745962Z §7java.lang.RuntimeException: Attempted to load class net/minecraft/client/gui/screens/Screen for invalid dist DEDICATED_SERVER
2025-01-09T02:50:43.932751337Z ]

The good news is that with that exploration I found a new set of client mods to add to the global exclusions.

@itzg itzg closed this as completed in #3242 Jan 9, 2025
@Knufle
Copy link
Author

Knufle commented Jan 9, 2025

Oh, okay. Yeah, now I fully understand your thought process there. Thanks for breaking it down, and once again, your help is much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants