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

CommandAPI Failing to Load on Paper #543

Open
InTheRiches opened this issue Apr 12, 2024 · 3 comments
Open

CommandAPI Failing to Load on Paper #543

InTheRiches opened this issue Apr 12, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@InTheRiches
Copy link

CommandAPI version

9.3.0

Minecraft version

1.20.4

Are you shading the CommandAPI?

Yes

What I did

I installed CommandAPI and tried to register some basic commands through the API.

What actually happened

I got this error upon loading up the server.

[22:29:49 ERROR]: Caught previously unhandled exception :
[22:29:49 ERROR]: Paper Async Command Builder Thread Pool - 0
java.lang.IllegalStateException: zip file closed
        at java.util.zip.ZipFile.ensureOpen(ZipFile.java:831) ~[?:?]
        at java.util.zip.ZipFile.getEntry(ZipFile.java:330) ~[?:?]
        at java.util.jar.JarFile.getEntry(JarFile.java:518) ~[?:?]
        at java.util.jar.JarFile.getJarEntry(JarFile.java:473) ~[?:?]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:209) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:587) ~[?:?]
        at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:169) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:164) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
        at dev.jorel.commandapi.CommandAPIBukkit.wrapCommandSender(CommandAPIBukkit.java:410) ~[RPGProject.jar:?]
        at dev.jorel.commandapi.nms.NMS_Common.getCommandSenderFromCommandSource(NMS_Common.java:380) ~[RPGProject.jar:?]
        at dev.jorel.commandapi.nms.NMS_Common.getCommandSenderFromCommandSource(NMS_Common.java:94) ~[RPGProject.jar:?]
        at dev.jorel.commandapi.CommandAPIHandler.lambda$generatePermissions$1(CommandAPIHandler.java:362) ~[RPGProject.jar:?]
        at com.mojang.brigadier.tree.CommandNode.canUse(CommandNode.java:79) ~[paper-1.20.4.jar:git-Paper-385]
        at net.minecraft.commands.Commands.fillUsableCommands(Commands.java:536) ~[?:?]
        at net.minecraft.commands.Commands.sendAsync(Commands.java:488) ~[?:?]
        at net.minecraft.commands.Commands.lambda$sendCommands$6(Commands.java:467) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

I am currently running paper, and this appears to be a compatibility issue between CommandAPI and Paper.

What should have happened

The commands should have been properly registered and there should not have been an error.

Server logs and CommandAPI config

No response

Other

No response

@InTheRiches InTheRiches added the bug Something isn't working label Apr 12, 2024
@willkroboth
Copy link
Collaborator

Are you able to provide the full server log using a site like https://paste.gg/? Just running a Paper server while registering commands doesn't have anything coming up for me. The stack trace indicates that Java failed to load the BukkitPlayer class when running this line in the CommandAPI, which seems odd without any context.

From the stack trace, it looks like the server is responding to a player joining. The code that was being run sends a packet that tells a player which commands are available for them to use. So, it seems that the steps needed to reproduce this error include a player joining the server. Do you have more specific steps for making this error happen?

Do you have any other plugins on the server?

@InTheRiches
Copy link
Author

I already talked to Jorel about this, he has the full data. Just put this here as a reminder :)

@JorelAli
Copy link
Owner

JorelAli commented May 1, 2024

Yes, we did discuss this briefly, over in Discord here. Turns out, I was confusing this issue with #494, and they're not remotely related to one another.

Let's start from the beginning @InTheRiches, with a bit more info. As @willkroboth mentioned above, would it be possible to acquire the full server log (as opposed to just this section of the log with the error message)? A full server log may help us diagnose the issue further, because so far we've been unable to reproduce this issue in any of our test environments against any other versions of Paper, and this issue hasn't been reported by other Paper users (so it's likely something weird going on with your setup?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants