GeyserMC / Geyser

A bridge/proxy allowing you to connect to Minecraft: Java Edition servers with Minecraft: Bedrock Edition.
https://geysermc.org
MIT License
4.69k stars 674 forks source link

could not decode packet! #4380

Closed CNDogc closed 7 months ago

CNDogc commented 8 months ago

Describe the bug

When Bedrock Edition players are playing on the server, they are always forced to disconnect from time to time. Judging from the hint, it seems that the language file of one of my plugins does not have a paragraph that does not conform to the JSON format, but I have never changed it before that

To Reproduce

1:The Bedrock Edition player enters the game 2:Forced to disconnect after playing for a while 3:BC's console began to appear:[

io.netty.handler.codec.DecoderException: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Not a JSON Object: ["§7系统§r- ","Rewards has been distributed! "]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:98) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:333) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:454) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Not a JSON Object: ["§7系统§r- ","Rewards has been distributed! "]
        at com.google.gson.Gson.fromJson(Gson.java:1238) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.Gson.fromJson(Gson.java:1329) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.Gson.fromJson(Gson.java:1300) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.internal.bind.TreeTypeAdapter$GsonContextImpl.deserialize(TreeTypeAdapter.java:179) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.chat.BaseComponentSerializer.deserialize(BaseComponentSerializer.java:140) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.chat.TextComponentSerializer.deserialize(TextComponentSerializer.java:25) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.chat.TextComponentSerializer.deserialize(TextComponentSerializer.java:13) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:76) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.Gson.fromJson(Gson.java:1227) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.Gson.fromJson(Gson.java:1329) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.Gson.fromJson(Gson.java:1300) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.internal.bind.TreeTypeAdapter$GsonContextImpl.deserialize(TreeTypeAdapter.java:179) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.chat.ComponentSerializer.deserialize(ComponentSerializer.java:171) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.chat.ComponentSerializer.deserialize(ComponentSerializer.java:29) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:76) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.Gson.fromJson(Gson.java:1227) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.Gson.fromJson(Gson.java:1329) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.Gson.fromJson(Gson.java:1271) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.chat.ComponentSerializer.deserialize(ComponentSerializer.java:118) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.protocol.DefinedPacket.readBaseComponent(DefinedPacket.java:117) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.protocol.packet.SystemChat.read(SystemChat.java:27) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.protocol.DefinedPacket.read(DefinedPacket.java:517) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.protocol.MinecraftDecoder.decode(MinecraftDecoder.java:62) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.protocol.MinecraftDecoder.decode(MinecraftDecoder.java:13) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        ... 22 more
Caused by: java.lang.IllegalStateException: Not a JSON Object: ["§7系统§r- ","Rewards has been distributed! "]
        at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:101) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.chat.ComponentSerializer.deserialize(ComponentSerializer.java:154) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.chat.ComponentSerializer.deserialize(ComponentSerializer.java:29) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:76) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:72) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.Gson.fromJson(Gson.java:1227) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.Gson.fromJson(Gson.java:1329) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.Gson.fromJson(Gson.java:1300) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.internal.bind.TreeTypeAdapter$GsonContextImpl.deserialize(TreeTypeAdapter.java:179) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.chat.BaseComponentSerializer.deserialize(BaseComponentSerializer.java:140) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.chat.TextComponentSerializer.deserialize(TextComponentSerializer.java:25) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.chat.TextComponentSerializer.deserialize(TextComponentSerializer.java:13) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:76) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.Gson.fromJson(Gson.java:1227) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.Gson.fromJson(Gson.java:1329) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.Gson.fromJson(Gson.java:1300) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.internal.bind.TreeTypeAdapter$GsonContextImpl.deserialize(TreeTypeAdapter.java:179) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.chat.ComponentSerializer.deserialize(ComponentSerializer.java:171) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.chat.ComponentSerializer.deserialize(ComponentSerializer.java:29) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:76) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.Gson.fromJson(Gson.java:1227) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.Gson.fromJson(Gson.java:1329) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at com.google.gson.Gson.fromJson(Gson.java:1271) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.chat.ComponentSerializer.deserialize(ComponentSerializer.java:118) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.protocol.DefinedPacket.readBaseComponent(DefinedPacket.java:117) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.protocol.packet.SystemChat.read(SystemChat.java:27) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.protocol.DefinedPacket.read(DefinedPacket.java:517) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.protocol.MinecraftDecoder.decode(MinecraftDecoder.java:62) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at net.md_5.bungee.protocol.MinecraftDecoder.decode(MinecraftDecoder.java:13) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88) ~[waterfall-1.20-560.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:e927093:560]
        ... 22 more
