fabric icon indicating copy to clipboard operation
fabric copied to clipboard

[Networking API] Assertion Error (Failed assertion at ClientNetworkingImpl)

Open IMB11 opened this issue 1 year ago • 3 comments

My mod (https://github.com/IMB11/SkinShuffle) registers optional server networking events and client networkng events, but this shouldnt do anything - this has only started occuring when updating Fabric API from 0.95.1+1.20.4 to 0.97.1+1.20.4.

When joining a vanilla server, a modded server or singleplayer, an assertion error occurs.

java.lang.AssertionError
[20:56:42] [Netty Epoll Client IO #2/INFO] (Minecraft) [STDERR]:     at net.fabricmc.fabric.impl.networking.client.ClientNetworkingImpl.setClientConfigurationAddon(ClientNetworkingImpl.java:141)
[20:56:42] [Netty Epoll Client IO #2/INFO] (Minecraft) [STDERR]:     at net.minecraft.client.network.ClientConfigurationNetworkHandler.handler$zmm003$fabric-networking-api-v1$initAddon(ClientConfigurationNetworkHandler.java:550)
[20:56:42] [Netty Epoll Client IO #2/INFO] (Minecraft) [STDERR]:     at net.minecraft.client.network.ClientConfigurationNetworkHandler.<init>(ClientConfigurationNetworkHandler.java:33)
[20:56:42] [Netty Epoll Client IO #2/INFO] (Minecraft) [STDERR]:     at net.minecraft.client.network.ClientLoginNetworkHandler.onSuccess(ClientLoginNetworkHandler.java:163)
[20:56:42] [Netty Epoll Client IO #2/INFO] (Minecraft) [STDERR]:     at net.minecraft.network.packet.s2c.login.LoginSuccessS2CPacket.apply(LoginSuccessS2CPacket.java:26)
[20:56:42] [Netty Epoll Client IO #2/INFO] (Minecraft) [STDERR]:     at net.minecraft.network.packet.s2c.login.LoginSuccessS2CPacket.apply(LoginSuccessS2CPacket.java:8)
[20:56:42] [Netty Epoll Client IO #2/INFO] (Minecraft) [STDERR]:     at net.minecraft.network.ClientConnection.handlePacket(ClientConnection.java:196)
[20:56:42] [Netty Epoll Client IO #2/INFO] (Minecraft) [STDERR]:     at net.minecraft.network.ClientConnection.channelRead0(ClientConnection.java:181)
[20:56:42] [Netty Epoll Client IO #2/INFO] (Minecraft) [STDERR]:     at net.minecraft.network.ClientConnection.channelRead0(ClientConnection.java:60)

According to IDEA, the assertion occurs here, makes no sense though...

image

image

image

My networking classes: https://github.com/IMB11/SkinShuffle/tree/main/src/main/java/com/mineblock11/skinshuffle/networking

None of the networking events are called, this assertion error happens before that.

No data is sent from client -> server before the client joins the world either.

IMB11 avatar Jun 29 '24 20:06 IMB11