You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The only way to get the shop plugin up and running is either fixing the JSON manually deleting the relevant entry or deleting the JSON entirely.
Steps/models to reproduce
Having the ProtectionStones plugin and the latest version of TradeShop in a PaperMC server.
Generate the default ProtectionStone block using /ps get 64
Follow the steps advised under /ts setup to create a shop
Set any price but set the Product to be the relevant protection stone block, I do this by using the '/ts addProduct' command with the relevant block at hand
Leave the Protection Stone block inside of the chest
Restart the server
What will happen is that, on server restart, the JSON file that stores the data of the TradeShop plugin will get malformed, it will display a console message saying something about an 'err' file that doesn't get generated.
I pin this down to the ProtectionStone incompatibility because other blocks do not get this error. However, I haven't experimented enough to say that this bug could be extended to other blocks that would possess other special metadata and the plugin doesn't parse this right.
Plugin list
These are the other plugins installed, I uninstalled TradeShop when exporting this list.
TradeShop version and Minecraft version (CraftBukkit/Spigot/Paper/...)
[14:19:54 INFO]: This server is running Paper version git-Paper-318 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: 9271ee7)
You are running the latest version
TradeShop 2.6.1-STABLE by Lori00 & KillerOfPie
/tradeshop Display help message
/ts help Display help message
/ts setup Display shop setup tutorial
/ts bugs Report bugs to the developers
/ts metrics Displays the plugins counted metrics.
/ts reload Reload configuration files
Agreements
I have searched for and ensured there isn't already an open issue regarding this.
My version of Minecraft and TradeShop are supported by the TradeShop Dev Team (when in doubt, first ask on the Discord).
Other
LOGS!
On server initialization:
[13:37:51] [Server thread/INFO]: [TradeShop] Enabling TradeShop v2.6.1-STABLE
[13:37:51] [Server thread/ERROR]: [TradeShop Debug - DATA_ERROR] FLATFILE Malformed Files Found: 1
[13:37:51] [Server thread/ERROR]: [TradeShop Debug - DATA_ERROR] # of empty player files that couldn't be deleted: 0
[13:37:51] [Server thread/INFO]: [TradeShop] Metrics successfully initialized!
[13:37:51] [Server thread/INFO]: [spark] Enabling spark v1.10.58
[13:37:51] [Thread-14/INFO]: [TradeShop] [Updater] You are running the latest version of the plugin!
...
[13:37:59] [Craft Scheduler Thread - 21 - TradeShop/ERROR]: [TradeShop] Could not load c;;SurvivalPVE;;14;;-8.json file due to malformed Json!
Please send the .err file with the same name to the TradeShop Devs.
TradeShop will now disable, please remove/fix any err files before restarting the plugin.
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated string at line 26 column 82 path $.l::SurvivalPVE::234.0::65.0::-120.0.product[0].itemStack.meta.display-name
at com.google.gson.internal.Streams.parse(Streams.java:61) ~[gson-2.10.1.jar:?]
at com.google.gson.JsonParser.parseReader(JsonParser.java:102) ~[gson-2.10.1.jar:?]
at com.google.gson.JsonParser.parseReader(JsonParser.java:70) ~[gson-2.10.1.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonConfiguration.loadFile(JsonConfiguration.java:115) ~[TradeShop-2.6.1-STABLE.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonShopConfiguration.loadFile(JsonShopConfiguration.java:145) ~[TradeShop-2.6.1-STABLE.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonConfiguration.<init>(JsonConfiguration.java:63) ~[TradeShop-2.6.1-STABLE.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonShopConfiguration.<init>(JsonShopConfiguration.java:51) ~[TradeShop-2.6.1-STABLE.jar:?]
at org.shanerx.tradeshop.data.storage.DataStorage.lambda$getShopCountInWorld$10(DataStorage.java:237) ~[TradeShop-2.6.1-STABLE.jar:?]
at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.2.jar:git-Paper-318]
at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.20.2.jar:git-Paper-318]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.20.2.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: com.google.gson.stream.MalformedJsonException: Unterminated string at line 26 column 82 path $.l::SurvivalPVE::234.0::65.0::-120.0.product[0].itemStack.meta.display-name
at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1659) ~[gson-2.10.1.jar:?]
at com.google.gson.stream.JsonReader.nextQuotedValue(JsonReader.java:1044) ~[gson-2.10.1.jar:?]
at com.google.gson.stream.JsonReader.nextString(JsonReader.java:826) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.TypeAdapters$28.readTerminal(TypeAdapters.java:747) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:791) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:725) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.Streams.parse(Streams.java:49) ~[gson-2.10.1.jar:?]
... 13 more
[13:37:59] [Craft Scheduler Thread - 34 - Vault/INFO]: [Vault] No new version available
[13:37:59] [Craft Scheduler Thread - 21 - TradeShop/ERROR]: [TradeShop] Could not save c;;SurvivalPVE;;14;;-8.json file! Writing err to console.
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated string at line 26 column 82 path $.l::SurvivalPVE::234.0::65.0::-120.0.product[0].itemStack.meta.display-name
at com.google.gson.internal.Streams.parse(Streams.java:61) ~[gson-2.10.1.jar:?]
at com.google.gson.JsonParser.parseReader(JsonParser.java:102) ~[gson-2.10.1.jar:?]
at com.google.gson.JsonParser.parseReader(JsonParser.java:70) ~[gson-2.10.1.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonConfiguration.loadFile(JsonConfiguration.java:115) ~[TradeShop-2.6.1-STABLE.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonShopConfiguration.loadFile(JsonShopConfiguration.java:145) ~[TradeShop-2.6.1-STABLE.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonConfiguration.<init>(JsonConfiguration.java:63) ~[TradeShop-2.6.1-STABLE.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonShopConfiguration.<init>(JsonShopConfiguration.java:51) ~[TradeShop-2.6.1-STABLE.jar:?]
at org.shanerx.tradeshop.data.storage.DataStorage.lambda$getShopCountInWorld$10(DataStorage.java:237) ~[TradeShop-2.6.1-STABLE.jar:?]
at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.2.jar:git-Paper-318]
at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.20.2.jar:git-Paper-318]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.20.2.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: com.google.gson.stream.MalformedJsonException: Unterminated string at line 26 column 82 path $.l::SurvivalPVE::234.0::65.0::-120.0.product[0].itemStack.meta.display-name
at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1659) ~[gson-2.10.1.jar:?]
at com.google.gson.stream.JsonReader.nextQuotedValue(JsonReader.java:1044) ~[gson-2.10.1.jar:?]
at com.google.gson.stream.JsonReader.nextString(JsonReader.java:826) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.TypeAdapters$28.readTerminal(TypeAdapters.java:747) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:791) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:725) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.Streams.parse(Streams.java:49) ~[gson-2.10.1.jar:?]
... 13 more
[13:37:59] [Craft Scheduler Thread - 21 - TradeShop/ERROR]: [TradeShop] com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated string at line 26 column 82 path $.l::SurvivalPVE::234.0::65.0::-120.0.product[0].itemStack.meta.display-name
--------------------------------------------------------------------------------------
{
"l::SurvivalPVE::234.0::65.0::-120.0": {
"shopLoc": {
"div": "::",
"worldName": "SurvivalPVE",
"x": 234.0,
"y": 65.0,
"z": -120.0
},
"owner": {
"player": "e2056b4f-cd45-4064-9091-7e2cc62a3aaf",
"role": "OWNER"
},
"managers": [],
"members": [],
"shopType": "TRADE",
"product": [
{
"itemStack": {
"==": "org.bukkit.inventory.ItemStack",
"v": 3578,
"type": "EMERALD_ORE",
"meta": {
"==": "ItemMeta",
"meta-type": "UNSPECIFIC",
"display-name": "{\"extra\":[{\"text\":\"64 Radius Protection Block\"
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated string at line 26 column 82 path $.l::SurvivalPVE::234.0::65.0::-120.0.product[0].itemStack.meta.display-name
at com.google.gson.internal.Streams.parse(Streams.java:61) ~[gson-2.10.1.jar:?]
at com.google.gson.JsonParser.parseReader(JsonParser.java:102) ~[gson-2.10.1.jar:?]
at com.google.gson.JsonParser.parseReader(JsonParser.java:70) ~[gson-2.10.1.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonConfiguration.loadFile(JsonConfiguration.java:115) ~[TradeShop-2.6.1-STABLE.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonShopConfiguration.loadFile(JsonShopConfiguration.java:145) ~[TradeShop-2.6.1-STABLE.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonConfiguration.<init>(JsonConfiguration.java:63) ~[TradeShop-2.6.1-STABLE.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonShopConfiguration.<init>(JsonShopConfiguration.java:51) ~[TradeShop-2.6.1-STABLE.jar:?]
at org.shanerx.tradeshop.data.storage.DataStorage.lambda$getShopCountInWorld$10(DataStorage.java:237) ~[TradeShop-2.6.1-STABLE.jar:?]
at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.2.jar:git-Paper-318]
at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.20.2.jar:git-Paper-318]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.20.2.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: com.google.gson.stream.MalformedJsonException: Unterminated string at line 26 column 82 path $.l::SurvivalPVE::234.0::65.0::-120.0.product[0].itemStack.meta.display-name
at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1659) ~[gson-2.10.1.jar:?]
at com.google.gson.stream.JsonReader.nextQuotedValue(JsonReader.java:1044) ~[gson-2.10.1.jar:?]
at com.google.gson.stream.JsonReader.nextString(JsonReader.java:826) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.TypeAdapters$28.readTerminal(TypeAdapters.java:747) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:791) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:725) ~[gson-2.10.1.jar:?]
at com.google.gson.internal.Streams.parse(Streams.java:49) ~[gson-2.10.1.jar:?]
... 13 more
[13:37:59] [Craft Scheduler Thread - 21 - TradeShop/WARN]: [TradeShop] Plugin TradeShop v2.6.1-STABLE generated an exception while executing task 70
java.lang.NullPointerException: Cannot invoke "com.google.gson.JsonObject.entrySet()" because "this.jsonObj" is null
at org.shanerx.tradeshop.data.storage.Json.JsonShopConfiguration.loadFile(JsonShopConfiguration.java:147) ~[TradeShop-2.6.1-STABLE.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonConfiguration.<init>(JsonConfiguration.java:63) ~[TradeShop-2.6.1-STABLE.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonShopConfiguration.<init>(JsonShopConfiguration.java:51) ~[TradeShop-2.6.1-STABLE.jar:?]
at org.shanerx.tradeshop.data.storage.DataStorage.lambda$getShopCountInWorld$10(DataStorage.java:237) ~[TradeShop-2.6.1-STABLE.jar:?]
at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.2.jar:git-Paper-318]
at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.20.2.jar:git-Paper-318]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.20.2.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.lang.Thread.run(Thread.java:1583) ~[?:?]
The text was updated successfully, but these errors were encountered:
Expected behavior
JSON files should not be corrupted, instead according to the response to issue 153 from PR 156 the program should correct existing files.
Observed/Actual behavior
JSON file gets corrupted, e.g:
Causing the plugin to crash on start.
The only way to get the shop plugin up and running is either fixing the JSON manually deleting the relevant entry or deleting the JSON entirely.
Steps/models to reproduce
What will happen is that, on server restart, the JSON file that stores the data of the TradeShop plugin will get malformed, it will display a console message saying something about an 'err' file that doesn't get generated.
I pin this down to the ProtectionStone incompatibility because other blocks do not get this error. However, I haven't experimented enough to say that this bug could be extended to other blocks that would possess other special metadata and the plugin doesn't parse this right.
Plugin list
These are the other plugins installed, I uninstalled TradeShop when exporting this list.
[14:15:48 INFO]: Server Plugins (30):
[14:15:48 INFO]: Paper Plugins:
[14:15:48 INFO]: - BKCommonLib, MarriageMaster
[14:15:48 INFO]: Bukkit Plugins:
[14:15:48 INFO]: - AdvancedRegionMarket, ChatEmojis, Citizens, CoreProtect, Essentials, EssentialsChat, EssentialsSpawn, Factions, FancyHolograms, FastAsyncWorldEdit
[14:15:48 INFO]: IridiumSkyblock, LibsDisguises, LightCleaner, LuckPerms, LWC, MobArena, Multiverse-Core, Multiverse-Portals, PlaceholderAPI, PlotSquared
[14:15:48 INFO]: ProtectionStones, ProtocolLib, Randomtp, ServerBackup, spark, UltraCosmetics, Vault, WorldGuard
TradeShop version and Minecraft version (CraftBukkit/Spigot/Paper/...)
[14:19:54 INFO]: This server is running Paper version git-Paper-318 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: 9271ee7)
You are running the latest version
TradeShop 2.6.1-STABLE by Lori00 & KillerOfPie
/tradeshop Display help message
/ts help Display help message
/ts setup Display shop setup tutorial
/ts bugs Report bugs to the developers
/ts metrics Displays the plugins counted metrics.
/ts reload Reload configuration files
Agreements
Other
LOGS!
On server initialization:
The text was updated successfully, but these errors were encountered: