RelativityMC / raknetify

A Fabric mod / Velocity plugin / BungeeCord plugin that uses RakNet to improve multiplayer experience significantly under unreliable and rate-limited connections.
MIT License
154 stars 3 forks source link

java.lang.ClassCastException console spam #17

Open OoLunar opened 2 years ago

OoLunar commented 2 years ago

Describe the bug After the UDP server starts, Raknet spams console with this when a player joins.

To Reproduce Steps to reproduce the behavior:

  1. Install Raknet
  2. Startup the server
  3. Let the player join and run around
  4. Check console

Expected behavior For my console to be clear without exceptions.

Screenshots N/A

Runtime info (please complete the following information):

Crash reports / logs

[19:26:28] [Raknetify NIO #0/WARN]: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.lang.ClassCastException: class io.netty.channel.socket.DatagramPacket cannot be cast to class io.netty.channel.Channel (io.netty.channel.socket.DatagramPacket and io.netty.channel.Channel are in unnamed module of loader net.fabricmc.loader.impl.launch.knot.KnotClassLoader @97e1986)
    at org.geysermc.floodgate.inject.fabric.FabricInjector$1.channelRead(FabricInjector.java:25) ~[floodgate-fabric.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [Geyser-Fabric.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [Geyser-Fabric.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [Geyser-Fabric.jar:?]
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [Geyser-Fabric.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [Geyser-Fabric.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [Geyser-Fabric.jar:?]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [Geyser-Fabric.jar:?]
    at network.ycc.raknet.channel.DatagramChannelProxy$ListenerInboundProxy.channelRead(DatagramChannelProxy.java:371) [raknetify-fabric-0.1.0+alpha.5.21-all.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [Geyser-Fabric.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [Geyser-Fabric.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [Geyser-Fabric.jar:?]
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [Geyser-Fabric.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [Geyser-Fabric.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [Geyser-Fabric.jar:?]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [Geyser-Fabric.jar:?]
    at io.netty.channel.nio.AbstractNioMessageChannel$NioMessageUnsafe.read(AbstractNioMessageChannel.java:97) [Geyser-Fabric.jar:?]
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719) [Geyser-Fabric.jar:?]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655) [Geyser-Fabric.jar:?]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581) [Geyser-Fabric.jar:?]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) [Geyser-Fabric.jar:?]
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) [Geyser-Fabric.jar:?]
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [Geyser-Fabric.jar:?]
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [Geyser-Fabric.jar:?]
    at java.lang.Thread.run(Unknown Source) [?:?]

Other mods From Console: https://code.forsaken-borders.net/dogaxenato.css From ls *.jar | cat: https://code.forsaken-borders.net/ezocuhadib.css

Checklist

Additional context The server has Krypton, Geyser and Floodgate installed. All Java players have the Krypton mod client-side. Raknet Java players have reported no issues. Normal Java players have reported no issues. 1 Bedrock player connecting through Geyser and Floodgate has reported that they do not receive chat messages while the other Bedrock player has sent screenshots of them receiving chat messages.

OoLunar commented 2 years ago

After looking at the latest.log file from issue #4, this appears to be a Floodgate incompatibility. I just tested with my Raknet Java player and after disabling Floodgate, confirmed that console is no longer spammed.

toinouH commented 2 years ago

@OoLunar You need one port for raknetify and one for Geyser+Floodgate ^^

OoLunar commented 2 years ago

@OoLunar You need one port for raknetify and one for Geyser+Floodgate ^^

I am aware, they are on two separate UDP ports