GeyserMC / Floodgate-Modded

Port of the hybrid mode plugin called Floodgate for Fabric and NeoForge to allow for connections from Geyser to join online mode servers.
MIT License
52 stars 18 forks source link

Packet was larger than I expected #127

Closed yqs112358 closed 4 months ago

yqs112358 commented 4 months ago

Describe the bug

This issue occasionally arises after the server has been open for a while. When the BE client joins the Java server via Geyser, it immediately exits and reports an error: Packet play/serverbound/minecraft:custom_payload (class_2817) was larger than I expected. After exiting, rejoining the server still reports the same error and forces an exit.

The logs on console shows below:

[14:01:34] [nioEventLoopGroup-4-1/INFO] (geyser) 玩家以 yqs112358 的用户名建立了连接
[14:01:34] [localSession-7-1/INFO] (geyser) yqs112358 (登录为: yqs112358) 已连接到 Java 服务器
[14:01:34] [pool-7-thread-5/INFO] (floodgate) Floodgate player who is logged in as yqs112358 10f0a400-1e07-47a5-9c53-48ad92434186 joined
[14:01:35] [Server thread/INFO] (class_3324) yqs112358[/39.144.154.58:0] logged in with entity id 34216 at (-64.759796, 68.0, 214.77344)
[14:01:35] [Server thread/INFO] (floodgate) Floodgate 玩家 yqs112358 加入了 (UUID: 10f0a400-1e07-47a5-9c53-48ad92434186)
[14:01:35] [Server thread/INFO] (MinecraftServer) yqs112358 joined the game
[14:01:35] [Geyser Fabric connection thread-6-2/INFO] (floodgate) Floodgate 玩家 yqs112358 已断开连接
[14:01:35] [localSession-7-1/INFO] (geyser) yqs112358 因为 Internal Exception: io.netty.handler.codec.DecoderException: java.io.IOException: Packet play/serverbound/minecraft:custom_payload (class_2817) was larger than I expected, found 991 bytes extra whilst reading packet serverbound/minecraft:custom_payload 与 Java 版服务器 断开了连接
[14:01:35] [Server thread/INFO] (class_3244) yqs112358 lost connection: Internal Exception: io.netty.handler.codec.DecoderException: java.io.IOException: Packet play/serverbound/minecraft:custom_payload (class_2817) was larger than I expected, found 991 bytes extra whilst reading packet serverbound/minecraft:custom_payload
[14:01:35] [Server thread/INFO] (MinecraftServer) yqs112358 left the game

Java clients has never encountered with this problem.

To Reproduce

Configure the corresponding MC 1.21 Fabric server and install the latest github actions builds of Geyser and Floodgate. Play game on the server normally for a while, then interoperability BE clients will start to be inaccessible to the game with this problem.

Expected behaviour

BE clients will never faced with this problem.

Screenshots / Videos

80aeaca6a6f5998dedd7b0b1ef1b1392

Server Version and Plugins

Minecraft Java Server 1.21
Fabric Loader 0.15.11
Geyser 2.4.0-b606 (git-master-efc8ba0) (Java: 1.21, Bedrock: 1.20.80/1.20.81 - 1.21.2)
Floodgate 2.2.3-SNAPSHOT (b102-4404c15)(branch: master)
Bedrock Client: Android 1.21.2.02

Mods loaded on server:

ActionLib-1.1.1-fabric.jar
bedrockify-1.9.6+mc1.21.jar
ChatImage-1.2.5+1.21+fabric.jar
cloth-config-15.0.127-fabric.jar
Dynmap-3.7-beta-6-fabric-1.21.jar
easyauth-mc1.21-3.0.25.jar
easywhitelist-mc1.20-rc1-1.0.1.jar
fabric-api-0.100.6+1.21.jar
fabric-carpet-1.21-1.4.147+v240613.jar
fabric-language-kotlin-1.11.0+kotlin.2.0.0.jar
ferritecore-7.0.0-fabric.jar
Floodgate-Fabric-2.2.3-SNAPSHOT+build.28.jar
floodgate-sqlite-database.jar
Geyser-Fabric.jar
gugle-carpet-addition-mc1.21-2.9.0+build.50.jar
image2map-0.7.0+1.21.jar
jline4mcdsrv-0.5.0.jar
ledger-1.3.4.jar
lithium-fabric-mc1.21-0.12.7.jar
LuckPerms-Fabric-5.4.133.jar
McBot-fabric-2.2.1.2.jar
modernfix-fabric-5.18.8+mc1.21.jar
NoChatReports-FABRIC-1.21-v2.8.0.jar
servux-fabric-1.21.0-0.2.0.jar
tabtps-fabric-mc1.21-1.3.24.jar
textile_backup-3.1.3-1.21.jar

Geyser Dump

/geyser dump not outputs the URL on console??

Geyser Version

2.4.0-b606 (git-master-efc8ba0) (Java: 1.21, Bedrock: 1.20.80/1.20.81 - 1.21.2)

Minecraft: Bedrock Edition Device/Version

Android 1.21.2.02

Additional Context

No response

onebeastchris commented 4 months ago

Hey! Please try running the Geyser-Fabric build found here - it will log every serverbound custom payload packet. Once you get this error again, please send the log - itll tell us exactly what's in this packet to see what might have caused it. Thanks!

yqs112358 commented 4 months ago

Hey! Please try running the Geyser-Fabric build found here - it will log every serverbound custom payload packet. Once you get this error again, please send the log - itll tell us exactly what's in this packet to see what might have caused it. Thanks!

Thanks so much! Actually I have changed to use newest CI build version 609 and found that this problem occurs less frequently. I will use this version for debug and if more infomation is available I will add here~

yqs112358 commented 4 months ago

Emm, by the way, I have found that the server console logs like '[Netty Server IO GeyserMC/Geyser#3/ERROR]: Received: minecraft:custom_payload'. Is it right? I think this problem should be caused by the client receiving oversized packets? Rather than the server receiving it?

onebeastchris commented 4 months ago

No, here it's the server complaining about too large packets from clients. The linked debug build would log such packets, which might help us show where it's originating from.

yqs112358 commented 4 months ago

@onebeastchris Finally recorded a whole problem process, from login to disconnected. Logs are as follows:

[22:11:41] [nioEventLoopGroup-4-3/INFO]: 玩家以 jimojunawa 的用户名建立了连接
[22:11:41] [localSession-7-7/INFO]: jimojunawa (登录为: jimojunawa) 已连接到 Java 服务器
[22:11:41] [pool-8-thread-13/INFO]: Floodgate player who is logged in as _jimojunawa 00000000-0000-0000-0009-01f5baa22306 joined
[22:11:41] [Geyser Fabric connection thread-6-8/ERROR]: Received: minecraft:custom_payload
[22:11:41] [Geyser Fabric connection thread-6-8/ERROR]: 
         +-------------------------------------------------+
         |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
|00000000| 02 0f 6d 69 6e 65 63 72 61 66 74 3a 62 72 61 6e |..minecraft:bran|
|00000010| 64 06 47 65 79 73 65 72                         |d.Geyser        |
+--------+-------------------------------------------------+----------------+
[22:11:41] [Server thread/INFO]: _jimojunawa[/117.162.130.100:0] logged in with entity id 1121976 at (256.14392, 66.0, 658.33246)
[22:11:41] [Server thread/INFO]: Floodgate 玩家 _jimojunawa 加入了 (UUID: 00000000-0000-0000-0009-01f5baa22306)
[22:11:41] [Server thread/INFO]: _jimojunawa joined the game
[22:11:41] [Geyser Fabric connection thread-6-8/ERROR]: Received: minecraft:custom_payload
[22:11:41] [Geyser Fabric connection thread-6-8/ERROR]: 
         +-------------------------------------------------+
         |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
|00000000| 12 12 6d 69 6e 65 63 72 61 66 74 3a 72 65 67 69 |..minecraft:regi|
|00000010| 73 74 65 72 66 6c 6f 6f 64 67 61 74 65 3a 73 6b |sterfloodgate:sk|
|00000020| 69 6e 00 66 6c 6f 6f 64 67 61 74 65 3a 66 6f 72 |in.floodgate:for|
|00000030| 6d 00 66 6c 6f 6f 64 67 61 74 65 3a 74 72 61 6e |m.floodgate:tran|
|00000040| 73 66 65 72 00 66 6c 6f 6f 64 67 61 74 65 3a 70 |sfer.floodgate:p|
|00000050| 61 63 6b 65 74                                  |acket           |
+--------+-------------------------------------------------+----------------+
[22:11:41] [Geyser Fabric connection thread-6-8/ERROR]: Received: minecraft:custom_payload
[22:11:41] [Geyser Fabric connection thread-6-8/ERROR]: 
         +-------------------------------------------------+
         |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
