Error while ticking RakSessionCodec
Describe the bug
When some Players are changing server with a Velocity server, a error occured in velocity geyser. The player will diconnected from the server.
The error in the velocity console is:
[21:37:34 ERROR] [org.cloudburstmc.netty.handler.codec.raknet.common.RakSessionCodec]: [/112.12.135.37:9224] Error while ticking RakSessionCodec state=CONNECTED channelActive=true java.lang.NullPointerException: null
-
This bug doesn't happen to every bedrock player. If a bedrock player triggered this bug, he/she could not change the server successfully no matter how many attempts are made, until the velocity server restart.
-
This bug will prevent some bedrock players changing server, but it doesn't prevent these players logining in the first server with velocity----it only occur in the process of changing server.
To Reproduce
- Logging in a server with velocity.
- use /server xxx to change a server which connected with the velocity
- A error occur in geyser-velocity, and the player is disconnected.
It couldn't reproduce 100% successfully, and it seems only occuring in certain server version.
Expected behaviour
No error occur.
Screenshots / Videos
No response
Server Version and Plugins
- Velocity version: velocity-3.4.0-SNAPSHOT-457
- The minecraft server version: Leaves version 1.20.6-215-master@e234432
- The bedrock client version: 1.21.41.01
Geyser Dump
https://dump.geysermc.org/Gr13iNNN0cL7Ss2eHRq6lDGAdgLaAKCJ
Geyser Version
2.5.1-b729 (git-master-b2045a5)
Minecraft: Bedrock Edition Device/Version
1.20.6
Additional Context
No response
Please update Geyser, you're running quite a few commits behind. Further, please send a full server log showing the error
Please update Geyser, you're running quite a few commits behind. Further, please send a full server log showing the error
Ok, I will update and try again.
And the log is the full server log about the error. It only displayed so much.
This error should be harmless, as it's occurring after a player disconnects. It doesn't cause the disconnection itself
Thank u, I will try more
I am facing the same with a paper server. It only occurs if i connect with a switch to the server but its causing the player to disconnect.
[10:20:23 ERROR]: [org.cloudburstmc.netty.handler.codec.raknet.common.RakSessionCodec] [/192.168.178.7:50412] Error while ticking RakSessionCodec state=CONNECTED channelActive=true java.lang.NullPointerException: Cannot invoke "org.cloudburstmc.netty.channel.raknet.packet.RakDatagramPacket.getNextSend()" because "datagram" is null at Geyser-Spigot.jar/org.cloudburstmc.netty.handler.codec.raknet.common.RakSessionCodec.sendStaleDatagrams(RakSessionCodec.java:527) ~[Geyser-Spigot.jar:?] at Geyser-Spigot.jar/org.cloudburstmc.netty.handler.codec.raknet.common.RakSessionCodec.internalFlush(RakSessionCodec.java:462) ~[Geyser-Spigot.jar:?] at Geyser-Spigot.jar/org.cloudburstmc.netty.handler.codec.raknet.common.RakSessionCodec.onTick(RakSessionCodec.java:425) ~[Geyser-Spigot.jar:?] at Geyser-Spigot.jar/org.cloudburstmc.netty.handler.codec.raknet.common.RakSessionCodec.tryTick(RakSessionCodec.java:393) ~[Geyser-Spigot.jar:?] at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98) ~[netty-common-4.1.97.Final.jar:4.1.97.Final] at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:159) ~[netty-common-4.1.97.Final.jar:4.1.97.Final] at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.97.Final.jar:4.1.97.Final] at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.97.Final.jar:4.1.97.Final] at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:416) ~[netty-transport-classes-epoll-4.1.97.Final.jar:4.1.97.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.97.Final.jar:4.1.97.Final] at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.97.Final.jar:4.1.97.Final] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.97.Final.jar:4.1.97.Final] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?] [10:20:23 INFO]: [Geyser-Spigot] mythos5502 has disconnected from the Java server because of disconnect.lost
This Still happens in version 2.6.2-b793
[16:41:13 ERROR] [org.cloudburstmc.netty.handler.codec.raknet.common.RakSessionCodec]: [/45.154.24.100:39290] Error while ticking RakSessionCodec state=CONNECTED channelActive=true
java.lang.NullPointerException: Cannot invoke "org.cloudburstmc.netty.channel.raknet.packet.RakDatagramPacket.getNextSend()" because "datagram" is null
at org.cloudburstmc.netty.handler.codec.raknet.common.RakSessionCodec.sendStaleDatagrams(RakSessionCodec.java:559) ~[?:?]
at org.cloudburstmc.netty.handler.codec.raknet.common.RakSessionCodec.internalFlush(RakSessionCodec.java:494) ~[?:?]
at org.cloudburstmc.netty.handler.codec.raknet.common.RakSessionCodec.onTick(RakSessionCodec.java:457) ~[?:?]
at org.cloudburstmc.netty.handler.codec.raknet.common.RakSessionCodec.tryTick(RakSessionCodec.java:405) ~[?:?]
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98) ~[proxy.jar:3.4.0-SNAPSHOT (git-cc93f5ee-b485)]
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:162) ~[proxy.jar:3.4.0-SNAPSHOT (git-cc93f5ee-b485)]
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173) ~[proxy.jar:3.4.0-SNAPSHOT (git-cc93f5ee-b485)]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166) ~[proxy.jar:3.4.0-SNAPSHOT (git-cc93f5ee-b485)]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) ~[proxy.jar:3.4.0-SNAPSHOT (git-cc93f5ee-b485)]
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:408) ~[proxy.jar:3.4.0-SNAPSHOT (git-cc93f5ee-b485)]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:998) ~[proxy.jar:3.4.0-SNAPSHOT (git-cc93f5ee-b485)]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[proxy.jar:3.4.0-SNAPSHOT (git-cc93f5ee-b485)]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[proxy.jar:3.4.0-SNAPSHOT (git-cc93f5ee-b485)]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
[16:41:13 INFO] [geyser]: SCEeweee has disconnected from the Java server because of disconnect.lost
Same here:
[19:08:26 ERROR] [org.cloudburstmc.netty.handler.codec.raknet.common.RakSessionCodec]: [/192.168.0.8:37481] Error while ticking RakSessionCodec state=CONNECTED channelActive=true
java.lang.NullPointerException: Cannot invoke "org.cloudburstmc.netty.channel.raknet.packet.RakDatagramPacket.getNextSend()" because "datagram" is null
at org.cloudburstmc.netty.handler.codec.raknet.common.RakSessionCodec.sendStaleDatagrams(RakSessionCodec.java:559) ~[?:?]
at org.cloudburstmc.netty.handler.codec.raknet.common.RakSessionCodec.internalFlush(RakSessionCodec.java:494) ~[?:?]
at org.cloudburstmc.netty.handler.codec.raknet.common.RakSessionCodec.onTick(RakSessionCodec.java:457) ~[?:?]
at org.cloudburstmc.netty.handler.codec.raknet.common.RakSessionCodec.tryTick(RakSessionCodec.java:405) ~[?:?]
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-bd2bb632-b496)]
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:162) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-bd2bb632-b496)]
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:148) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-bd2bb632-b496)]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:141) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-bd2bb632-b496)]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:507) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-bd2bb632-b496)]
at io.netty.channel.SingleThreadIoEventLoop.run(SingleThreadIoEventLoop.java:180) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-bd2bb632-b496)]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:1073) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-bd2bb632-b496)]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-bd2bb632-b496)]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[velocity-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT (git-bd2bb632-b496)]
at java.base/java.lang.Thread.run(Unknown Source) [?:?]
Im also facing the same issue. Paper 1.21.5 Build @a033e3b, Geyser Version 7c47459 2.7.1-b834.
[23:01:27 INFO]: [Geyser-Spigot] Player connected with username Rustysharply [23:01:27 INFO]: [Geyser-Spigot] Rustysharply (logged in as: Rustysharply) has connected to the Java server [23:01:29 INFO]: UUID of player Rustysharply is 9bef10f7-5203-32e0-9909-4da51788a120 [23:01:29 INFO]: Rustysharply joined the game [23:01:29 INFO]: Rustysharply[/127.0.0.1:0] logged in with entity id 1107 at ([world]-338.47165, 62.875, 149.69999) [23:02:00 ERROR]: [org.cloudburstmc.netty.handler.codec.raknet.common.RakSessionCodec] [/127.0.0.1:57447] Error while ticking RakSessionCodec state=CONNECTED channelActive=true java.lang.NullPointerException: Cannot invoke "org.cloudburstmc.netty.channel.raknet.packet.RakDatagramPacket.getNextSend()" because "datagram" is null at Geyser-Spigot(1).jar/org.cloudburstmc.netty.handler.codec.raknet.common.RakSessionCodec.sendStaleDatagrams(RakSessionCodec.java:559) ~[Geyser-Spigot(1).jar:?] at Geyser-Spigot(1).jar/org.cloudburstmc.netty.handler.codec.raknet.common.RakSessionCodec.internalFlush(RakSessionCodec.java:494) ~[Geyser-Spigot(1).jar:?] at Geyser-Spigot(1).jar/org.cloudburstmc.netty.handler.codec.raknet.common.RakSessionCodec.onTick(RakSessionCodec.java:457) ~[Geyser-Spigot(1).jar:?] at Geyser-Spigot(1).jar/org.cloudburstmc.netty.handler.codec.raknet.common.RakSessionCodec.tryTick(RakSessionCodec.java:405) ~[Geyser-Spigot(1).jar:?] at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98) ~[netty-common-4.1.118.Final.jar:4.1.118.Final] at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:162) ~[netty-common-4.1.118.Final.jar:4.1.118.Final] at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173) ~[netty-common-4.1.118.Final.jar:4.1.118.Final] at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166) ~[netty-common-4.1.118.Final.jar:4.1.118.Final] at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) ~[netty-common-4.1.118.Final.jar:4.1.118.Final] at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:408) ~[netty-transport-classes-epoll-4.1.118.Final.jar:4.1.118.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:998) ~[netty-common-4.1.118.Final.jar:4.1.118.Final] at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.118.Final.jar:4.1.118.Final] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.118.Final.jar:4.1.118.Final] at java.base/java.lang.Thread.run(Thread.java:1570) ~[?:?] [23:02:00 INFO]: [Geyser-Spigot] Rustysharply has disconnected from the Java server because of disconnect.lost [23:02:00 INFO]: Rustysharply lost connection: Disconnected [23:02:00 INFO]: Rustysharply left the game