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

Some JDA classes are missing from the mod jar #37

Closed
Eatham532 opened this issue Jun 28, 2022 · 5 comments · Fixed by #39 or #63
Closed

Some JDA classes are missing from the mod jar #37

Eatham532 opened this issue Jun 28, 2022 · 5 comments · Fixed by #39 or #63
Labels
bug Something isn't working build Improvements or additions to the build process

Comments

@Eatham532
Copy link

Eatham532 commented Jun 28, 2022

Error from log shown bellow. May be a mod incomplatibility

[19:49:28] [main/WARN]: Reference map 'minecord-cmds-mc1.19-refmap.json' for minecord-cmds.mixins.json could not be read. If this is a development environment you can ignore this message
[19:49:28] [main/WARN]: Reference map 'minecord-presence-mc1.19-refmap.json' for minecord-presence.mixins.json could not be read. If this is a development environment you can ignore this message
[19:49:33] [main/WARN]: Force-disabling mixin 'alloc.blockstate.StateMixin' as rule 'mixin.alloc.blockstate' (added by mods [ferritecore]) disables it and children
[19:49:33] [main/WARN]: Force-disabling mixin 'world.player_chunk_tick.ThreadedAnvilChunkStorageMixin' as rule 'mixin.world.player_chunk_tick' (added by mods [krypton]) disables it and children
[19:49:41] [main/INFO]: Minecord is getting ready...
[19:49:41] [main/INFO]: Minecord Chat is getting ready...
[19:49:42] [main/INFO]: Minecord Commands is getting ready...
[19:49:42] [main/INFO]: Adding built-in uptime command as '/uptime'
[19:49:42] [main/INFO]: Minecord Presence is getting ready...
[19:49:42] [main/INFO]: Adding presence category 'starting' with 1 presences
[19:49:42] [main/INFO]: Adding presence category 'running' with 4 presences
[19:49:42] [main/INFO]: Adding presence category 'stopping' with 1 presences
[19:49:42] [main/ERROR]: A mod crashed on startup!
net.fabricmc.loader.impl.FormattedException: java.lang.RuntimeException: Could not execute entrypoint stage 'preLaunch' due to errors, provided by 'minecord-api'!
at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:164) ~[fabric-loader-0.14.8.jar:?]
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:68) [fabric-loader-0.14.8.jar:?]
at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23) [fabric-loader-0.14.8.jar:?]
at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69) [fabric-loader-0.14.8.jar:?]
Caused by: java.lang.RuntimeException: Could not execute entrypoint stage 'preLaunch' due to errors, provided by 'minecord-api'!
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.lambda$invoke0$0(EntrypointUtils.java:51) ~[fabric-loader-0.14.8.jar:?]
at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33) ~[fabric-loader-0.14.8.jar:?]
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:49) ~[fabric-loader-0.14.8.jar:?]
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35) ~[fabric-loader-0.14.8.jar:?]
at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:162) ~[fabric-loader-0.14.8.jar:?]
... 3 more
Caused by: java.lang.RuntimeException: Could not execute entrypoint stage 'minecord' due to errors, provided by 'minecord-cmds'!
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.lambda$invoke0$0(EntrypointUtils.java:51) ~[fabric-loader-0.14.8.jar:?]
at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33) ~[fabric-loader-0.14.8.jar:?]
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:49) ~[fabric-loader-0.14.8.jar:?]
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35) ~[fabric-loader-0.14.8.jar:?]
at me.axieum.mcmod.minecord.impl.MinecordImpl.onPreLaunch(MinecordImpl.java:62) ~[minecord-api-1.0.0-beta.1-1364e62b7349e4f8.jar:?]
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47) ~[fabric-loader-0.14.8.jar:?]
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35) ~[fabric-loader-0.14.8.jar:?]
at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:162) ~[fabric-loader-0.14.8.jar:?]
... 3 more
Caused by: java.lang.NoClassDefFoundError: net/dv8tion/jda/api/interactions/commands/build/Commands
at me.axieum.mcmod.minecord.api.cmds.command.MinecordCommand.<init>(MinecordCommand.java:42) ~[minecord-cmds-1.0.0-beta.1-d6be509438a2c9f9.jar:?]
at me.axieum.mcmod.minecord.impl.cmds.command.discord.UptimeCommand.<init>(UptimeCommand.java:35) ~[minecord-cmds-1.0.0-beta.1-d6be509438a2c9f9.jar:?]
at me.axieum.mcmod.minecord.impl.cmds.MinecordCommandsImpl.initCommands(MinecordCommandsImpl.java:63) ~[minecord-cmds-1.0.0-beta.1-d6be509438a2c9f9.jar:?]
at me.axieum.mcmod.minecord.impl.cmds.MinecordCommandsImpl.onInitializeMinecord(MinecordCommandsImpl.java:47) ~[minecord-cmds-1.0.0-beta.1-d6be509438a2c9f9.jar:?]
at me.axieum.mcmod.minecord.impl.MinecordImpl.lambda$onPreLaunch$0(MinecordImpl.java:62) ~[minecord-api-1.0.0-beta.1-1364e62b7349e4f8.jar:?]
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47) ~[fabric-loader-0.14.8.jar:?]
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35) ~[fabric-loader-0.14.8.jar:?]
at me.axieum.mcmod.minecord.impl.MinecordImpl.onPreLaunch(MinecordImpl.java:62) ~[minecord-api-1.0.0-beta.1-1364e62b7349e4f8.jar:?]
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47) ~[fabric-loader-0.14.8.jar:?]
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35) ~[fabric-loader-0.14.8.jar:?]
at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:162) ~[fabric-loader-0.14.8.jar:?]
... 3 more
Caused by: java.lang.ClassNotFoundException: net.dv8tion.jda.api.interactions.commands.build.Commands
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.8.jar:?]
at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:145) ~[fabric-loader-0.14.8.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
at me.axieum.mcmod.minecord.api.cmds.command.MinecordCommand.<init>(MinecordCommand.java:42) ~[minecord-cmds-1.0.0-beta.1-d6be509438a2c9f9.jar:?]
at me.axieum.mcmod.minecord.impl.cmds.command.discord.UptimeCommand.<init>(UptimeCommand.java:35) ~[minecord-cmds-1.0.0-beta.1-d6be509438a2c9f9.jar:?]
at me.axieum.mcmod.minecord.impl.cmds.MinecordCommandsImpl.initCommands(MinecordCommandsImpl.java:63) ~[minecord-cmds-1.0.0-beta.1-d6be509438a2c9f9.jar:?]
at me.axieum.mcmod.minecord.impl.cmds.MinecordCommandsImpl.onInitializeMinecord(MinecordCommandsImpl.java:47) ~[minecord-cmds-1.0.0-beta.1-d6be509438a2c9f9.jar:?]
at me.axieum.mcmod.minecord.impl.MinecordImpl.lambda$onPreLaunch$0(MinecordImpl.java:62) ~[minecord-api-1.0.0-beta.1-1364e62b7349e4f8.jar:?]
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47) ~[fabric-loader-0.14.8.jar:?]
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35) ~[fabric-loader-0.14.8.jar:?]
at me.axieum.mcmod.minecord.impl.MinecordImpl.onPreLaunch(MinecordImpl.java:62) ~[minecord-api-1.0.0-beta.1-1364e62b7349e4f8.jar:?]
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47) ~[fabric-loader-0.14.8.jar:?]
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35) ~[fabric-loader-0.14.8.jar:?]
at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:162) ~[fabric-loader-0.14.8.jar:?]
... 3 more
@axieum
Copy link
Owner

axieum commented Jun 28, 2022

Hi, thanks for the crash report. Looks like I need to check the built artifacts to make sure they include all the dependencies.

I'll try to take a look sometime over the next couple days.

Sorry about that.

@axieum axieum added bug Something isn't working build Improvements or additions to the build process labels Jun 28, 2022
@axieum axieum changed the title Minecord crashes minecraft JDA is missing from the mod jar Jun 28, 2022
@Eatham532
Copy link
Author

All good. Your mod is one of the more advanced mods of this type.

@Eatham532
Copy link
Author

Just currious when this will be fixed as I want to use this mod on my server.

@axieum
Copy link
Owner

axieum commented Jun 30, 2022

I've just had a look now and I think I found the culprit!

// Minify the result - remove unused classes
minimize()

An oversight of trimming unused classes from the minecord-api module, when other modules might want to use some of the other JDA classes/features. It's going to increase the size of the mod, but I think it's a price to pay to enable other mod devs to create their own modules.

axieum added a commit that referenced this issue Jun 30, 2022
we don't know what other modules may or may not use from JDA
@axieum axieum closed this as completed in 35c6599 Jun 30, 2022
@axieum axieum changed the title JDA is missing from the mod jar Some JDA classes are missing from the mod jar Jun 30, 2022
@axieum
Copy link
Owner

axieum commented Jun 30, 2022

@Eatham532 Can you please try again with v1.0.0-beta.2?

This was referenced Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build Improvements or additions to the build process
Projects
None yet
2 participants