Easy NPC

Easy NPC

2M Downloads

[Crash Report] Client crashed when interacting with NPC on Fabric 1.21

Hiusi opened this issue ยท 2 comments

commented

Minecraft and Mod version ๐Ÿž
Fabric 0.16.0 Minecraft 1.21 and Easy NPC 5.30

Description of the crash ๐Ÿ’ฅ
When player use wand or using command to configure NPC, the client will get disconnected with message "Client disconnected with reason: Internal Exception: io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:custom_payload' (easy_npc:open_menu_callback_message)"

Steps to reproduce the crash โš™๏ธ

  1. Install EasyNPC
  2. Enter a server
  3. Configure the NPC

Expected behavior before the crash โœ”๏ธ
I just try to configure the NPC

Logs ๐Ÿ“
Please provide the following logs:
Server error log:

[12:57:48] [Server thread/INFO]: Open menu with UUID 53e5a8bf-9fe2-4122-a822-24a2b45ef46c
[12:57:48] [Netty Epoll Server IO #7/ERROR]: Error sending packet clientbound/minecraft:custom_payload
io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:custom_payload' (easy_npc:open_menu_callback_message)
        at net.minecraft.class_9136.handler$bng000$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.epoll.EpollEventLoop.run(EpollEventLoop.java:413) ~[netty-transport-classes-epoll-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:1583) [?:?]
Caused by: java.lang.ClassCastException: class de.markusbordihn.easynpc.network.message.client.OpenMenuCallbackMessage cannot be cast to class net.minecraft.class_8711 (de.markusbordihn.easynpc.network.message.client.OpenMenuCallbackMessage and net.minecraft.class_8711 are in unnamed module of loader net.fabricmc.loader.impl.launch.knot.KnotClassLoader @7ca48474)
        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
[12:57:48] [Server thread/INFO]: BTDK lost connection: Internal Exception: io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:custom_payload' (easy_npc:open_menu_callback_message)
[12:57:48] [Server thread/INFO]: BTDK left the game

Client Error Log:
None

Additional context ๐Ÿ“‹

commented

Possible duplicate of
#267
sorry I should have read more issue related to my issue

commented

Thanks for the report, this should be fixed with 5.4.1.