EMI

EMI

1M Downloads

Custom payload error

ponduzn opened this issue ยท 3 comments

commented

Added EMI to my modpack and server, when trying to join the server i get the message:

"Connection lost
Internal exception: io.netty.handler.codec.encoderException: failed to encode packet 'clientbound/minecraft:custom_payload' (emi:ping)"

Then server spits out this error:

[22:55:24] [Netty Server IO #1/ERROR]: Error sending packet clientbound/minecraft:custom_payload io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:custom_payload' (emi:ping) at net.minecraft.class_9136.handler$znl000$fabric-networking-api-v1$encode(class_9136.java:547) ~[server-intermediary.jar:?] at net.minecraft.class_9136.method_56426(class_9136.java:55) ~[server-intermediary.jar:?] at net.minecraft.class_9136.encode(class_9136.java:14) ~[server-intermediary.jar:?] at net.minecraft.class_2545.method_10838(class_2545.java:26) ~[server-intermediary.jar:?] at net.minecraft.class_2545.encode(class_2545.java:12) ~[server-intermediary.jar:?] at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.97.Final.jar:?] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:?] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[netty-transport-4.1.97.Final.jar:?] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[netty-transport-4.1.97.Final.jar:?] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[netty-transport-4.1.97.Final.jar:?] at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:113) ~[netty-codec-4.1.97.Final.jar:?] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:?] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[netty-transport-4.1.97.Final.jar:?] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[netty-transport-4.1.97.Final.jar:?] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[netty-transport-4.1.97.Final.jar:?] at io.netty.channel.ChannelOutboundHandlerAdapter.write(ChannelOutboundHandlerAdapter.java:113) ~[netty-transport-4.1.97.Final.jar:?] at net.minecraft.class_2535$2.write(class_2535.java:530) ~[server-intermediary.jar:?] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:?] at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:940) ~[netty-transport-4.1.97.Final.jar:?] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:966) ~[netty-transport-4.1.97.Final.jar:?] at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:934) ~[netty-transport-4.1.97.Final.jar:?] at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:984) ~[netty-transport-4.1.97.Final.jar:?] at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1025) ~[netty-transport-4.1.97.Final.jar:?] at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:306) ~[netty-transport-4.1.97.Final.jar:?] at net.minecraft.class_2535.method_36942(class_2535.java:350) ~[server-intermediary.jar:?] at net.minecraft.class_2535.method_52917(class_2535.java:345) ~[server-intermediary.jar:?] at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.97.Final.jar:?] at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.97.Final.jar:?] at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.97.Final.jar:?] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) ~[netty-transport-4.1.97.Final.jar:?] at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.97.Final.jar:?] at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.97.Final.jar:?] at java.base/java.lang.Thread.run(Thread.java:1570) [?:?] Caused by: java.lang.ClassCastException: class dev.emi.emi.network.PingS2CPacket cannot be cast to class net.minecraft.class_8711 (dev.emi.emi.network.PingS2CPacket and net.minecraft.class_8711 are in unnamed module of loader net.fabricmc.loader.impl.launch.knot.KnotClassLoader @5700d6b1) at net.minecraft.class_9139$6.encode(class_9139.java:42) ~[server-intermediary.jar:?] at net.minecraft.class_8710$1.method_56489(class_8710.java:52) ~[server-intermediary.jar:?] at net.minecraft.class_8710$1.method_56490(class_8710.java:57) ~[server-intermediary.jar:?] at net.minecraft.class_8710$1.encode(class_8710.java:39) ~[server-intermediary.jar:?] at net.minecraft.class_9139$8.encode(class_9139.java:81) ~[server-intermediary.jar:?] at net.minecraft.class_9139$9.method_56442(class_9139.java:97) ~[server-intermediary.jar:?] at net.minecraft.class_9139$9.encode(class_9139.java:87) ~[server-intermediary.jar:?] at net.minecraft.class_9136.method_56426(class_9136.java:53) ~[server-intermediary.jar:?] ... 31 more

To be fair, both rei and jei has problems also rei crashes immediately when you open inventory.
Tested with jei, works fine UNTIL you try to CTRL click icon to get cheat mode, then game crashes.

commented

Another report of this from the discord:
image

From what I can tell, the payload ID isn't being registered on both ends, thus the outbound Codec is dispatching an UnknownCustomPayload codec because it can't find the codec for the not-registered Id EmiNetwork.PING.

From the fabric blog:
image

commented

workaround is removing emi from the mods folder in server, works only from client thus far.

commented

This is resolved in 1.1.9