Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] DeSerialization failure on PlayerProfile and restoring it from 'qs_hikari_data' table #1784

Open
4 of 7 tasks
Dweezy750 opened this issue Oct 14, 2024 · 0 comments
Open
4 of 7 tasks
Labels
bug Something isn't working

Comments

@Dweezy750
Copy link

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 URL

https//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

  • I'm running Paper or Spigot, and not a fork
  • I confirm that Paper/Spigot has been updated to the latest build
  • I confirm that QuickShop-Hikari has been updated to the latest stable version released on Modrinth (or the latest CI version)
  • I confirm that I have not read these checkboxes and therefore I just ticked them all.
  • I confirm that I'm using QuickShop-Hikari, not QuickShop-Reremake, and I'm well aware that they're maintained by different people, and that Reremake issues shouldn't be reported here.
  • I confirm that I am running a server that is not a Hybird Server, (e.g. Mohist, Magma, CatServer, Banner, etc.), and I am aware that QuickShop-Hikari may not function properly on a Forge/Fabric hybrid server, and I am running at my own risk on such a server program, and I am aware that the I run such server-side programs at my own risk and know that I will not receive any support or help for this behavior.
  • I am well aware that if the Issue Ticket is not filled out correctly and completely, it will simply be closed without any response or reason.
@YuanYuanOwO YuanYuanOwO added the bug Something isn't working label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants