Backup & Restore nbt bug
yPedroDev opened this issue ยท 23 comments
Hello, would there be a way to fix this? When I enter the server, all my items and those of the players are simply reset. I end up getting this message when I try to restore:
[02:31:58 INFO]: yPedroDev issued server command: /bp restore yPedroDev_dab21994ec104c31ae4672124dd07a43_1718759564925
[02:31:58 ERROR]: [Minepacks] Failed to deserialize NBTItemStack
net.minecraft.nbt.ReportedNbtException: Loading NBT data
at net.minecraft.nbt.NbtIo.readTagSafe(NbtIo.java:416) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.nbt.NbtIo.readUnnamedTag(NbtIo.java:404) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.nbt.NbtIo.read(NbtIo.java:334) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.nbt.NbtIo.read(NbtIo.java:324) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at Minepacks.jar/at.pcgamingfreaks.MinepacksStandalone.libs.at.pcgamingfreaks.Bukkit.ItemStackSerializer.NBTItemStackSerializer_1_20_R4_Paper.deserialize(NBTItemStackSerializer_1_20_R4_Paper.java:63) ~[Minepacks.jar:?]
at Minepacks.jar/at.pcgamingfreaks.MinepacksStandalone.Bukkit.Database.InventorySerializer.deserialize(InventorySerializer.java:81) ~[Minepacks.jar:?]
at Minepacks.jar/at.pcgamingfreaks.MinepacksStandalone.Bukkit.Database.Files.readFile(Files.java:168) ~[Minepacks.jar:?]
at Minepacks.jar/at.pcgamingfreaks.MinepacksStandalone.Bukkit.Database.Database.loadBackup(Database.java:157) ~[Minepacks.jar:?]
at Minepacks.jar/at.pcgamingfreaks.MinepacksStandalone.Bukkit.Command.RestoreCommand.restore(RestoreCommand.java:86) ~[Minepacks.jar:?]
at Minepacks.jar/at.pcgamingfreaks.MinepacksStandalone.Bukkit.Command.RestoreCommand.execute(RestoreCommand.java:74) ~[Minepacks.jar:?]
at Minepacks.jar/at.pcgamingfreaks.MinepacksStandalone.Bukkit.Command.RestoreCommand.execute(RestoreCommand.java:38) ~[Minepacks.jar:?]
at Minepacks.jar/at.pcgamingfreaks.MinepacksStandalone.Bukkit.API.MinepacksCommand.doExecute(MinepacksCommand.java:129) ~[Minepacks.jar:?]
at Minepacks.jar/at.pcgamingfreaks.MinepacksStandalone.Bukkit.API.MinepacksCommand.doExecute(MinepacksCommand.java:38) ~[Minepacks.jar:?]
at Minepacks.jar/at.pcgamingfreaks.MinepacksStandalone.libs.at.pcgamingfreaks.Bukkit.Command.CommandExecutorWithSubCommandsGeneric.onCommand(CommandExecutorWithSubCommandsGeneric.java:39) ~[Minepacks.jar:?]
at Minepacks.jar/at.pcgamingfreaks.MinepacksStandalone.Bukkit.Command.CommandManager.onCommand(CommandManager.java:118) ~[Minepacks.jar:?]
at Minepacks.jar/at.pcgamingfreaks.MinepacksStandalone.libs.at.pcgamingfreaks.Bukkit.Command.RegisterablePluginCommand.execute(RegisterablePluginCommand.java:157) ~[Minepacks.jar:?]
at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:91) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:30) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:13) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:456) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.commands.Commands.performCommand(Commands.java:363) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.commands.Commands.performCommand(Commands.java:350) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.commands.Commands.performCommand(Commands.java:345) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2282) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$18(ServerGamePacketListenerImpl.java:2256) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1546) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:195) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1523) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1446) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1412) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1273) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:326) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.io.IOException: Invalid tag id: 31
at net.minecraft.nbt.TagType$1.createException(TagType.java:38) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.nbt.TagType$1.load(TagType.java:43) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.nbt.TagType$1.load(TagType.java:36) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
at net.minecraft.nbt.NbtIo.readTagSafe(NbtIo.java:410) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
... 41 more
the same error happens when the player enters the server, my server has a lot of people, and I have to resolve this orgently.
I have the same issue.
Luckly only 4 of over 50 people joined since the automatic Update. I set my server under maintenance, so no backpack can be override.
I tried to install an older Version of the last days, but still have the same error:
[Minepacks] Failed to deserialize NBTItemStack
No backup matching Cily30_dca098c7c98d4c0cbdfd3bdbb35385cf_1718785862724
But the file is in the Backup folder
Could you give this build a try. With it, I was able to restore your backup file.
I have the same issue. Luckly only 4 of over 50 people joined since the automatic Update. I set my server under maintenance, so no backpack can be override. I tried to install an older Version of the last days, but still have the same error: [Minepacks] Failed to deserialize NBTItemStack No backup matching Cily30_dca098c7c98d4c0cbdfd3bdbb35385cf_1718785862724
But the file is in the Backup folder
Can you please send me that file.
Also, what is the output of /version
.
Cily30_dca098c7c98d4c0cbdfd3bdbb35385cf_1718785862724.zip
Current Purpur Version: 1.20.6-2227-79d199c (MC: 1.20.6)*
- You are 6 version(s) behind
Download the new version at: https://purpurmc.org/downloads
Previous: 1.20.6-2226-86ad0b3 (MC: 1.20.6)
Pluign Version is now 2.4.31.2
On the frist look, it looks good. Players that didnt joined before the Update, have the backpacks as saved.
Sounds good.
For the ones that have joined since the update, you should be able to restore their backpack with the /backpack restre
command
Ok, there's just one problem, when players who had items enter the server, they will lose their items, yesterday I recovered my items manually, today I updated to the version you showed to update, when I went to test with my secondary account and my original , the items ended up being reset, but now the backup system works normally and the error also stopped happening, but I don't have a backup for all the players, just some, would it be possible to load the items without this having to happen? I looked in the database, and saw that the old players' items are still there, but when they enter the server they end up being reset.
I would expect v2.4.31.3 to load everything correctly, if that is not the case, please send me the backup file that was created for that case.
If you meant the .backpack files then, I will only be able to give one file because the others ended up being deleted because I thought they were corrupt, when I tried to restore the backups it said No "backup name here" matching.
Yes, please give me the backpack file.
If you still have an issue opening old backpacks in 2.4.31.3, there should be newly created ones anyway.
I have multiple feedbacks now. Everything works fine now. Thanks for the Update :)
BTW. this version works on 1.21 to :D
There is no tag id 31
The new version was just not handling compressed backpacks correctly.
But that should be fixed with 2.4.31.3
Loads fine for me. Can you please double-check that you are actually on v2.4.31.3 (/bp version
)
Ok, I realized that it seems to fix it, when I have problems I open another github issue. Thank you for your help
I can't use older versions, I've already tried but the plugin gives another error and ends up being disabled