Polymer

Polymer

763k Downloads

Polymer mods causing packet kick

Closed this issue ยท 4 comments

commented

It seems like polymer may be causing packets to have some incorrect header data, causing players to be kicked with various DecoderException errors. The server logs them as regular disconnects. I've seen:
java.util.zip.DataFormatException: incorrect data check
Failed to decode packet 'clientbound/minecraft:container_set_content'
Failed to decode packet 'clientbound/minecraft:level_chunk_with_light'
and a lot of
Badly compressed packed - actual length of uncompressed payload X is does not match declared size Y

The affected players do not have any common client mods that affect packet reading.
The server has the following mods installed (file attached), the only ones that affect packet reading are polymer related through packet tweaker, and very many players. Unfortunately I don't own the server, so I cannot do any A/B testing to figure out which mod is causing the issue. I am making an identical report on their repo as well.

Server Mods.txt

All the disconnect logs people have sent me all have barely any good data, but here is the common header:

io.netty.handler.codec.DecoderException: Badly compressed packet - actual length of uncompressed payload 31552 is does not match declared size 36118
	at knot//net.minecraft.class_2532.method_52897(class_2532.java:82)
	at knot//net.minecraft.class_2532.decode(class_2532.java:52)
	at knot//io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:530)
	at knot//io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:469)
	at knot//io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
	at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
	at knot//io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at knot//io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)

I built a packet sniffer to give me some additional info since the Minecraft Network Protocol Error Report didn't even say what type of packet was causing problems. So far I only have one good disconnect packet since the disconnects are erratic, some players get them every hour, others will be fine for multiple hours and then get kicked 5 times in 30 minutes. I added logs from my packet sniffer (with IPs redacted) as well as a mapping of packet integer IDs to their namespace.

Clientbound Packet IDs.json
Packet Sniff 1.txt
Packet Sniff 2.txt

commented

Hey, just to make sure, could you check if this happens with latest polymer version? (0.13.13).
Honestly bit weird for this to happen, as all the compression stuff should be happening after polymer did it's thing (packet compression works on already written packets, so polymer shouldn't change that)

commented

Would the best way to do that be to add the polymer bundled jar to the server mods file? Would all the mods that depend on it use the latest version over their bundled versions?

commented

Yep

commented

We updated to the latest version and no one has reported issues since. Considering how prolific they were before, I would consider this solved.

Thanks for the help, as always! Your mods are always awesome :3