[SPIGOT-6012] JsonParseException disconnect client Created: 21/Jul/20 Updated: 07/Jan/21 Resolved: 21/Jul/20 |
|
| Status: | Closed |
| Project: | Spigot |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | corentin | Assignee: | Unassigned |
| Resolution: | Invalid | Votes: | 0 |
| Labels: | 1.16.1, Chat, jsonParser | ||
| Environment: |
Debian 9 |
||
| Attachments: |
|
| Version: | git-Spigot-0509002-6b95d59 (1.16) |
| Guidelines Read: | Yes |
| Description |
|
When a text message is sent by a plugins in chat to a player, the player is disconnected for a JsonParseException. It don't happen when the server fresh start but after a certain amount of time. When the issue happen, some other text aren't sendt to the player (ex: /lands help or /bwarp) and with spigot debug enable, I obtain this error in the console : [10:12:01] Netty Epoll Server IO #1/ERROR: java.lang.StackOverflowError
Plugins list:
|
| Comments |
| Comment by Janmm14 [ 07/Jan/21 ] |
|
Please look at SPIGOT-6056 for further discussion of this issue as well as a first idea of why its happening:
As I see the original issue creator also uses DiscordSRV here further hardens that my solution might be correct. |
| Comment by Leonardo Fiori [ 31/Dec/20 ] |
|
@Markus I actually use both ProtocolLib and ViaVersion but ViaVersion is installed on the Bungee proxy, ProtocolLib is on the Spigot/Paper server |
| Comment by Markus Steiner [ 30/Dec/20 ] |
|
I have a full stack trace of the StackOverflowError now. As I have already said in my previous post the stack trace contains this method. However, it also looks like ViaVersion and ProtocolLib interfere here as you can see in the stack trace but the ComponentSerializer.toString(BaseComponent) method is invoked regardless of whether ViaVersion or ProtocolLib is used or not. The question is if ViaVersion or ProtocolLib modifies the chat component and possibly introduces circular references. Also in this case AAC5 tried to send a message to me. The message was [17:11:44] [Server thread/INFO]: AAC <username> - Spectate in this case. I played with version 1.16.4 on the 1.16.4 server git-Paper-343 (MC: 1.16.4). ViaVersion 3.2.1, ViaBackwards 3.2.0, ViaRewind 1.5.3, ProtocolLib 4.6.0-SNAPSHOT-b482. @Leonardo Fiori do you use ViaVersion or ProtocolLib? |
| Comment by Leonardo Fiori [ 29/Dec/20 ] |
|
@Markus finally a smart answer here. This issue has been affecting me since months! Can confirm 100% that it's not related to paper, but it affects also spigot. Can confirm it is not related to bungee and also it's not related to any plugin |
| Comment by Markus Steiner [ 29/Dec/20 ] |
|
I have the same issue on Paper 1.16.4 (I know this is the Spigot issue tracker, however, this is most likely an issue of the ComponentSerializer). It happens randomly after running the server for a few hours. Once it happens, it happens again and again all the time a chat component message is sent to the client by a plugin for example. This is the stack trace shown in the logs. Unfortunately it's not complete because the JVM has an artificial limit of 1024 entries for the stack trace of an exception or error. I wanted to use -XX:MaxJavaStackTraceDepth=0 to get the root cause, however, when I restarted the server I wasn't able to reproduce it. The plugins I have in common with the above listed plugins are PlaceholderAPI, ProtocolLib, Vault, WorldEdit and DiscordSRV. The plugin sending the chat component messages was AAC5, however, this is most likely not a plugin issue. Probably there are circular references within the chat component objects, which are serialized using Gson when sent to the client here. Gson doesn't support circular references, resulting in a never ending recursion and therefore a StackOverflowError. |
| Comment by Leonardo Fiori [ 26/Aug/20 ] |
|
Why has it been closed?? On my server is still happening periodically! Only way to fix is a restart of the spigot server! |
| Comment by corentin [ 25/Aug/20 ] |
|
I guess this issue need to be reopened. More and more users obtain this issue and not necessarily with Bungeecord. It seems a Spigot/Bukkit side issue because some users have the same issue without using BungeeCord/Waterfall network. Duplicate : |
| Comment by corentin [ 08/Aug/20 ] |
|
Maybe we can compare our plugin list to found similar plugins installed @hosom
|
| Comment by Leonardo Fiori [ 07/Aug/20 ] |
|
This is happening to all my plugins that have clickable text too.. only after i updated to 1.16 from 1.15. All plugins are updated too. For example core protect. |
| Comment by Black Hole [ 21/Jul/20 ] |
|
The screenshot shows JSON which is invalid for chat components. This is a plugin issue. |
| Comment by blablubbabc [ 21/Jul/20 ] |
|
Consider asking the author of that plugin about this issue. They probably know better which potentially problematic text messages they sent to players. If they can track it down to a Spigot issue, they can still report it as such, together with a minimal reproducible example demonstrating the issue. |
| Comment by corentin [ 21/Jul/20 ] |
|
I guess it concerning message that include clickable content. |
| Comment by corentin [ 21/Jul/20 ] |
|
For example, when I right click on a shop (QuickShop), I'm kicked when the plugin try to parse the message to show me shop informations... |
| Comment by blablubbabc [ 21/Jul/20 ] |
|
> "When a text message is sent by a plugins in chat to a player" Might be a plugin issue. Maybe you can be a little bit more specific about which plugin is sending this message, what the message is in detail, and how the plugin creates that message. Also consider posting a full server log of the error with context. |