ProtocolLib icon indicating copy to clipboard operation
ProtocolLib copied to clipboard

Error sending packet clientbound/minecraft:update_attributes (skippable? false)

Open Naimadx123 opened this issue 1 year ago • 32 comments

  • [ ] This issue is not solved in a development build

Describe the bug

[21:43:20 ERROR]: Error sending packet clientbound/minecraft:update_attributes (skippable? false)
io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:update_attributes'
        at net.minecraft.network.codec.IdDispatchCodec.encode(IdDispatchCodec.java:53) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at net.minecraft.network.codec.IdDispatchCodec.encode(IdDispatchCodec.java:20) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:26) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:12) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:113) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:120) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.ChannelOutboundHandlerAdapter.write(ChannelOutboundHandlerAdapter.java:113) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at net.minecraft.network.Connection$2.write(Connection.java:759) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.DefaultChannelPipeline.write(DefaultChannelPipeline.java:1015) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannel.write(AbstractChannel.java:301) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at ProtocolLib.jar/com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.write(NettyChannelProxy.java:210) ~[ProtocolLib.jar:?]
        at ProtocolLib.jar/com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.write(NettyChannelProxy.java:199) ~[ProtocolLib.jar:?]
        at net.minecraft.network.Connection.doSendPacket(Connection.java:505) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at net.minecraft.network.Connection.lambda$sendPacket$13(Connection.java:490) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at ProtocolLib.jar/com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.lambda$proxyRunnable$2(NettyEventLoopProxy.java:48) ~[ProtocolLib.jar:?]
        at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:413) ~[netty-transport-classes-epoll-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.util.ConcurrentModificationException
        at java.base/java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1095) ~[?:?]
        at java.base/java.util.ArrayList$Itr.next(ArrayList.java:1049) ~[?:?]
        at net.minecraft.network.codec.ByteBufCodecs$19.encode(ByteBufCodecs.java:412) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at net.minecraft.network.codec.ByteBufCodecs$19.encode(ByteBufCodecs.java:395) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at net.minecraft.network.codec.StreamCodec$8.encode(StreamCodec.java:141) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at net.minecraft.network.codec.StreamCodec$5.encode(StreamCodec.java:88) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at net.minecraft.network.codec.StreamCodec$5.encode(StreamCodec.java:78) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        ... 39 more

To Reproduce Steps to reproduce the behavior:

  1. AFK for a while
  2. See error

Expected behavior Nothing happens

Screenshots If applicable, add screenshots to help explain your problem.

Version Info removed

Naimadx123 avatar Jun 08 '24 08:06 Naimadx123

i have a theory on this one. will give it a try and get back to you

dmulloy2 avatar Jun 08 '24 18:06 dmulloy2

try the latest dev build and let me know if this is still happening

dmulloy2 avatar Jun 08 '24 19:06 dmulloy2

Hi. I have the same issue. I thought it was Items adder causing it but it was protocollib. I'm running paper 1.20.6 and protocollib seems to only support 1.20.5? might that be the reason? latest.log

AshleyFOXXX avatar Jun 09 '24 02:06 AshleyFOXXX

it looks like the error no longer occurs on dev build

Naimadx123 avatar Jun 09 '24 09:06 Naimadx123

I don‘t think this bug has been resolved yet.

I tried to use it myself today, and for 3 hours, several users were disconnected about 20 times due to this error.

Paper 1.20.6 #137, ProtocolLib #712

thecats1105 avatar Jun 09 '24 14:06 thecats1105

I don‘t think this bug has been resolved yet.

I tried to use it myself today, and for 3 hours, several users were disconnected about 20 times due to this error.

Paper 1.20.6 #137, ProtocolLib #712

same error with the concurrent modification exception?

dmulloy2 avatar Jun 09 '24 15:06 dmulloy2

it looks like the error no longer occurs on dev build

What version of protocollib did you install? I have the 5.30.0 which I believe only supports 1.20.5 and im assuming you are using 1.20.6. Mind sharing the version of protocollibs that made it work for you?

AshleyFOXXX avatar Jun 09 '24 22:06 AshleyFOXXX

it looks like the error no longer occurs on dev build

What version of protocollib did you install? I have the 5.30.0 which I believe only supports 1.20.5 and im assuming you are using 1.20.6. Mind sharing the version of protocollibs that made it work for you?

#713

Naimadx123 avatar Jun 09 '24 23:06 Naimadx123

Same issue with the latest build #713 but issue is not as often as the older dev builds which logs people out numerous times. This newer dev build still has some issues where it logs user out but not as often.

but still, issue is still an issue so I hope it'll get fixed soon.

AshleyFOXXX avatar Jun 10 '24 01:06 AshleyFOXXX

Same issue with the latest build #713 but issue is not as often as the older dev builds which logs people out numerous times. This newer dev build still has some issues where it logs user out but not as often.

but still, issue is still an issue so I hope it'll get fixed soon.

Are you sure that the problem is the same? Can you paste the error?

Naimadx123 avatar Jun 10 '24 10:06 Naimadx123

Same issue with the latest build #713 but issue is not as often as the older dev builds which logs people out numerous times. This newer dev build still has some issues where it logs user out but not as often. but still, issue is still an issue so I hope it'll get fixed soon.

Are you sure that the problem is the same? Can you paste the error?

Yes it is the same error as before still giving and the other player the same error. Unfortunately I dont know which logs where the error was due to lots of logs already generated but I can confirm it is the same error. Isn't it not causing issues for you now?

AshleyFOXXX avatar Jun 10 '24 12:06 AshleyFOXXX

I can reinstall it again and let you join my server if you want. If you have time

AshleyFOXXX avatar Jun 10 '24 13:06 AshleyFOXXX

image image I don't know why, but in build #713, no error log is left and the connection is disconnected. PaperMC 1.20.6 #138, ProtocolLib #713

thecats1105 avatar Jun 10 '24 13:06 thecats1105

Dump Log Error Log PaperMC 1.20.6 #138, ProtocolLib #713 We will also test it in build #715 and let you know soon.

thecats1105 avatar Jun 11 '24 12:06 thecats1105

@dmulloy2

Naimadx123 avatar Jun 11 '24 12:06 Naimadx123

Dump Log Error Log PaperMC 1.20.6 #138, ProtocolLib #715

thecats1105 avatar Jun 11 '24 13:06 thecats1105

same problem

WhiteProject1 avatar Jun 12 '24 12:06 WhiteProject1

[20:09:33 ERROR]: Error sending packet clientbound/minecraft:update_attributes (skippable? false)
io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:update_attributes'
        at net.minecraft.network.codec.IdDispatchCodec.encode(IdDispatchCodec.java:53) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at net.minecraft.network.codec.IdDispatchCodec.encode(IdDispatchCodec.java:20) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:26) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:12) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:113) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:120) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.ChannelOutboundHandlerAdapter.write(ChannelOutboundHandlerAdapter.java:113) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at net.minecraft.network.Connection$2.write(Connection.java:759) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.DefaultChannelPipeline.write(DefaultChannelPipeline.java:1015) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.AbstractChannel.write(AbstractChannel.java:301) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
        at ProtocolLib (1).jar/com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.write(NettyChannelProxy.java:210) ~[ProtocolLib (1).jar:?]
        at ProtocolLib (1).jar/com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.write(NettyChannelProxy.java:199) ~[ProtocolLib (1).jar:?]
        at net.minecraft.network.Connection.doSendPacket(Connection.java:505) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at net.minecraft.network.Connection.lambda$sendPacket$13(Connection.java:490) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at ProtocolLib (1).jar/com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.lambda$proxyRunnable$2(NettyEventLoopProxy.java:48) ~[ProtocolLib (1).jar:?]
        at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:413) ~[netty-transport-classes-epoll-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.util.ConcurrentModificationException
        at java.base/java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1095) ~[?:?]
        at java.base/java.util.ArrayList$Itr.next(ArrayList.java:1049) ~[?:?]
        at net.minecraft.network.codec.ByteBufCodecs$19.encode(ByteBufCodecs.java:412) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at net.minecraft.network.codec.ByteBufCodecs$19.encode(ByteBufCodecs.java:395) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at net.minecraft.network.codec.StreamCodec$8.encode(StreamCodec.java:141) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at net.minecraft.network.codec.StreamCodec$5.encode(StreamCodec.java:88) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        at net.minecraft.network.codec.StreamCodec$5.encode(StreamCodec.java:78) ~[purpur-1.20.6.jar:1.20.6-2227-79d199c]
        ... 39 more

Naimadx123 avatar Jun 12 '24 20:06 Naimadx123

ProtoLib Build 716 server java: 21 client java: 22 Paper Build: Paper version 1.20.6-137-master plugins: image

disconnected error ( concurrent modification still ) https://pastebin.com/2T6nFtiN

cause: Unknown I was tabbed out standing still and there was no other players on the server at the time. Seems to still disconnect when players sprint and jump around near each other.

prior to build 716 clients was being disconnected when ever another player was near them and sprinting the player that was sprinting would stay connected and any other clients near them would be kicked with this packet error.

RustyDagger avatar Jun 13 '24 05:06 RustyDagger

same in build #719 Dump Log Error Log PaperMC 1.20.6 #139, ProtocolLib #719

thecats1105 avatar Jun 14 '24 14:06 thecats1105

@thecats1105 does this happen without ItemsAdder? the only thing i can think of is that they're concurrently modifying the attribute lists. maybe not cloning the packet before working with it? it's hard to say without looking at the code but it appears to be obfuscated

dmulloy2 avatar Jun 14 '24 19:06 dmulloy2

Without items adder, everything works well. But with the itemsadder, the error exists. It may or may not be itemsadder we can't be sure. I have a server warning that this Protocollib is not yet tested with 1.20.6

AshleyFOXXX avatar Jun 15 '24 10:06 AshleyFOXXX

It seems like it might be related to the ItemsAdder plugin. Besides this error, I’ve seen a lot of error logs from ItemsAdder and ProtocolLib, even though the player’s connection isn’t getting interrupted. PaperMC 1.20.6 #140, ProtocolLib #720, ItemsAdder v4.0.1-alpha-test-4

thecats1105 avatar Jun 15 '24 12:06 thecats1105

@thecats1105 does this happen without ItemsAdder? the only thing i can think of is that they're concurrently modifying the attribute lists. maybe not cloning the packet before working with it? it's hard to say without looking at the code but it appears to be obfuscated

honestly seems like you need to have a convo with lonedev. it might be itemsadder just miss using or not using protocol lib correctly. any one using itemsadder is suffering hard RN it is a test/ dev build of items adder so its no real surprise its broke as f.

RustyDagger avatar Jun 15 '24 17:06 RustyDagger

We installed Itemsader today and since then we have been getting the above message in the log and the players are being kicked from the server. PaperMC 1.20.6 #145, ProtocolLib #720, ItemsAdder v4.0.1-alpha-test-4

Log: https://mclo.gs/OUsCi1a

Leahcimkrob avatar Jun 16 '24 19:06 Leahcimkrob

#721 Build same Problem

DeEthria avatar Jun 17 '24 14:06 DeEthria

Will be fixed in the next update. Probably it's because I'm adding attributes to the list without cloning it, as dmulloy said.

LoneDev6 avatar Jun 18 '24 09:06 LoneDev6

Will be fixed in the next update. Probably it's because I'm adding attributes to the list without cloning it, as dmulloy said.

Can you also tell us when you'll fix this? My players keep getting kicked from the server.

DeEthria avatar Jun 19 '24 14:06 DeEthria

@LoneDev6

DeEthria avatar Jun 21 '24 22:06 DeEthria

Is ItemsAdder refundable? Im planning to switch to Oraxen. I paid for it for my 1.20.6 server on paper but I never had a chance to get it to work properly and my admins on my server really cant wait to add cosmetics on my server. I hope this can be answered. I got my Itemsadder just this month but never got to use it.

AshleyFOXXX avatar Jun 22 '24 04:06 AshleyFOXXX