[01:19:39 INFO]: [BE_RedbloodWind2] disconnected with: The server you were previously on went down, you have been connected to a fallback server
[01:19:39 INFO]: [BE_Yuexi2005] disconnected with: The server you were previously on went down, you have been connected to a fallback server

Expected behaviour

Hopefully this issue can be fixed and fixed

Screenshots / Videos

No response

Server Version and Plugins

Current: git-Purpur-2095 (MC: 1.20.2) Previous: git-Purpur-2092 (MC: 1.20.2) 01:45:19 INFO: Bukkit Plugins: (81): 01:45:19 INFO: - AdventCalendar, AureliumSkills, AuthMe, AuthMeTitles, BedrockPlayerSupport, BetterRTP, BungeeTabListPlus, Chunky, Citizens, CMILib 01:45:19 INFO: CommandBlocker, ConsoleSpamFix, CustomSprays, DecentHolograms, DeluxeMenus, eBackup, EChatPapi, EnderDragon, Essentials, EssentialsChat 01:45:19 INFO: EssentialsSpawn, FightLogger, floodgate, GeyserHacks, GeyserSkinManager, GrimAC, GSit, GUIHelper, HolographicDisplays, HungerKeeperPlus 01:45:19 INFO: InventoryRollbackPlus, ItemCommand, ItemsAdder, LiteSignIn, LockettePro, LoneLibs, LuckPerms, MiniMOTD, ModelEngine, Multiverse-Core 01:45:19 INFO: MythicMobs, NBTAPI, OpenInv, PartyGames, PlaceholderAPI, PlayerPoints, PlayerTitle, PlayerTop, PlaytimeRewards, Prism 01:45:19 INFO: ProtocolLib, PvPManager, QuickShop, QuickShopForm, RayTraceAntiXray, RealisticSeasons, RedPacketRain, ReleaseCommand, Residence, ResidenceForm 01:45:19 INFO: Scoreboard, Sentinel, ServerMonitor, SkinsRestorer, spark, Stp, Tamablefoxes, *TDRPlaytime, Themis, Tpa 01:45:19 INFO: TrackMyMiner, UltraSetHome, Vault, VeinMiner, ViaBackwards, ViaRewind, ViaVersion, Vulcan, WkKit, WorldEdit

Geyser Dump

https://dump.geysermc.org/EmAMzXccjMJ31gw8GjmtVbSpPwFB7m3H

Geyser Version

Geyser-BungeeCord build411

Minecraft: Bedrock Edition Device/Version

1.20.51

Additional Context

No response

Konicai commented 8 months ago

Share your logs using a paste website such https://mclo.gs please

CNDogc commented 8 months ago

请使用粘贴网站 https://mclo.gs 共享您的日志

https://[api.mclo.gs/1/raw/Y1emAQA](https://api.mclo.gs/1/raw/Y1emAQA)

onebeastchris commented 7 months ago

Are you using ViaVersion on the backend server? If so, then which version of it? I suspect that this has been fixed in ViaVersion 4.9.3 - https://github.com/ViaVersion/ViaVersion/commit/b6ba7dcc4494cd829b42af87ce487d5b0943d1a5 specifically

CNDogc commented 7 months ago

您是否在后端服务器上使用 ViaVersion?如果是这样,那么它是哪个版本的?我怀疑这已在 ViaVersion 4.9.3 中修复 - ViaVersion/ViaVersion@b6ba7dc

Yes, the problem has been resolved