[SPIGOT-7492] Bukkit's object serializer doesn't upgrade 1.20.1->1.20.2 data Created: 28/Sep/23  Updated: 25/Dec/24  Resolved: 28/Sep/23

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Hazar Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: 1.20.2, bug, bukkit, spigot
Environment:

Windows 11, Java 17


Version: CraftBukkit version 3893-Spigot-a0f3d48-251af0d (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

I was using AuctionMaster and I'm not java expert but I fixed some crash and dupe issues after qKing don't have enough time to maintain it.

And I upgraded all player datas since 1.15.2 without any error. I upgrade it without any wipes 1.15,1.16,1.17...1.20.2. And as always, I updated my server again. I upgraded it 1.20.1 to 1.20.2. After that I get this error:

 

java.lang.IllegalArgumentException: Length of Base64 encoded input string is not a multiple of 4.
[00:20:19] [Server thread/INFO]: [AuctionMasterItemDisplay] Enabling AuctionMasterItemDisplay v2.1
[00:20:19] [Server thread/WARN]: java.lang.NullPointerException: Profile name must not be null
[00:20:19] [Server thread/WARN]:     at java.base/java.util.Objects.requireNonNull(Objects.java:233)
[00:20:19] [Server thread/WARN]:     at me.qKing12.AuctionMasterItemDisplay.utils.setSkullOwner(utils.java:118)
[00:20:19] [Server thread/WARN]:     at me.qKing12.AuctionMasterItemDisplay.Heads.<init>(Heads.java:84)
[00:20:19] [Server thread/WARN]:     at me.qKing12.AuctionMasterItemDisplay.AuctionMasterItemDisplay.onEnable(AuctionMasterItemDisplay.java:49)
[00:20:19] [Server thread/WARN]:     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:266)
[00:20:19] [Server thread/WARN]:     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342)
[00:20:19] [Server thread/WARN]:     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480)
[00:20:19] [Server thread/WARN]:     at org.bukkit.craftbukkit.v1_20_R2.CraftServer.enablePlugin(CraftServer.java:548)
[00:20:19] [Server thread/WARN]:     at org.bukkit.craftbukkit.v1_20_R2.CraftServer.enablePlugins(CraftServer.java:462)
[00:20:19] [Server thread/WARN]:     at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:577)
[00:20:19] [Server thread/WARN]:     at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:400)
[00:20:19] [Server thread/WARN]:     at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:250)
[00:20:19] [Server thread/WARN]:     at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:954)
[00:20:19] [Server thread/WARN]:     at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:298)
[00:20:19] [Server thread/WARN]:     at java.base/java.lang.Thread.run(Thread.java:833)

 

 

Bukkit's object serializer can't upgrade the old datas correctly.

 

Same exception at AuctionItemDisplay prints for AuctionMaster when I use Paper.

 

And "java.lang.NullPointerException: Profile name must not be null" error comes from https://github.com/rudde0/AuctionMa...e/qKing12/AuctionMaster/Utils/Utils.java#L144



 Comments   
Comment by md_5 [ 28/Sep/23 ]

[00:20:19] [Server thread/WARN]: at me.qKing12.AuctionMasterItemDisplay.utils.setSkullOwner(utils.java:118)

Comment by Hazar [ 28/Sep/23 ]

Not 100%, first line comes from catch block which belongs to AuctionMaster.

[00:20:16] [Server thread/INFO]: [AuctionMaster] Enabling AuctionMaster v4.1.3
[00:20:16] [Server thread/INFO]: [PlaceholderAPI] Successfully registered expansion: auctionmaster [1.0.0]
[00:20:16] [Server thread/INFO]: [AuctionMaster] Succesfully connected to the Deliveries SQL.
[00:20:16] [Server thread/WARN]: [AuctionMaster] Auctions database is ready!
[00:20:16] [Server thread/WARN]: [AuctionMaster] AuctionLists database is ready!
[00:20:16] [Server thread/WARN]: [AuctionMaster] PreviewData database is ready!
[00:20:17] [Server thread/INFO]: Environment: Environment[accountsHost=https://api.mojang.com, sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[00:20:19] [Server thread/WARN]: [AuctionMaster] Unable to decode class type. java.lang.IllegalArgumentException: Length of Base64 encoded input string is not a multiple of 4.
[00:20:19] [Server thread/WARN]: 5404df4b-8437-47ee-8cc4-9f5f2d89a2a8 removed from auctionPreviewItems, itemData: 17000
[00:20:19] [Server thread/INFO]: [AuctionMasterItemDisplay] Enabling AuctionMasterItemDisplay v2.1
[00:20:19] [Server thread/WARN]: java.lang.NullPointerException: Profile name must not be null
[00:20:19] [Server thread/WARN]:     at java.base/java.util.Objects.requireNonNull(Objects.java:233)
[00:20:19] [Server thread/WARN]:     at me.qKing12.AuctionMasterItemDisplay.utils.setSkullOwner(utils.java:118)
[00:20:19] [Server thread/WARN]:     at me.qKing12.AuctionMasterItemDisplay.Heads.<init>(Heads.java:84)
[00:20:19] [Server thread/WARN]:     at me.qKing12.AuctionMasterItemDisplay.AuctionMasterItemDisplay.onEnable(AuctionMasterItemDisplay.java:49)
[00:20:19] [Server thread/WARN]:     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:266)
[00:20:19] [Server thread/WARN]:     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342)
[00:20:19] [Server thread/WARN]:     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480)
[00:20:19] [Server thread/WARN]:     at org.bukkit.craftbukkit.v1_20_R2.CraftServer.enablePlugin(CraftServer.java:548)
[00:20:19] [Server thread/WARN]:     at org.bukkit.craftbukkit.v1_20_R2.CraftServer.enablePlugins(CraftServer.java:462)
[00:20:19] [Server thread/WARN]:     at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:577)
[00:20:19] [Server thread/WARN]:     at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:400)
[00:20:19] [Server thread/WARN]:     at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:250)
[00:20:19] [Server thread/WARN]:     at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:954)
[00:20:19] [Server thread/WARN]:     at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:298)
[00:20:19] [Server thread/WARN]:     at java.base/java.lang.Thread.run(Thread.java:833) 

Everything was fine until 1.20.2. At least was fine since 1.15.2.

Comment by md_5 [ 28/Sep/23 ]

The first stack trace is an issue with AuctionMasterItemDisplay

Comment by Hazar [ 28/Sep/23 ]

So is Paper should fix this? Or what is the source of the error? The stack trace which I sent first place is belongs to spigot console. And the stack trace above is belongs to paper's console.

Comment by md_5 [ 28/Sep/23 ]

That stack trace has nothing to do with Spigot

Comment by Hazar [ 28/Sep/23 ]

qKing thinks serializer struggles when player head data convertion for new version. Stack trace has less information in Spigot. Let me show the stack trace when I run Paper:

 

