[BUG] DeSerialization failure on PlayerProfile and restoring it from 'qs_hikari_data' table #1784
Open
4 of 7 tasks
Labels
bug
Something isn't working
Description
I guess some player renamed a player_head and sold it in his shops. Quickshop throws a error on startup but works normal.
The shop was empty after searching the coordinates in the tables and the head floating above the chest had a steve skin.
Steps to reproduce
Not sure, but get a player_head rename it with minecraft color codes and sell it in a quickshop chest.
The name of that player_head was '§6funny-name'
Expected Behaviour
Check for illegal characters in playername of a PlayerProfile.
Screenshots
[05:09:48] [Server thread/INFO]: [QuickShop-Hikari] Selected permission provider: Bukkit
[05:09:48] [Server thread/INFO]: [QuickShop-Hikari] Registering commands...
[05:09:48] [Server thread/INFO]: [QuickShop-Hikari] Loaded 1 rules for listener blacklist.
[05:09:48] [Server thread/INFO]: [QuickShop-Hikari] EventManager selected: QSEventManager
[05:09:49] [Server thread/WARN]: [QuickShop-Hikari] Failed to read rule example's a Currency option, invalid pattern *! Skipping...
[05:09:49] [Server thread/INFO]: [QuickShop-Hikari] Loaded 1 price restriction rules!
[05:09:49] [Server thread/INFO]: [QuickShop-Hikari] Loading shops from database...
[05:09:49] [Server thread/INFO]: [QuickShop-Hikari] Used 614ms to fetch 26383 shops from database.
[05:09:49] [Server thread/INFO]: [QuickShop-Hikari] Loading shops into memory...
[05:09:50] [ForkJoinPool-6-worker-1/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.IllegalArgumentException: The name of the profile contains invalid characters: §6funny-name
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:218) ~[guava-32.1.2-jre.jar:?]
at com.destroystokyo.paper.profile.CraftPlayerProfile.createAuthLibProfile(CraftPlayerProfile.java:298) ~[purpur-1.21.1.jar:1.21.1-DEV-2eaea6a]
at com.destroystokyo.paper.profile.CraftPlayerProfile.(CraftPlayerProfile.java:44) ~[purpur-1.21.1.jar:1.21.1-DEV-2eaea6a]
at com.destroystokyo.paper.profile.CraftPlayerProfile.deserialize(CraftPlayerProfile.java:361) ~[purpur-1.21.1.jar:1.21.1-DEV-2eaea6a]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
at org.bukkit.configuration.serialization.ConfigurationSerialization.deserializeViaMethod(ConfigurationSerialization.java:87) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.configuration.serialization.ConfigurationSerialization.deserialize(ConfigurationSerialization.java:129) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.configuration.serialization.ConfigurationSerialization.deserializeObject(ConfigurationSerialization.java:209) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.configuration.file.YamlConstructor$ConstructCustomObject.construct(YamlConstructor.java:58) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:264) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:247) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping2ndStep(BaseConstructor.java:576) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.SafeConstructor.constructMapping2ndStep(SafeConstructor.java:210) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping(BaseConstructor.java:552) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlMap.construct(SafeConstructor.java:597) ~[snakeyaml-2.2.jar:?]
at org.bukkit.configuration.file.YamlConstructor$ConstructCustomObject.construct(YamlConstructor.java:49) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:264) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:247) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping2ndStep(BaseConstructor.java:576) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.SafeConstructor.constructMapping2ndStep(SafeConstructor.java:210) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping(BaseConstructor.java:552) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlMap.construct(SafeConstructor.java:597) ~[snakeyaml-2.2.jar:?]
at org.bukkit.configuration.file.YamlConstructor$ConstructCustomObject.construct(YamlConstructor.java:49) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:264) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:247) ~[snakeyaml-2.2.jar:?]
at org.bukkit.configuration.file.YamlConstructor.construct(YamlConstructor.java:37) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.configuration.file.YamlConfiguration.fromNodeTree(YamlConfiguration.java:163) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:120) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.util.Util.deserialize(Util.java:338) ~[QuickShop-Hikari-6.2.0.7.jar:?]
at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.ShopLoader$DataRawDatabaseInfo.deserializeItem(ShopLoader.java:339) ~[QuickShop-Hikari-6.2.0.7.jar:?]
at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.ShopLoader$DataRawDatabaseInfo.(ShopLoader.java:333) ~[QuickShop-Hikari-6.2.0.7.jar:?]
at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.ShopLoader.loadSingleShop(ShopLoader.java:166) ~[QuickShop-Hikari-6.2.0.7.jar:?]
at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.ShopLoader.lambda$loadShopFromShopRecord$3(ShopLoader.java:118) ~[QuickShop-Hikari-6.2.0.7.jar:?]
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?]
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387) ~[?:?]
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312) ~[?:?]
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843) ~[?:?]
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808) ~[?:?]
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188) ~[?:?]
[05:09:51] [Server thread/INFO]: [QuickShop-Hikari] Used 2075ms to load 32 shops into memory (26351 shops will be loaded after chunks/world loaded).
[05:09:51] [Server thread/INFO]: [QuickShop-Hikari] Registering listeners...
[05:09:51] [Server thread/INFO]: [QuickShop-Hikari] BungeeCord messenger listener registered!
[05:09:51] [Server thread/INFO]: [QuickShop-Hikari] Cleaning MsgUtils...
/quickshop paste
URLhttps//you.can.request.it.if.needed
Additional Context
The stored value in the 'data' column in the 'qs_hikari_data' table was:
item:
==: org.bukkit.inventory.ItemStack
v: 3700
type: PLAYER_HEAD
meta:
==: ItemMeta
meta-type: SKULL
skull-owner:
==: PlayerProfile
name: §6funny-name
Checklist
The text was updated successfully, but these errors were encountered: