TechnicJelle / BlueMapFloodgate

Minecraft Paper plugin and BlueMap addon that adds GeyserMC/floodgate support
Mozilla Public License 2.0
13 stars 2 forks source link

NoSuchFileException #5

Closed weihao closed 2 years ago

weihao commented 2 years ago
smp_1             | [15:19:31 INFO]: [BlueMapFloodgate] Overwriting BlueMap's head with floodgate head
smp_1             | [15:19:31 WARN]: java.nio.file.NoSuchFileException: plugins/BlueMapFloodgate/playerheads/00000000-0000-0000-0009-<removed user uuid partials>.png
smp_1             | [15:19:31 WARN]:    at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
smp_1             | [15:19:31 WARN]:    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
smp_1             | [15:19:31 WARN]:    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
smp_1             | [15:19:31 WARN]:    at java.base/sun.nio.fs.UnixCopyFile.copy(UnixCopyFile.java:548)
smp_1             | [15:19:31 WARN]:    at java.base/sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:258)
smp_1             | [15:19:31 WARN]:    at java.base/java.nio.file.Files.copy(Files.java:1305)
smp_1             | [15:19:31 WARN]:    at BlueMapFloodgate-1.3.3-BETA.jar//net.mctechnic.bluemapfloodgate.main.floodgateJoin(main.java:207)      
smp_1             | [15:19:31 WARN]:    at BlueMapFloodgate-1.3.3-BETA.jar//net.mctechnic.bluemapfloodgate.main.lambda$new$0(main.java:115)       
smp_1             | [15:19:31 WARN]:    at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftTask.run(CraftTask.java:101)
smp_1             | [15:19:31 WARN]:    at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
smp_1             | [15:19:31 WARN]:    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)   
smp_1             | [15:19:31 WARN]:    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
smp_1             | [15:19:31 WARN]:    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
smp_1             | [15:19:31 WARN]:    at java.base/java.lang.Thread.run(Thread.java:833)
TechnicJelle commented 2 years ago

Which versions of Minecraft, Paper, Geyser, and Floodgate are you using? Then I'll try and see if I can replicate this issue myself

weihao commented 2 years ago

1.18.1

Paper

This server is running Paper version git-Paper-81 (MC: 1.18.1) (Implementing API version 1.18.1-R0.1-SNAPSHOT) (Git: 8c189d0)
You are running the latest version
Previous version: git-Paper-79 (MC: 1.18.1)

Geyser-Velocity https://ci.opencollab.dev/job/GeyserMC/job/Geyser/job/master/957/

Floodgate-Velocity https://ci.opencollab.dev/job/GeyserMC/job/Floodgate/job/master/53/

TechnicJelle commented 2 years ago

You're using Floodgate for Velocity, not Spigot?

weihao commented 2 years ago

That's right

weihao commented 2 years ago

I am able to reproduce this everytime I join in BE.

TechnicJelle commented 2 years ago

I have absolutely no experience with Velocity at all, and I have zero idea how it works, so if I can't reproduce this error with the Spigot version, I'm afraid I can't really do much. If that is the case, maybe someone else can fix it in a PR, or if I ever start using Velocity myself, I'll see if I can fix it then. But first! I'm going to see if I can reproduce it with the Spigot version soon.

TechnicJelle commented 2 years ago

By the way, another small question that may or may not be related: Did you change BlueMap's default webroot in any way? Cause at the moment, the plugin doesn't support different webroots and your issue here made me remember that I completely forgot to update that, which I'll definitely need to do (tracking that in #6)

weihao commented 2 years ago
# Default is "bluemap/web"
webroot: "bluemap/web"
TechnicJelle commented 2 years ago

Okay, so it's not that problem. Too bad, because that would have been an easy fix, haha! We're looking into it! (No ETA, though)

weihao commented 2 years ago

shouldn't the playerheads be overwritten to $webroot/assets/playerheads/?

why are you overwriting it to plugins/BlueMapFloodgate/playerheads/?

TechnicJelle commented 2 years ago

For caching purposes. BlueMapFloodgate only gets the playerhead once every three days (by default; changeable in the config). It then stores it in its own plugin folder and every time someone joins, it replaces BlueMap's playerhead with a copy from BlueMapFloodgate's cache.

TechnicJelle commented 2 years ago

On a slightly unrelated note, could you please also list all the plugins on the backend Minecraft server?

weihao commented 2 years ago

AdvancedTeleport, BlueBridgeCore, BlueBridgeGP, BlueMap, Chunky, CoreProtect, CreativeManager, DiscordSRV, floodgate, Gamemode-Change, GriefPrevention, Harbor, LuckPerms, PrometheusExporter, SpigotPing, UltimateAutoRestart, Vault, WorldEdit, WorldGuard

TechnicJelle commented 2 years ago

Okay, good news! I can reproduce this error myself without Velocity, just on a normal Paper server. This means I'll be able to diagnose it and hopefully fix it myself. I can't do that right now, because I've got quite a lot to do at the moment, but I'll try to work on it somewhere in the next week(end) or so Thanks for trying out my plugin and for reporting this bug!

TechnicJelle commented 2 years ago
I'll just put the whole error here, for my own later reference: ``` [00:19:28 INFO]: [Geyser-Spigot] /[0:0:0:0:0:0:0:1]:53451 tried to connect! [00:19:28 INFO]: [Geyser-Spigot] Player connected with username TechnicJelle [00:19:29 INFO]: [Geyser-Spigot] TechnicJelle (logged in as: TechnicJelle) has connected to the Java server [00:19:29 INFO]: UUID of player .TechnicJelle is 00000000-0000-0000-0009-01f2ee851f15 [00:19:29 INFO]: [floodgate] Floodgate player logged in as .TechnicJelle joined (UUID: 00000000-0000-0000-0009-01f2ee851f15) [00:19:30 INFO]: .TechnicJelle joined the game [00:19:30 INFO]: .TechnicJelle[/[0:0:0:0:0:0:0:1]:0] logged in with entity id 228 at ([world]-1.5, 88.0, -9.5) [00:19:31 WARN]: java.io.FileNotFoundException: https://api.geysermc.org/v1/skin/2535417685810965 [00:19:31 WARN]: at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1993) [00:19:31 WARN]: at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589) [00:19:31 WARN]: at java.base/java.net.URLConnection.getContent(URLConnection.java:753) [00:19:31 WARN]: at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getContent(HttpsURLConnectionImpl.java:404) [00:19:31 WARN]: at BlueMapFloodgate-1.3.3-BETA.jar//net.mctechnic.bluemapfloodgate.main.getTextureID(main.java:238) [00:19:31 WARN]: at BlueMapFloodgate-1.3.3-BETA.jar//net.mctechnic.bluemapfloodgate.main.getHeadToOwnFolder(main.java:215) [00:19:31 WARN]: at BlueMapFloodgate-1.3.3-BETA.jar//net.mctechnic.bluemapfloodgate.main.floodgateJoin(main.java:200) [00:19:31 WARN]: at BlueMapFloodgate-1.3.3-BETA.jar//net.mctechnic.bluemapfloodgate.main.lambda$onJoin$3(main.java:162) [00:19:31 WARN]: at java.base/java.util.Optional.ifPresentOrElse(Optional.java:196) [00:19:31 WARN]: at BlueMapFloodgate-1.3.3-BETA.jar//net.mctechnic.bluemapfloodgate.main.lambda$onJoin$5(main.java:161) [00:19:31 WARN]: at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftTask.run(CraftTask.java:101) [00:19:31 WARN]: at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) [00:19:31 WARN]: at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) [00:19:31 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [00:19:31 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [00:19:31 WARN]: at java.base/java.lang.Thread.run(Thread.java:833) [00:19:31 WARN]: java.io.FileNotFoundException: http://textures.minecraft.net/texture/null [00:19:31 WARN]: at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1993) [00:19:31 WARN]: at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589) [00:19:31 WARN]: at java.base/java.net.URL.openStream(URL.java:1161) [00:19:31 WARN]: at BlueMapFloodgate-1.3.3-BETA.jar//net.mctechnic.bluemapfloodgate.main.getSkinFromID(main.java:256) [00:19:31 WARN]: at BlueMapFloodgate-1.3.3-BETA.jar//net.mctechnic.bluemapfloodgate.main.getHeadToOwnFolder(main.java:216) [00:19:31 WARN]: at BlueMapFloodgate-1.3.3-BETA.jar//net.mctechnic.bluemapfloodgate.main.floodgateJoin(main.java:200) [00:19:31 WARN]: at BlueMapFloodgate-1.3.3-BETA.jar//net.mctechnic.bluemapfloodgate.main.lambda$onJoin$3(main.java:162) [00:19:31 WARN]: at java.base/java.util.Optional.ifPresentOrElse(Optional.java:196) [00:19:31 WARN]: at BlueMapFloodgate-1.3.3-BETA.jar//net.mctechnic.bluemapfloodgate.main.lambda$onJoin$5(main.java:161) [00:19:31 WARN]: at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftTask.run(CraftTask.java:101) [00:19:31 WARN]: at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) [00:19:31 WARN]: at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) [00:19:31 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [00:19:31 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [00:19:31 WARN]: at java.base/java.lang.Thread.run(Thread.java:833) [00:19:31 INFO]: [BlueMapFloodgate] Overwriting BlueMap's head with floodgate head [00:19:31 WARN]: java.nio.file.NoSuchFileException: plugins\BlueMapFloodgate\playerheads\00000000-0000-0000-0009-01f2ee851f15.png [00:19:31 WARN]: at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85) [00:19:31 WARN]: at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103) [00:19:31 WARN]: at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108) [00:19:31 WARN]: at java.base/sun.nio.fs.WindowsFileCopy.copy(WindowsFileCopy.java:99) [00:19:31 WARN]: at java.base/sun.nio.fs.WindowsFileSystemProvider.copy(WindowsFileSystemProvider.java:284) [00:19:31 WARN]: at java.base/java.nio.file.Files.copy(Files.java:1305) [00:19:31 WARN]: at BlueMapFloodgate-1.3.3-BETA.jar//net.mctechnic.bluemapfloodgate.main.floodgateJoin(main.java:207) [00:19:31 WARN]: at BlueMapFloodgate-1.3.3-BETA.jar//net.mctechnic.bluemapfloodgate.main.lambda$onJoin$3(main.java:162) [00:19:31 WARN]: at java.base/java.util.Optional.ifPresentOrElse(Optional.java:196) [00:19:31 WARN]: at BlueMapFloodgate-1.3.3-BETA.jar//net.mctechnic.bluemapfloodgate.main.lambda$onJoin$5(main.java:161) [00:19:31 WARN]: at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftTask.run(CraftTask.java:101) [00:19:31 WARN]: at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) [00:19:31 WARN]: at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) [00:19:31 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [00:19:31 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [00:19:31 WARN]: at java.base/java.lang.Thread.run(Thread.java:833) [00:19:42 INFO]: UUID of player TechnicJelle is 3e6b6179-b774-450e-bd16-e6f24ec7185c [00:19:42 INFO]: TechnicJelle joined the game [00:19:42 INFO]: TechnicJelle[/127.0.0.1:54493] logged in with entity id 282 at ([world]-10.35863061146269, 86.0, 8.800480656293319) ```
weihao commented 2 years ago

https://api.geysermc.org/v1/skin/2535417685810965 returns 404

TechnicJelle commented 2 years ago

It sure does, yep! I believe this to indeed be the problem at hand. I'll need to figure out a way to get that fixed up. I've asked in the Geyser support Discord for the new way of getting the textureID from the xuid, so I hope that'll be answered soon and I can start thinking about how to implement it.

lebestnoob commented 2 years ago

I don't know if you already have a fix for this but it seems like the GeyserMC developers have deprecated v1 from their API and v2 is the one that is used now. In v2, they have slightly modified the JSON and removed the data key from it. I have made the necessary changes in my fork, and from my own testing, my modification seems to work fine. You can download it in the actions tab or the releases page.

TechnicJelle commented 2 years ago

I had indeed already found the fix, I just hadn't gotten around to implementing it, so thanks a lot for doing that! I'll merge it, if you don't mind :)

TechnicJelle commented 2 years ago

@weihao, the fix has been included in the newest release! And thanks again to @lebestnoob for fixing it so quickly!

lebestnoob commented 2 years ago

You're welcome!