Taterzens [Fabric]

Taterzens [Fabric]

86.3k Downloads

Cannot change NPCs skins [Fabric]

Londiuh opened this issue ยท 19 comments

commented

Describe the bug
When I try to change a NPC skin with /npc edit skin, I get disconnected from the server due to a packet error.

Platform(s)

  • Fabric

Environment(s)

  • Server

Versions

  • Minecraft 1.19 - 1.19.2
  • Taterzens 1.10.5 & 1.11.0

To Reproduce
Steps to reproduce the behavior:

  1. Launch server
  2. Create a NPC
  3. Change the skin with /npc edit skin
  4. You get disconnected
    image

Expected behavior
The skin changes and you don't get disconnected

Logs
Client logs:

10:36:59] [Netty Epoll Client IO #0/ERROR]: Error receiving packet 3
io.netty.handler.codec.EncoderException: String too big (was 25 characters, max 16)
   at qx.a(SourceFile:617) ~[1.19.jar:?]
   at dv.a(SourceFile:45) ~[1.19.jar:?]
   at qx.a(SourceFile:219) ~[1.19.jar:?]
   at com.google.common.collect.SingletonImmutableBiMap.forEach(SingletonImmutableBiMap.java:68) ~[guava-31.0.1-jre.jar:?]
   at qx.a(SourceFile:218) ~[1.19.jar:?]
   at dv.a(SourceFile:45) ~[1.19.jar:?]
   at xa.a(SourceFile:31) ~[1.19.jar:?]
   at qz.a(SourceFile:45) ~[1.19.jar:?]
   at qz.encode(SourceFile:14) ~[1.19.jar:?]
   at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.77.Final.jar:4.1.77.Final]
   at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.77.Final.jar:4.1.77.Final]
   at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764) ~[netty-transport-4.1.77.Final.jar:4.1.77.Final]
   at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:790) ~[netty-transport-4.1.77.Final.jar:4.1.77.Final]
   at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758) ~[netty-transport-4.1.77.Final.jar:4.1.77.Final]
   at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:808) ~[netty-transport-4.1.77.Final.jar:4.1.77.Final]
   at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1025) ~[netty-transport-4.1.77.Final.jar:4.1.77.Final]
   at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:306) ~[netty-transport-4.1.77.Final.jar:4.1.77.Final]
   at qv.a(SourceFile:213) ~[1.19.jar:?]
   at qv.b(SourceFile:205) ~[1.19.jar:?]
   at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) [netty-common-4.1.77.Final.jar:4.1.77.Final]
   at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) [netty-common-4.1.77.Final.jar:4.1.77.Final]
   at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) [netty-common-4.1.77.Final.jar:4.1.77.Final]
   at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:391) [netty-transport-classes-epoll-4.1.77.Final.jar:4.1.77.Final]
   at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995) [netty-common-4.1.77.Final.jar:4.1.77.Final]
   at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.77.Final.jar:4.1.77.Final]
   at java.lang.Thread.run(Thread.java:833) [?:?]

Server logs:

[10:36:59] [Server thread/INFO]: TheLondiux lost connection: Disconnected
[10:36:59] [Server thread/INFO]: TheLondiux left the game
commented

I can change the skin using the container GUI

commented

Humm, that doesn't really make sense apart from command being too long, as GUI just parses the inputs and executes the command ... ๐Ÿค”

What's the name of the npc?

commented

It happens with every name

npc.mp4
commented

Nope, the server is only running Taterzens

commented

Seems like anything that modifies gameprofile kicks you ... Using any other mods?

commented

What's weirder is that I cannot reproduce this in dev env ... :(

commented

That makes sense, I had turned NCR off on the client before I tried it the first time (testing something else) and back on before trying to reproduce it last week.

commented

I'm able to reproduce this, and I just no installed Taterzens (love the name). I get the same error as @Londiuh and kicked as well.

Also,
Minecraft 1.19.2
Taterzens 1.11.1
Fabric 0.14.9

In case it helps

commented

Same log?

commented

Let me retry and grab the log. This is the client log (Taterzen is not installed on the client), still Netty IO but log is slightly different:

