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

internal server error when executing "list" through /server/exec #234

Open
phybros opened this issue Jul 14, 2023 · 0 comments
Open

internal server error when executing "list" through /server/exec #234

phybros opened this issue Jul 14, 2023 · 0 comments

Comments

@phybros
Copy link
Collaborator

phybros commented Jul 14, 2023

$ curl -i -X 'POST' 'http://localhost:4567/v1/server/exec' -H 'accept: */*' -H 'key: change_me' -H 'Content-Type: application/x-www-form-urlencoded' -d 'command=list&time='

HTTP/1.1 500 Server Error
Date: Fri, 14 Jul 2023 17:29:22 GMT
Content-Type: application/json
Content-Length: 145

{
    "title": "Server Error",
    "status": 500,
    "type": "https://javalin.io/documentation#internalservererrorresponse",
    "details": {}
}%

error in the server log is

[13:29:22 WARN]: [io.javalin.Javalin] Uncaught exception
java.lang.RuntimeException: java.util.concurrent.CompletionException: java.lang.RuntimeException: An error occurred while executing command
	at io.servertap.api.v1.ServerApi.lambda$postCommand$7(ServerApi.java:663) ~[ServerTap.jar:?]
	at java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:990) ~[?:?]
	at java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:974) ~[?:?]
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
	at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2194) ~[?:?]
	at io.servertap.ServerExecCommandSender.lambda$executeCommand$1(ServerExecCommandSender.java:41) ~[ServerTap.jar:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577) ~[?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
	at java.lang.Thread.run(Thread.java:1623) ~[?:?]
Caused by: java.util.concurrent.CompletionException: java.lang.RuntimeException: An error occurred while executing command
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332) ~[?:?]
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347) ~[?:?]
	at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:708) ~[?:?]
	... 9 more
Caused by: java.lang.RuntimeException: An error occurred while executing command
	... 7 more
Caused by: java.util.concurrent.ExecutionException: org.bukkit.command.CommandException: Unhandled exception executing 'list' in org.bukkit.craftbukkit.v1_19_R3.command.VanillaCommandWrapper(list)
	at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftFuture.get(CraftFuture.java:73) ~[paper-1.19.4.jar:git-Paper-508]
	at io.servertap.ServerExecCommandSender.lambda$executeCommand$1(ServerExecCommandSender.java:38) ~[ServerTap.jar:?]
	... 6 more
Caused by: org.bukkit.command.CommandException: Unhandled exception executing 'list' in org.bukkit.craftbukkit.v1_19_R3.command.VanillaCommandWrapper(list)
	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:165) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_19_R3.CraftServer.dispatchCommand(CraftServer.java:906) ~[paper-1.19.4.jar:git-Paper-508]
	at org.bukkit.Bukkit.dispatchCommand(Bukkit.java:980) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
	at io.servertap.ServerExecCommandSender.lambda$executeCommand$0(ServerExecCommandSender.java:32) ~[ServerTap.jar:?]
	at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftFuture.run(CraftFuture.java:88) ~[paper-1.19.4.jar:git-Paper-508]
	at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[paper-1.19.4.jar:git-Paper-508]
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1483) ~[paper-1.19.4.jar:git-Paper-508]
	at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:447) ~[paper-1.19.4.jar:git-Paper-508]
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1397) ~[paper-1.19.4.jar:git-Paper-508]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1174) ~[paper-1.19.4.jar:git-Paper-508]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[paper-1.19.4.jar:git-Paper-508]
	... 1 more
Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.command.CommandSender.hasPermission(String)" because the return value of "net.minecraft.commands.CommandListenerWrapper.getBukkitSender()" is null
	at net.minecraft.commands.Commands.lambda$new$0(Commands.java:235) ~[?:?]
	at com.mojang.brigadier.tree.CommandNode.canUse(CommandNode.java:79) ~[paper-1.19.4.jar:git-Paper-508]
	at com.mojang.brigadier.CommandDispatcher.parseNodes(CommandDispatcher.java:359) ~[paper-1.19.4.jar:?]
	at com.mojang.brigadier.CommandDispatcher.parse(CommandDispatcher.java:349) ~[paper-1.19.4.jar:?]
	at com.mojang.brigadier.CommandDispatcher.parse(CommandDispatcher.java:317) ~[paper-1.19.4.jar:?]
	at net.minecraft.commands.Commands.performPrefixedCommand(Commands.java:301) ~[?:?]
	at org.bukkit.craftbukkit.v1_19_R3.command.VanillaCommandWrapper.execute(VanillaCommandWrapper.java:45) ~[paper-1.19.4.jar:git-Paper-508]
	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_19_R3.CraftServer.dispatchCommand(CraftServer.java:906) ~[paper-1.19.4.jar:git-Paper-508]
	at org.bukkit.Bukkit.dispatchCommand(Bukkit.java:980) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
	at io.servertap.ServerExecCommandSender.lambda$executeCommand$0(ServerExecCommandSender.java:32) ~[ServerTap.jar:?]
	at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftFuture.run(CraftFuture.java:88) ~[paper-1.19.4.jar:git-Paper-508]
	at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[paper-1.19.4.jar:git-Paper-508]
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1483) ~[paper-1.19.4.jar:git-Paper-508]
	at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:447) ~[paper-1.19.4.jar:git-Paper-508]
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1397) ~[paper-1.19.4.jar:git-Paper-508]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1174) ~[paper-1.19.4.jar:git-Paper-508]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[paper-1.19.4.jar:git-Paper-508]
	... 1 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant