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

Malformed .json error. #153

Open
2 tasks done
Sullivannephew opened this issue Jul 4, 2023 · 4 comments
Open
2 tasks done

Malformed .json error. #153

Sullivannephew opened this issue Jul 4, 2023 · 4 comments
Assignees

Comments

@Sullivannephew
Copy link

Expected behavior

the plugin to work, after this error occurs the plugin ceases to function

Observed/Actual behavior

I was setting up shops on my server and then all of the sudden the plugin stopped working and console spit out a bunch of text. When this happens and I right click a sign it just lets me edit it. It is also adking for a .err file but one was not made. Here is the error:

[18:00:34 ERROR]: [TradeShop] Could not load c;;world;;44;;-209.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: Use JsonReader.setLenient(true) to accept malformed JSON at line 3589 column 5 path $
at com.google.gson.JsonParser.parseReader(JsonParser.java:76) ~[gson-2.10.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonConfiguration.loadFile(JsonConfiguration.java:116) ~[TradeShop-2.6.1-DEV.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonShopConfiguration.loadFile(JsonShopConfiguration.java:62) ~[TradeShop-2.6.1-DEV.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonConfiguration.(JsonConfiguration.java:63) ~[TradeShop-2.6.1-DEV.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonShopConfiguration.(JsonShopConfiguration.java:45) ~[TradeShop-2.6.1-DEV.jar:?]
at org.shanerx.tradeshop.data.storage.DataStorage.lambda$getShopCountInWorld$10(DataStorage.java:170) ~[TradeShop-2.6.1-DEV.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.1.jar:git-Paper-62]
at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.20.1.jar:git-Paper-62]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.20.1.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 3589 column 5 path $
at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1657) ~[gson-2.10.jar:?]
at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1463) ~[gson-2.10.jar:?]
at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:551) ~[gson-2.10.jar:?]
at com.google.gson.stream.JsonReader.peek(JsonReader.java:433) ~[gson-2.10.jar:?]
at com.google.gson.JsonParser.parseReader(JsonParser.java:71) ~[gson-2.10.jar:?]
... 11 more
[18:00:34 WARN]: [Essentials] You're 2 EssentialsX dev build(s) out of date!
[18:00:34 WARN]: [Essentials] Download it here: https://essentialsx.net/downloads.html
[18:00:34 ERROR]: [TradeShop] Could not save c;;world;;44;;-209.json file! Writing err to console.
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 3589 column 5 path $
at com.google.gson.JsonParser.parseReader(JsonParser.java:76) ~[gson-2.10.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonConfiguration.loadFile(JsonConfiguration.java:116) ~[TradeShop-2.6.1-DEV.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonShopConfiguration.loadFile(JsonShopConfiguration.java:62) ~[TradeShop-2.6.1-DEV.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonConfiguration.(JsonConfiguration.java:63) ~[TradeShop-2.6.1-DEV.jar:?]
at org.shanerx.tradeshop.data.storage.Json.JsonShopConfiguration.(JsonShopConfiguration.java:45) ~[TradeShop-2.6.1-DEV.jar:?]
at org.shanerx.tradeshop.data.storage.DataStorage.lambda$getShopCountInWorld$10(DataStorage.java:170) ~[TradeShop-2.6.1-DEV.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.1.jar:git-Paper-62]
at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.20.1.jar:git-Paper-62]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.20.1.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 3589 column 5 path $
at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1657) ~[gson-2.10.jar:?]
at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1463) ~[gson-2.10.jar:?]
at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:551) ~[gson-2.10.jar:?]
at com.google.gson.stream.JsonReader.peek(JsonReader.java:433) ~[gson-2.10.jar:?]
at com.google.gson.JsonParser.parseReader(JsonParser.java:71) ~[gson-2.10.jar:?]
... 11 more
[18:00:34 ERROR]: [TradeShop] com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 3589 column 5 path $

Steps/models to reproduce

Seems to happen when i go over a certain number of shops created.

Plugin list

Bukkit Plugins:

  • ArmorStandTools, ChatGames, CoreProtect, DiscordSRV, Essentials, EssentialsChat, floodgate, Geyser-Spigot, GraveStonesPlus, GSit,
    ImageMaps, LuckPerms, ShulkerPacks, squaremap, TAB, VeinMiner, ViaBackwards, ViaVersion, voicechat, WorldEdit,
    WorldGuard

TradeShop version and Minecraft version (CraftBukkit/Spigot/Paper/...)

TradeShop-2.6.1-DEV
1.20 Java
Paper version [#62]

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

No response

@SparklingComet
Copy link
Member

Please send the .err file with the same name to the TradeShop Devs.

^

@Sullivannephew
Copy link
Author

it did not generate that file anywhere

@KillerOfPie
Copy link
Collaborator

it did not generate that file anywhere

It's inside the data folder ./plugins/tradeshop/data/worldName I think that's the correct path

this is probably fixed on a newer dev version(fixing another problem now and it should be up later today).

@KillerOfPie
Copy link
Collaborator

KillerOfPie commented Jul 21, 2023

This is fixed in #156

It Should correct any existing files. If it does not, you can open the file and search for } ". Then delete everything after the } that is found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants