brunyman/MPDB

deleting all armor that players are wearing when logging in to 4.10.0

Opened this issue · 9 comments

v4.10.0.jar//net.craftersland.data.bridge.events.handlers.InventoryDataHandler.setPlayerData(InventoryDataHandler.java:96)
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.events.handlers.InventoryDataHandler$2.run(InventoryDataHandler.java:240)
[22:25:24 WARN]: at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftTask.run(CraftTask.java:101)
[22:25:24 WARN]: at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:480)
[22:25:24 WARN]: at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1470)
[22:25:24 WARN]: at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:446)
[22:25:24 WARN]: at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1379)
[22:25:24 WARN]: at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1156)
[22:25:24 WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315)
[22:25:24 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)
[22:25:24 WARN]: Caused by: java.lang.reflect.InvocationTargetException
[22:25:24 WARN]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[22:25:24 WARN]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[22:25:24 WARN]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[22:25:24 WARN]: at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.readNbt(Version_1_20_R2.java:113)
[22:25:24 WARN]: ... 12 more
[22:25:24 WARN]: Caused by: java.lang.RuntimeException: Missing type on ListTag
[22:25:24 WARN]: at net.minecraft.nbt.NBTTagList$1.d(NBTTagList.java:34)
[22:25:24 WARN]: at net.minecraft.nbt.NBTTagList$1.a(NBTTagList.java:26)
[22:25:24 WARN]: at net.minecraft.nbt.NBTTagList$1.c(NBTTagList.java:17)
[22:25:24 WARN]: at net.minecraft.nbt.NBTCompressedStreamTools.a(NBTCompressedStreamTools.java:310)
[22:25:24 WARN]: ... 17 more
[22:25:24 WARN]: java.lang.IllegalArgumentException: Unable to read from java.io.DataInputStream@645c3e7a
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.readNbt(Version_1_20_R2.java:115)
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.fromBase64(Version_1_20_R2.java:86)
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.events.handlers.EnderchestDataHandler.setPlayerData(EnderchestDataHandler.java:66)
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.events.handlers.EnderchestDataHandler$2.run(EnderchestDataHandler.java:142)
[22:25:24 WARN]: at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftTask.run(CraftTask.java:101)
[22:25:24 WARN]: at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:480)
[22:25:24 WARN]: at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1470)
[22:25:24 WARN]: at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:446)
[22:25:24 WARN]: at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1379)
[22:25:24 WARN]: at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1156)
[22:25:24 WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315)
[22:25:24 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)
[22:25:24 WARN]: Caused by: java.lang.reflect.InvocationTargetException
[22:25:24 WARN]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[22:25:24 WARN]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[22:25:24 WARN]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[22:25:24 WARN]: at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.readNbt(Version_1_20_R2.java:113)
[22:25:24 WARN]: ... 11 more
[22:25:24 WARN]: Caused by: java.lang.RuntimeException: Missing type on ListTag
[22:25:24 WARN]: at net.minecraft.nbt.NBTTagList$1.d(NBTTagList.java:34)
[22:25:24 WARN]: at net.minecraft.nbt.NBTTagList$1.a(NBTTagList.java:26)
[22:25:24 WARN]: at net.minecraft.nbt.NBTTagList$1.c(NBTTagList.java:17)
[22:25:24 WARN]: at net.minecraft.nbt.NBTCompressedStreamTo

sorry I missed the top pasting

[22:24:43 INFO]: THUNDERFUNK left the game
[22:24:54 INFO]: [DiscordSRV] Chat: [Discord | THUNDERBOT] THUNDERBOT > :octagonal_sign: Server has stopped
[22:25:24 INFO]: UUID of player Araet is 6713b1b0-83c6-45e3-94bb-2c8a21658958
[22:25:24 INFO]: Araet joined the game
[22:25:24 INFO]: Araet[/24.59.211.156:60917] logged in with entity id 6540 at ([world]66.49821799998283, 75.18235999965668, 84.5)
[22:25:24 WARN]: java.lang.IllegalArgumentException: Unable to read from java.io.DataInputStream@6faebe95
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.readNbt(Version_1_20_R2.java:115)
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.fromBase64(Version_1_20_R2.java:86)
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.events.handlers.InventoryDataHandler.setInventory(InventoryDataHandler.java:320)
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.events.handlers.InventoryDataHandler.setPlayerData(InventoryDataHandler.java:95)
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.events.handlers.InventoryDataHandler$2.run(InventoryDataHandler.java:240)
[22:25:24 WARN]: at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftTask.run(CraftTask.java:101)
[22:25:24 WARN]: at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:480)
[22:25:24 WARN]: at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1470)
[22:25:24 WARN]: at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:446)
[22:25:24 WARN]: at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1379)
[22:25:24 WARN]: at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1156)
[22:25:24 WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315)
[22:25:24 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)
[22:25:24 WARN]: Caused by: java.lang.reflect.InvocationTargetException
[22:25:24 WARN]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[22:25:24 WARN]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[22:25:24 WARN]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[22:25:24 WARN]: at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.readNbt(Version_1_20_R2.java:113)
[22:25:24 WARN]: ... 12 more
[22:25:24 WARN]: Caused by: java.lang.RuntimeException: Missing type on ListTag
[22:25:24 WARN]: at net.minecraft.nbt.NBTTagList$1.d(NBTTagList.java:34)
[22:25:24 WARN]: at net.minecraft.nbt.NBTTagList$1.a(NBTTagList.java:26)
[22:25:24 WARN]: at net.minecraft.nbt.NBTTagList$1.c(NBTTagList.java:17)
[22:25:24 WARN]: at net.minecraft.nbt.NBTCompressedStreamTools.a(NBTCompressedStreamTools.java:310)
[22:25:24 WARN]: ... 17 more
[22:25:24 WARN]: java.lang.IllegalArgumentException: Unable to read from java.io.DataInputStream@320770af
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.readNbt(Version_1_20_R2.java:115)
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.fromBase64(Version_1_20_R2.java:86)
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.events.handlers.InventoryDataHandler.setArmor(InventoryDataHandler.java:399)
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.events.handlers.InventoryDataHandler.setPlayerData(InventoryDataHandler.java:96)
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.events.handlers.InventoryDataHandler$2.run(InventoryDataHandler.java:240)
[22:25:24 WARN]: at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftTask.run(CraftTask.java:101)
[22:25:24 WARN]: at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:480)
[22:25:24 WARN]: at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1470)
[22:25:24 WARN]: at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:446)
[22:25:24 WARN]: at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1379)
[22:25:24 WARN]: at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1156)
[22:25:24 WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315)
[22:25:24 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)
[22:25:24 WARN]: Caused by: java.lang.reflect.InvocationTargetException
[22:25:24 WARN]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[22:25:24 WARN]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[22:25:24 WARN]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[22:25:24 WARN]: at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.readNbt(Version_1_20_R2.java:113)
[22:25:24 WARN]: ... 12 more
[22:25:24 WARN]: Caused by: java.lang.RuntimeException: Missing type on ListTag
[22:25:24 WARN]: at net.minecraft.nbt.NBTTagList$1.d(NBTTagList.java:34)
[22:25:24 WARN]: at net.minecraft.nbt.NBTTagList$1.a(NBTTagList.java:26)
[22:25:24 WARN]: at net.minecraft.nbt.NBTTagList$1.c(NBTTagList.java:17)
[22:25:24 WARN]: at net.minecraft.nbt.NBTCompressedStreamTools.a(NBTCompressedStreamTools.java:310)
[22:25:24 WARN]: ... 17 more
[22:25:24 WARN]: java.lang.IllegalArgumentException: Unable to read from java.io.DataInputStream@645c3e7a
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.readNbt(Version_1_20_R2.java:115)
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.fromBase64(Version_1_20_R2.java:86)
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.events.handlers.EnderchestDataHandler.setPlayerData(EnderchestDataHandler.java:66)
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.events.handlers.EnderchestDataHandler$2.run(EnderchestDataHandler.java:142)
[22:25:24 WARN]: at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftTask.run(CraftTask.java:101)
[22:25:24 WARN]: at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:480)
[22:25:24 WARN]: at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1470)
[22:25:24 WARN]: at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:446)
[22:25:24 WARN]: at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1379)
[22:25:24 WARN]: at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1156)
[22:25:24 WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315)
[22:25:24 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)
[22:25:24 WARN]: Caused by: java.lang.reflect.InvocationTargetException
[22:25:24 WARN]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[22:25:24 WARN]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[22:25:24 WARN]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[22:25:24 WARN]: at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[22:25:24 WARN]: at MysqlPlayerDataBridge-v4.10.0.jar//net.craftersland.data.bridge.utils.nms.Version_1_20_R2.readNbt(Version_1_20_R2.java:113)
[22:25:24 WARN]: ... 11 more
[22:25:24 WARN]: Caused by: java.lang.RuntimeException: Missing type on ListTag
[22:25:24 WARN]: at net.minecraft.nbt.NBTTagList$1.d(NBTTagList.java:34)
[22:25:24 WARN]: at net.minecraft.nbt.NBTTagList$1.a(NBTTagList.java:26)
[22:25:24 WARN]: at net.minecraft.nbt.NBTTagList$1.c(NBTTagList.java:17)
[22:25:24 WARN]: at net.minecraft.nbt.NBTCompressedStreamTo

same issue

Hi, I need a bit more context, what sync modules you have enabled? A full log may help as this is posted when the plugin loads.
The error takes place on player join? Only the armor is lost, not the entire inventory content?

I cannot reproduce this error on my test server running Spigot 1.20.2, what server version and type are you using?

This error happen when server update from 1.20.1 to 1.20.2

Also tested with paper #223, right so only after update to 1.20.2? Did the player lost the entire inventory content or just the armor?

ok, I confirm the errors when loading older inventory content into 1.20.2 version, the reason being in 1.20.2 they did a lot of internal changes in the Minecraft NMS code, and this plugin uses that to decode the inventory content. Now if the server the player joins still has the user inventory files the plugin should load the content from there if those are deleted then the player will lose the inventory content as the NMS structure changed in 1.20.2.

I will look into and see if there is something I can do to handle this situation.

Thanks for looking into this! I was sleeping when most of this conversation happened. Please don't hesitate if you need any logs from me still and I'll get them to you as soon as I can.

Not able to fix it, broken due to a lot of changes to Minecraft NMS code and NBT tag changes.