Aust1n46 / VentureChat

GNU General Public License v3.0
37 stars 46 forks source link

Some messages throw an exception since the 1.20.4 update (3.7.0) #106

Closed Nanpure closed 5 months ago

Nanpure commented 6 months ago

Updated Paper Spigot. VentureChat 3.7.0. Clean server.

Type in chat: 1.20.4

The chat disappears into the ether and is not visible to yourself or other players. The plugin also throws an exception in the log:

[04:01:52 WARN]: [VentureChat] Plugin VentureChat v3.7.0 generated an exception while executing task 92
java.lang.IllegalStateException: Unable to invoke method public static net.minecraft.network.chat.IChatMutableComponent net.minecraft.network.chat.IChatBaseComponent$ChatSerializer.b(java.lang.String)
        at com.comphenix.protocol.reflect.accessors.DefaultMethodAccessor.invoke(DefaultMethodAccessor.java:25) ~[ProtocolLib-679.jar:?]
        at com.comphenix.protocol.wrappers.WrappedChatComponent.deserialize(WrappedChatComponent.java:73) ~[ProtocolLib-679.jar:?]
        at com.comphenix.protocol.wrappers.WrappedChatComponent.fromJson(WrappedChatComponent.java:109) ~[ProtocolLib-679.jar:?]
        at mineverse.Aust1n46.chat.utilities.Format.createPacketPlayOutChat(Format.java:473) ~[VentureChat-3.7.0.jar:?]
        at mineverse.Aust1n46.chat.listeners.ChatListener.handleVentureChatEvent(ChatListener.java:530) ~[VentureChat-3.7.0.jar:?]
        at mineverse.Aust1n46.chat.listeners.ChatListener.handleTrueAsyncPlayerChatEvent(ChatListener.java:497) ~[VentureChat-3.7.0.jar:?]
        at mineverse.Aust1n46.chat.listeners.ChatListener$1.run(ChatListener.java:53) ~[VentureChat-3.7.0.jar:?]
        at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.4.jar:git-Paper-378]
        at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.20.4.jar:git-Paper-378]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.20.4.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.JsonParseException: Not a JSON object: ["",{"text":"","extra":[{"text":"","color":"white"},{"text":"","color":"white","clickEvent":{"action":"run_command","value":"/chlist"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Channel: ","color":"white"},{"text":"Global","color":"dark_green"}]}}},{"text":"[","color":"white","clickEvent":{"action":"run_command","value":"/chlist"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Channel: ","color":"white"},{"text":"Global","color":"dark_green"}]}}},{"text":"Global","color":"dark_green","clickEvent":{"action":"run_command","value":"/chlist"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Channel: ","color":"white"},{"text":"Global","color":"dark_green"}]}}},{"text":"]","color":"white","clickEvent":{"action":"run_command","value":"/chlist"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Channel: ","color":"white"},{"text":"Global","color":"dark_green"}]}}},{"text":" ","color":"white"},{"text":"{vault_prefix}","color":"white","clickEvent":{"action":"run_command","value":"/help"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"I am default!","color":"red"}]}}},{"text":"","color":"white"},{"text":"{player_displayname}","color":"white","clickEvent":{"action":"suggest_command","value":"/msg {player_name}"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"I have no rank!","color":"gold"}]}}},{"text":"","color":"white"},{"text":":","color":"dark_green"}]},{"text":"","color":"white"},{"text":" ","color":"dark_green"},{"text":"1.20.4","color":"dark_green","underlined":"true","clickEvent":{"action":"open_url","value":"http://1.20.4"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"1.20.4","color":"dark_green"}]}}},{"text":"","color":"dark_green"}]
        at net.minecraft.Util.getOrThrow(Util.java:882) ~[?:?]
        at net.minecraft.network.chat.Component$Serializer.deserialize(Component.java:291) ~[?:?]
        at net.minecraft.network.chat.Component$Serializer.fromJsonLenient(Component.java:325) ~[?:?]
        at com.comphenix.protocol.reflect.accessors.DefaultMethodAccessor.invoke(DefaultMethodAccessor.java:23) ~[ProtocolLib-679.jar:?]
        ... 12 more
mercurialmusic commented 6 months ago

Confirming the same on my end. Mostly affects messages over Velocity - not sure if it's the same or different issue, but all chats regardless of bungeecord setting, permission, or even range show up as duplicated in vanilla chat on the non-origin servers. Everything otherwise seems to look normal on the origin server (range and permission are respected, chats aren't duplicated). https://gist.github.com/mercurialmusic/926f771cc1dc1f2d824d969635dc3c69

Using VentureChat 3.7.0 on git-Paper-381 (MC: 1.20.4) with ProtocolLib b679 and Velocity 3.3.0-SNAPSHOT (git-408b420a-b316).

Nanpure commented 5 months ago

This seems to be fixed in 3.7.1. We've deployed this version and everything seems to be working great so far.

@mercurialmusic can you confirm whether or not you're still having problems?

mercurialmusic commented 5 months ago

Thanks for the heads up. I haven't been able to test again yet, but am somewhat wary/weary after spending an hour on it yesterday for it to fail. Will probably wait a bit before trying again and can do a new issue if mine persists.

Nanpure commented 5 months ago

@mercurialmusic I'm closing this because it solves my reported issue. Please open a new issue if you continue to have problems in your testing.