[00:22:32] [Server thread/WARN]: [AuctionMaster] Unable to decode class type. java.io.IOException: Failed to deserialize object
[00:22:32] [Server thread/ERROR]: [org.bukkit.configuration.serialization.ConfigurationSerialization] Could not call method 'public static com.destroystokyo.paper.profile.CraftPlayerProfile com.destroystokyo.paper.profile.CraftPlayerProfile.deserialize(java.util.Map)' of class com.destroystokyo.paper.profile.CraftPlayerProfile for deserialization
java.lang.NullPointerException: Profile name must not be null
    at java.util.Objects.requireNonNull(Objects.java:233) ~[?:?]
    at com.mojang.authlib.GameProfile.<init>(GameProfile.java:31) ~[authlib-5.0.47.jar:?]
    at com.destroystokyo.paper.profile.CraftPlayerProfile.<init>(CraftPlayerProfile.java:39) ~[purpur-1.20.2.jar:git-Purpur-2064]
    at com.destroystokyo.paper.profile.CraftPlayerProfile.deserialize(CraftPlayerProfile.java:312) ~[purpur-1.20.2.jar:git-Purpur-2064]
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[?:?]
    at java.lang.reflect.Method.invoke(Method.java:577) ~[?:?]
    at org.bukkit.configuration.serialization.ConfigurationSerialization.deserializeViaMethod(ConfigurationSerialization.java:85) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.configuration.serialization.ConfigurationSerialization.deserialize(ConfigurationSerialization.java:127) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.configuration.serialization.ConfigurationSerialization.deserializeObject(ConfigurationSerialization.java:207) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.util.io.BukkitObjectInputStream.resolveObject(BukkitObjectInputStream.java:49) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:?]
    at java.io.ObjectInputStream.checkResolve(ObjectInputStream.java:1808) ~[?:?]
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1757) ~[?:?]
    at java.io.ObjectInputStream.readArray(ObjectInputStream.java:2181) ~[?:?]
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1745) ~[?:?]
    at java.io.ObjectInputStream$FieldValues.<init>(ObjectInputStream.java:2630) ~[?:?]
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2481) ~[?:?]
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2281) ~[?:?]
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1757) ~[?:?]
    at java.io.ObjectInputStream$FieldValues.<init>(ObjectInputStream.java:2630) ~[?:?]
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2481) ~[?:?]
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2281) ~[?:?]
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1757) ~[?:?]
    at java.io.ObjectInputStream.readArray(ObjectInputStream.java:2181) ~[?:?]
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1745) ~[?:?]
    at java.io.ObjectInputStream$FieldValues.<init>(ObjectInputStream.java:2630) ~[?:?]
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2481) ~[?:?]
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2281) ~[?:?]
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1757) ~[?:?]
    at java.io.ObjectInputStream$FieldValues.<init>(ObjectInputStream.java:2630) ~[?:?]
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2481) ~[?:?]
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2281) ~[?:?]
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1757) ~[?:?]
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:538) ~[?:?]
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:496) ~[?:?]
    at me.qKing12.AuctionMaster.Utils.Utils.itemFromBase64(Utils.java:143) ~[AuctionMaster-4.1.3.jar:?]
    at me.qKing12.AuctionMaster.AuctionObjects.AuctionBIN.<init>(AuctionBIN.java:94) ~[AuctionMaster-4.1.3.jar:?]
    at me.qKing12.AuctionMaster.database.SQLiteDatabase.loadAuctionsDataFromFile(SQLiteDatabase.java:486) ~[AuctionMaster-4.1.3.jar:?]
    at me.qKing12.AuctionMaster.database.SQLiteDatabase.<init>(SQLiteDatabase.java:58) ~[AuctionMaster-4.1.3.jar:?]
    at me.qKing12.AuctionMaster.AuctionMaster.onEnable(AuctionMaster.java:222) ~[AuctionMaster-4.1.3.jar:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:?]
    at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[purpur-1.20.2.jar:git-Purpur-2064]
    at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[purpur-1.20.2.jar:git-Purpur-2064]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[purpur-api-1.20.2-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.craftbukkit.v1_20_R2.CraftServer.enablePlugin(CraftServer.java:658) ~[purpur-1.20.2.jar:git-Purpur-2064]
    at org.bukkit.craftbukkit.v1_20_R2.CraftServer.enablePlugins(CraftServer.java:569) ~[purpur-1.20.2.jar:git-Purpur-2064]
    at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:630) ~[purpur-1.20.2.jar:git-Purpur-2064]
    at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:427) ~[purpur-1.20.2.jar:git-Purpur-2064]
    at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:342) ~[purpur-1.20.2.jar:git-Purpur-2064]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1100) ~[purpur-1.20.2.jar:git-Purpur-2064]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[purpur-1.20.2.jar:git-Purpur-2064]
    at java.lang.Thread.run(Thread.java:833) ~[?:?] 

 

 
 

Comment by md_5 [ 28/Sep/23 ]

Your stack trace points to a method which is not in the API and does not exist in the source code you linked and you have not provided any info or test case around what is failing to be upgraded (or how that relates at all to the stack trace which again is not in API code)

E: Your stack trace is from https://www.spigotmc.org/resources/auctionmasteritemdisplay-addon.79002/ (not the source you linked) and which decompilation reveals is using broken reflection, not a Spigot bug and nothing to do with object serializer

Generated at Thu Apr 03 16:26:11 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.