|00000000| 12 12 6d 69 6e 65 63 72 61 66 74 3a 72 65 67 69 |..minecraft:regi|
|00000010| 73 74 65 72 65 72 6f 73 69 6f 6e 3a 6d 73 67    |stererosion:msg |
+--------+-------------------------------------------------+----------------+
[22:11:42] [Geyser Fabric connection thread-6-8/ERROR]: Received: minecraft:custom_payload
[22:11:42] [Geyser Fabric connection thread-6-8/ERROR]: 
         +-------------------------------------------------+
         |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
|00000000| 12 0e 66 6c 6f 6f 64 67 61 74 65 3a 73 6b 69 6e |..floodgate:skin|
|00000010| 65 77 6f 67 49 43 4a 30 61 57 31 6c 63 33 52 68 |ewogICJ0aW1lc3Rh|
|00000020| 62 58 41 69 49 44 6f 67 4d 54 59 78 4e 6a 59 7a |bXAiIDogMTYxNjYz|
|00000030| 4d 7a 4d 78 4d 6a 4d 30 4d 53 77 4b 49 43 41 69 |MzMxMjM0MSwKICAi|
|00000040| 63 48 4a 76 5a 6d 6c 73 5a 55 6c 6b 49 69 41 36 |cHJvZmlsZUlkIiA6|
|00000050| 49 43 4a 68 4e 7a 64 6b 4e 6d 51 32 59 6d 46 6a |ICJhNzdkNmQ2YmFj|
|00000060| 4f 57 45 30 4e 7a 59 33 59 54 46 68 4e 7a 55 31 |OWE0NzY3YTFhNzU1|
|00000070| 4e 6a 59 78 4f 54 6c 6c 59 6d 59 35 4d 69 49 73 |NjYxOTllYmY5MiIs|
|00000080| 43 69 41 67 49 6e 42 79 62 32 5a 70 62 47 56 4f |CiAgInByb2ZpbGVO|
|00000090| 59 57 31 6c 49 69 41 36 49 43 49 77 4f 45 4a 46 |YW1lIiA6ICIwOEJF|
|000000a0| 52 44 55 69 4c 41 6f 67 49 43 4a 7a 61 57 64 75 |RDUiLAogICJzaWdu|
|000000b0| 59 58 52 31 63 6d 56 53 5a 58 46 31 61 58 4a 6c |YXR1cmVSZXF1aXJl|
|000000c0| 5a 43 49 67 4f 69 42 30 63 6e 56 6c 4c 41 6f 67 |ZCIgOiB0cnVlLAog|
|000000d0| 49 43 4a 30 5a 58 68 30 64 58 4a 6c 63 79 49 67 |ICJ0ZXh0dXJlcyIg|
|000000e0| 4f 69 42 37 43 69 41 67 49 43 41 69 55 30 74 4a |OiB7CiAgICAiU0tJ|
|000000f0| 54 69 49 67 4f 69 42 37 43 69 41 67 49 43 41 67 |TiIgOiB7CiAgICAg|
|00000100| 49 43 4a 31 63 6d 77 69 49 44 6f 67 49 6d 68 30 |ICJ1cmwiIDogImh0|
|00000110| 64 48 41 36 4c 79 39 30 5a 58 68 30 64 58 4a 6c |dHA6Ly90ZXh0dXJl|
|00000120| 63 79 35 74 61 57 35 6c 59 33 4a 68 5a 6e 51 75 |cy5taW5lY3JhZnQu|
|00000130| 62 6d 56 30 4c 33 52 6c 65 48 52 31 63 6d 55 76 |bmV0L3RleHR1cmUv|
|00000140| 4d 57 45 30 59 57 59 33 4d 54 67 30 4e 54 56 6b |MWE0YWY3MTg0NTVk|
|00000150| 4e 47 46 68 59 6a 55 79 4f 47 55 33 59 54 59 78 |NGFhYjUyOGU3YTYx|
|00000160| 5a 6a 67 32 5a 6d 45 79 4e 57 55 32 59 54 4d 32 |Zjg2ZmEyNWU2YTM2|
|00000170| 4f 57 51 78 4e 7a 59 34 5a 47 4e 69 4d 54 4e 6d |OWQxNzY4ZGNiMTNm|
|00000180| 4e 32 52 6d 4d 7a 45 35 59 54 63 78 4d 32 56 69 |N2RmMzE5YTcxM2Vi|
|00000190| 4f 44 45 77 59 69 49 4b 49 43 41 67 49 48 30 4b |ODEwYiIKICAgIH0K|
|000001a0| 49 43 42 39 43 6e 30 3d 00 56 36 2b 71 64 70 64 |ICB9Cn0=.V6+qdpd|
|000001b0| 45 55 55 77 77 71 35 36 38 66 6d 54 57 39 32 79 |EUUwwq568fmTW92y|
|000001c0| 6a 48 42 51 68 73 4d 56 6b 73 4c 53 4d 79 4d 7a |jHBQhsMVksLSMyMz|
|000001d0| 38 58 57 58 64 55 4f 56 52 4e 77 46 63 4d 5a 4d |8XWXdUOVRNwFcMZM|
|000001e0| 78 4a 4f 33 57 70 5a 44 66 74 31 53 77 78 53 41 |xJO3WpZDft1SwxSA|
|000001f0| 76 36 76 50 42 64 65 59 6a 4c 44 31 54 63 63 72 |v6vPBdeYjLD1Tccr|
|00000200| 6a 47 31 47 5a 49 7a 75 45 77 38 53 39 53 4b 44 |jG1GZIzuEw8S9SKD|
|00000210| 39 48 45 64 4d 34 59 58 67 61 54 48 4b 4c 41 46 |9HEdM4YXgaTHKLAF|
|00000220| 70 32 76 76 6c 75 47 4d 72 37 37 4b 59 4f 58 48 |p2vvluGMr77KYOXH|
|00000230| 32 66 54 4f 56 69 47 77 35 59 61 45 78 70 78 59 |2fTOViGw5YaExpxY|
|00000240| 55 42 7a 33 73 7a 55 41 6a 6b 55 53 52 41 49 67 |UBz3szUAjkUSRAIg|
|00000250| 59 4e 75 52 57 38 6f 4c 71 70 58 63 62 70 36 47 |YNuRW8oLqpXcbp6G|
|00000260| 30 34 77 4e 32 38 6d 79 53 41 56 44 67 63 63 31 |04wN28mySAVDgcc1|
|00000270| 6b 50 68 77 58 32 34 4a 49 77 36 2b 57 49 57 32 |kPhwX24JIw6+WIW2|
|00000280| 58 34 75 4d 48 2f 71 5a 63 75 47 2f 75 37 61 2f |X4uMH/qZcuG/u7a/|
|00000290| 76 2b 64 76 4f 52 69 75 32 32 41 75 57 75 62 75 |v+dvORiu22AuWubu|
|000002a0| 68 71 6f 2f 56 44 49 73 2f 66 72 6a 50 39 70 44 |hqo/VDIs/frjP9pD|
|000002b0| 72 43 79 4f 41 43 74 75 30 53 4c 79 53 2f 61 65 |rCyOACtu0SLyS/ae|
|000002c0| 2f 66 38 6e 30 46 4a 44 59 4d 62 53 43 53 4d 54 |/f8n0FJDYMbSCSMT|
|000002d0| 71 43 67 46 6c 41 56 4a 39 79 59 62 78 31 42 44 |qCgFlAVJ9yYbx1BD|
|000002e0| 4a 62 6a 51 74 61 30 69 30 52 43 6d 58 6f 39 77 |JbjQta0i0RCmXo9w|
|000002f0| 76 6f 4d 6b 33 78 74 41 71 4e 68 2b 4e 62 70 69 |voMk3xtAqNh+Nbpi|
|00000300| 34 30 68 68 71 6f 32 79 50 73 34 69 44 6f 44 41 |40hhqo2yPs4iDoDA|
|00000310| 6c 64 4b 45 52 30 45 58 38 51 38 52 35 38 35 78 |ldKER0EX8Q8R585x|
|00000320| 37 4b 48 7a 6d 59 4e 2b 33 66 4e 68 33 6b 38 78 |7KHzmYN+3fNh3k8x|
|00000330| 43 49 37 41 6f 54 4f 61 49 39 37 6f 39 6c 2b 6e |CI7AoTOaI97o9l+n|
|00000340| 31 4c 72 48 4e 53 61 31 2f 52 71 35 34 45 38 72 |1LrHNSa1/Rq54E8r|
|00000350| 38 5a 48 49 32 52 55 7a 51 61 4d 57 6d 58 78 6b |8ZHI2RUzQaMWmXxk|
|00000360| 4f 51 77 49 4f 46 4c 55 56 6b 67 34 64 39 65 6d |OQwIOFLUVkg4d9em|
|00000370| 59 55 58 45 74 71 41 5a 71 7a 76 54 2f 4e 38 41 |YUXEtqAZqzvT/N8A|
|00000380| 4f 36 5a 50 42 48 45 4e 7a 76 72 35 2f 70 32 52 |O6ZPBHENzvr5/p2R|
|00000390| 32 6b 35 33 54 4e 62 76 52 4b 64 4a 6e 77 6a 75 |2k53TNbvRKdJnwju|
|000003a0| 57 30 33 54 31 34 77 6d 4c 4f 31 50 41 6b 70 74 |W03T14wmLO1PAkpt|
|000003b0| 69 57 6b 44 6c 61 47 72 51 49 38 7a 32 34 75 53 |iWkDlaGrQI8z24uS|
|000003c0| 64 44 67 65 4a 54 30 35 73 68 65 74 45 4a 79 73 |dDgeJT05shetEJys|
|000003d0| 59 32 2f 65 63 64 4f 2f 76 72 30 48 56 36 72 6c |Y2/ecdO/vr0HV6rl|
|000003e0| 68 6f 2b 41 6b 64 58 68 39 4a 6a 71 46 4b 69 6a |ho+AkdXh9JjqFKij|
|000003f0| 68 69 4e 39 45 7a 33 5a 46 65 57 4e 36 41 58 35 |hiN9Ez3ZFeWN6AX5|
|00000400| 67 42 6c 69 55 54 46 38 69 57 43 49 7a 5a 38 6b |gBliUTF8iWCIzZ8k|
|00000410| 4f 7a 4e 79 55 78 6d 44 4e 52 2f 4c 35 4d 46 35 |OzNyUxmDNR/L5MF5|
|00000420| 66 64 32 46 51 48 66 4b 4f 75 43 6b 58 55 43 70 |fd2FQHfKOuCkXUCp|
|00000430| 56 50 7a 4f 44 6c 70 4b 74 66 34 32 56 47 54 4b |VPzODlpKtf42VGTK|
|00000440| 68 71 4e 6f 2f 64 32 54 64 41 42 57 35 44 46 50 |hqNo/d2TdABW5DFP|
|00000450| 4a 34 52 49 3d                                  |J4RI=           |
+--------+-------------------------------------------------+----------------+
[22:11:42] [Geyser Fabric connection thread-6-8/INFO]: Floodgate 玩家 _jimojunawa 已断开连接
[22:11:42] [localSession-7-7/INFO]: jimojunawa 因为 Internal Exception: io.netty.handler.codec.DecoderException: java.io.IOException: Packet play/serverbound/minecraft:custom_payload (class_2817) was larger than I expected, found 991 bytes extra whilst reading packet serverbound/minecraft:custom_payload 与 Java 版服务器 断开了连接
[22:11:42] [Server thread/INFO]: _jimojunawa lost connection: Internal Exception: io.netty.handler.codec.DecoderException: java.io.IOException: Packet play/serverbound/minecraft:custom_payload (class_2817) was larger than I expected, found 991 bytes extra whilst reading packet serverbound/minecraft:custom_payload
[22:11:42] [Server thread/INFO]: _jimojunawa left the game
onebeastchris commented 4 months ago

Looks like this is a Floodgate-Fabric issue :/ thanks for providing this log.

onebeastchris commented 4 months ago

Please update Floodgate - this should be resolved in the latest version of Floodgate-Fabric.

BOPIB commented 2 weeks ago

Please update Floodgate - this should be resolved in the latest version of Floodgate-Fabric.

HEY HELP ME I HAD THIS ISSUE TOO