[Netty Client IO #1/ERROR]: Error receiving packet 4
io.netty.handler.codec.EncoderException: String too big (was 25 characters, max 16)
	at net.minecraft.class_2540.method_10788(class_2540.java:617) ~[client-intermediary.jar:?]
	at net.minecraft.class_7450$class_7599.method_44800(class_7450.java:79) ~[client-intermediary.jar:?]
	at net.minecraft.class_7450.method_44799(class_7450.java:32) ~[client-intermediary.jar:?]
	at net.minecraft.class_2540.method_34062(class_2540.java:179) ~[client-intermediary.jar:?]
	at net.minecraft.class_7450.method_43749(class_7450.java:32) ~[client-intermediary.jar:?]
	at net.minecraft.class_7472.method_11052(class_7472.java:36) ~[client-intermediary.jar:?]
	at net.minecraft.class_2545.method_10838(class_2545.java:45) ~[client-intermediary.jar:?]
	at net.minecraft.class_2545.encode(class_2545.java:14) ~[client-intermediary.jar:?]
	at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.77.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.77.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764) ~[netty-transport-4.1.77.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:790) ~[netty-transport-4.1.77.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758) ~[netty-transport-4.1.77.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:808) ~[netty-transport-4.1.77.Final.jar:?]
	at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1025) ~[netty-transport-4.1.77.Final.jar:?]
	at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:306) ~[netty-transport-4.1.77.Final.jar:?]
	at net.minecraft.class_2535.method_36942(class_2535.java:209) ~[client-intermediary.jar:?]
	at net.minecraft.class_2535.method_10761(class_2535.java:201) ~[client-intermediary.jar:?]
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) [netty-common-4.1.77.Final.jar:?]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) [netty-common-4.1.77.Final.jar:?]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) [netty-common-4.1.77.Final.jar:?]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:503) [netty-transport-4.1.77.Final.jar:?]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995) [netty-common-4.1.77.Final.jar:?]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.77.Final.jar:?]
	at java.lang.Thread.run(Thread.java:833) [?:?]

Nothing in the server logs:

[17:46:53 INFO]: Pramekhan joined the game
[17:47:20 INFO]: Pramekhan lost connection: Disconnected
[17:47:20 INFO]: Pramekhan left the game
commented

Could you describe the reproduce proccess? Does it happen for you with taterzens only as well? Vanillla client?

commented

So... it's working now? Somehow :) I'm going to go through my mods one by one and see when it happens and get back to you.

In the meantime, I have a question about creating Professions, should I start another ticket or is there a more preferred method of asking?

commented

General info about professions - please create a discussion / send a message in my discord.
Issues with tradernpcs / blacksmiths - their repositoriy's issues ๐Ÿ˜‰ .

I still have no idea why this doesn't work though.

commented

I had the same issue until I installed FabricTailor mod. Not sure if it's actually related to that but I can test more

UPD: Wrong assumption
It doesn't work with vanilla client even with FabricTailor mod on server side

UPD2: I can confirm this issue exists, I have this issue on vanilla client. I don't have same issue on modded client tho (client-side modpack with many mods). Searching for cause

UPD3: Btw, without Polymer on client side skin doesn't update if you're using command. With GUI it updates. And after skin has been fetched using GUI one time you can change it using command to on

UPD4: Issue in UPD3 isn't related to GUI, skin just doesn't update sometimes for some reason (with either command or GUI, doesn't matter)

commented

I'm able to reproduce this issue with modded server + vanilla client.
I cannot reproduce this issue if NoChatReports mod present on client side. Maybe it's fixing something related to packets on client side?

commented

This is something related to command argument signatures. When command is executed from client side it's unable to encode argument signature I guess? Weird

commented

Found the reason!
@samolego it's because your argument name is too long, lol. There is 16 symbol limit on argument names
image
While your argument name is 25 symbols

.then(argument("mineskin URL | playername", message())

That's why minecraft is unable to execute your command from client side. It's trying to make signature for your argument or something on client side but fails because of this stupid 16-character limit
GUI executes command on server side directly without sending from client side so it doesn't need to make signature
NoChatReports - obviously - just removes all this signature junk. That's why everything is fine with this mod.
I recommend checking other commands, maybe there are commands with the same issue.

commented

Oh wow that's so silly! Thanks for deepdiving!

commented

fix?
PS: cant use gui since executing command as player using command block in map