Fabric API

Fabric API

106M Downloads

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

IMB11 opened this issue ยท 3 comments

commented

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.

commented

Workaround, downgrade to 0.95.1+1.20.4 and force users to use that version (annoyingly)

commented

Actually, it seems like this issue was introduced in 0.97, all 0.96 versions do not have this bug.

commented

This was fixed as part of: https://github.com/FabricMC/fabric/pull/3832/files It likely need backporting to 1.20.4.

Disabling assertions is a workaround, this will only affect development environments.