FabricTailor

FabricTailor

327k Downloads

[BUG] "Failed to encode packet"

BTFighter opened this issue ยท 2 comments

commented

Issue

  • I'm not using TLauncher (it messes up the skins, also, piracy is not supported)

Describe the bug

Connecting to a server with FabricTailor causes this issue. Using latest for 1.20.6.

To Reproduce

Steps to reproduce the behavior:

  1. Start the Fabric Dedicated Server.
  2. Client connects to the server.
  3. Error occurs.

Logs
[23:15:42] [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' (fabrictailor:hello)
at knot/net.minecraft.class_9136.handler$zek000$fabric-networking-api-v1$encode(class_9136.java:547) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_9136.method_56426(class_9136.java:55) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_9136.encode(class_9136.java:14) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_2545.method_10838(class_2545.java:26) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_2545.encode(class_2545.java:12) ~[server-intermediary.jar:?]
at knot/io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.ChannelOutboundHandlerAdapter.write(ChannelOutboundHandlerAdapter.java:113) ~[netty-transport-4.1.97.Final.jar:?]
at knot/net.minecraft.class_2535$2.write(class_2535.java:518) ~[server-intermediary.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:940) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:966) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:934) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:984) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1025) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:306) ~[netty-transport-4.1.97.Final.jar:?]
at knot/net.minecraft.class_2535.method_36942(class_2535.java:342) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_2535.method_10764(class_2535.java:335) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_2535.method_52906(class_2535.java:317) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_8609.method_52391(class_8609.java:151) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_8609.method_14364(class_8609.java:142) ~[server-intermediary.jar:?]
at knot/net.fabricmc.fabric.api.networking.v1.ServerConfigurationNetworking.send(ServerConfigurationNetworking.java:222) ~[fabric-networking-api-v1-4.2.0+a916f7c5b0-b4a1f864f888f820.jar:?]
at knot/org.samo_lego.fabrictailor.network.NetworkHandler.onConfigured(NetworkHandler.java:128) ~[fabrictailor-2.4.2.jar:?]
at knot/net.fabricmc.fabric.api.networking.v1.ServerConfigurationConnectionEvents.lambda$static$2(ServerConfigurationConnectionEvents.java:61) ~[fabric-networking-api-v1-4.2.0+a916f7c5b0-b4a1f864f888f820.jar:?]
at knot/net.fabricmc.fabric.impl.networking.server.ServerConfigurationNetworkAddon.configuration(ServerConfigurationNetworkAddon.java:67) ~[fabric-networking-api-v1-4.2.0+a916f7c5b0-b4a1f864f888f820.jar:?]
at knot/net.minecraft.class_8610.handler$zff000$fabric-networking-api-v1$onClientReady(class_8610.java:616) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_8610.method_52409(class_8610.java) ~[server-intermediary.jar:?]
at knot/net.fabricmc.fabric.impl.networking.server.ServerConfigurationNetworkAddon.receiveRegistration(ServerConfigurationNetworkAddon.java:94) ~[fabric-networking-api-v1-4.2.0+a916f7c5b0-b4a1f864f888f820.jar:?]
at knot/net.fabricmc.fabric.impl.networking.AbstractChanneledNetworkAddon.handle(AbstractChanneledNetworkAddon.java:80) ~[fabric-networking-api-v1-4.2.0+a916f7c5b0-b4a1f864f888f820.jar:?]
at knot/net.minecraft.class_8609.handler$zfe000$fabric-networking-api-v1$handleCustomPayloadReceivedAsync(class_8609.java:541) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_8609.method_52392(class_8609.java) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_2817.method_12199(class_2817.java:36) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_2817.method_11054(class_2817.java:15) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_2535.method_10759(class_2535.java:200) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_2535.method_10770(class_2535.java:185) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_2535.channelRead0(class_2535.java:69) ~[server-intermediary.jar:?]
at knot/io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[netty-codec-4.1.97.Final.jar:?]
at knot/io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) ~[netty-codec-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.handler.flow.FlowControlHandler.dequeue(FlowControlHandler.java:202) ~[netty-handler-4.1.97.Final.jar:?]
at knot/io.netty.handler.flow.FlowControlHandler.channelRead(FlowControlHandler.java:164) ~[netty-handler-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[netty-codec-4.1.97.Final.jar:?]
at knot/io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) ~[netty-codec-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[netty-codec-4.1.97.Final.jar:?]
at knot/io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) ~[netty-codec-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) ~[netty-handler-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[netty-transport-4.1.97.Final.jar:?]
at knot/io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.97.Final.jar:?]
at knot/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:1583) [?:?]
Caused by: java.lang.ClassCastException: class org.samo_lego.fabrictailor.network.payload.FabricTailorHelloPayload cannot be cast to class net.minecraft.class_8711 (org.samo_lego.fabrictailor.network.payload.FabricTailorHelloPayload and net.minecraft.class_8711 are in unnamed module of loader 'knot' @5700d6b1)
at knot/net.minecraft.class_9139$6.encode(class_9139.java:42) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_8710$1.method_56489(class_8710.java:52) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_8710$1.method_56490(class_8710.java:57) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_8710$1.encode(class_8710.java:39) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_9139$8.encode(class_9139.java:81) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_9139$9.method_56442(class_9139.java:97) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_9139$9.encode(class_9139.java:87) ~[server-intermediary.jar:?]
at knot/net.minecraft.class_9136.method_56426(class_9136.java:53) ~[server-intermediary.jar:?]
... 77 more
[23:15:43] [Server thread/INFO]: com.mojang.authlib.GameProfile@5856fad8[id=224ce999-0b24-3d2a-b36c-1a6e3ec8a622,name=superloft7,properties={}] lost connection: Internal Exception: io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:custom_payload' (fabrictailor:hello)

Are you using any other mods?
Even without other mods, this issue still persists.

commented

Sorry, seems like that version is broken ... You cannot do anything :/

commented

Thanks anyways.

Making this clear though, it works. Just that only the server can install the mod.

When a client installs the mod and joins a server with the mod, the error occurs. Because of this, AFAIK clients cannot use the GUI and have to use commands to change skins.