ProtocolLib

3M Downloads

[ERROR] Packet encoding of packet ID 78 threw (skippable? false)

FezzyDev opened this issue · 15 comments

commented
  • This issue is not solved in a development build

Describe the bug

Today I downloaded the most recent version of ProtocolLib (Build #610) however it seems I'm still getting this error.
I am running a recent version of Paper

To Reproduce
Steps to reproduce the behavior:

  1. Download most recent version of ProtocolLib
  2. Try to join a 1.19.3 generated world
  3. See error

Expected behavior
Player is kicked upon join and this message is printed to the console

[23:57:59 ERROR]: Packet encoding of packet ID 78 threw (skippable? false)
java.lang.ClassCastException: class net.minecraft.network.syncher.DataWatcher$Item cannot be cast to class net.minecraft.network.syncher.DataWatcher$b (net.minecraft.network.syncher.DataWatcher$Item and net.minecraft.network.syncher.DataWatcher$b are in unnamed module of loader java.net.URLClassLoader @421faab1)
        at net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket.pack(ClientboundSetEntityDataPacket.java:17) ~[?:?]
        at net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket.write(ClientboundSetEntityDataPacket.java:38) ~[?:?]
        at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:41) ~[paper-1.19.3.jar:git-Paper-371]
        at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:14) ~[paper-1.19.3.jar:git-Paper-371]
        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:120) ~[netty-codec-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:790) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1020) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:311) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
        at com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.writeAndFlush(NettyChannelProxy.java:227) ~[ProtocolLib (8).jar:?]
        at com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.writeAndFlush(NettyChannelProxy.java:233) ~[ProtocolLib (8).jar:?]
        at net.minecraft.network.Connection.doSendPacket(Connection.java:459) ~[?:?]
        at net.minecraft.network.Connection.lambda$sendPacket$11(Connection.java:433) ~[?:?]
        at com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.lambda$proxyRunnable$2(NettyEventLoopProxy.java:48) ~[ProtocolLib (8).jar:?]
        at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:403) ~[netty-transport-classes-epoll-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

Screenshots
N/A - Everything required is in error log

Version Info
Provide your ProtocolLib install info with /protocol dump through pastebin.
ProtocolLib version v5.0.0-SNAPSHOT-b610

Additional context
Apologies if this is incorrect place to post, this has been happening for a few versions now, unsure if it's just me, or something else!

commented

Capture d’écran 2024-02-23 105016
Capture d’écran 2024-02-23 105021
I have a same probleme with itemadder can you help me pls
its error packed 96

commented

Same Issue

commented

UPDATE: I removed the TAB plugin (https://github.com/NEZNAMY/TAB) from my server and all errors went away. Then I added it back and disabled unlimited-nametag-mode and the errors stayed away. Apparently my issue was a result of this particular feature in TAB.

Can confirm this issue, on both #609 and #610, but with slightly different symptoms. Upon being within render distance of another player, server members are kicked from the server.

[21:30:14] [Server thread/INFO]: PLAYER1 [HIS IP ADDRESS] logged in with entity id 7765 at ([world]868.1294708630146, 95.0, -2196.859016065121)
[21:30:14] [Netty Server IO #3/ERROR]: Packet encoding of packet ID 78 threw (skippable? false)
java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()" because "trackedValues" is null
	at net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket.pack(ClientboundSetEntityDataPacket.java:17) ~[?:?]
	at net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket.write(ClientboundSetEntityDataPacket.java:38) ~[?:?]
	at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:41) ~[paper-1.19.3.jar:git-Paper-376]
	at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:14) ~[paper-1.19.3.jar:git-Paper-376]
	at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:120) ~[netty-codec-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.ChannelDuplexHandler.write(ChannelDuplexHandler.java:115) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at de.codingair.warpsystem.lib.codingapi.player.data.PacketReader$1.write(PacketReader.java:86) ~[WarpSystem_v5.1.3-free (color codes fix).jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.ChannelDuplexHandler.write(ChannelDuplexHandler.java:115) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at de.codingair.warpsystem.lib.codingapi.player.data.PacketReader$1.write(PacketReader.java:86) ~[WarpSystem_v5.1.3-free (color codes fix).jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.ChannelDuplexHandler.write(ChannelDuplexHandler.java:115) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at de.codingair.tradesystem.lib.codingapi.player.data.PacketReader$1.write(PacketReader.java:86) ~[TradeSystem_v2.2.0.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.ChannelDuplexHandler.write(ChannelDuplexHandler.java:115) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at de.codingair.tradesystem.lib.codingapi.player.data.PacketReader$1.write(PacketReader.java:86) ~[TradeSystem_v2.2.0.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.ChannelDuplexHandler.write(ChannelDuplexHandler.java:115) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at me.neznamy.tab.platforms.bukkit.BukkitPipelineInjector$BukkitChannelDuplexHandler.write(BukkitPipelineInjector.java:93) ~[TAB.v3.2.1.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:120) ~[netty-codec-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.DefaultChannelPipeline.write(DefaultChannelPipeline.java:1015) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.AbstractChannel.write(AbstractChannel.java:301) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.write(NettyChannelProxy.java:210) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.write(NettyChannelProxy.java:199) ~[ProtocolLib.jar:?]
	at net.minecraft.network.Connection.doSendPacket(Connection.java:459) ~[?:?]
	at net.minecraft.network.Connection.lambda$sendPacket$10(Connection.java:428) ~[?:?]
	at 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.82.Final.jar:4.1.82.Final]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
	at java.lang.Thread.run(Unknown Source) ~[?:?]

That gets spammed MULTIPLE times until eventually:

[21:30:14] [Server thread/INFO]: [voicechat] Disconnecting client PLAYER2
[21:30:14] [Server thread/INFO]: PLAYER2 left the game
[21:30:14] [Server thread/INFO]: PLAYER1 lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()" because "trackedValues" is null
[21:30:14] [Server thread/INFO]: [voicechat] Disconnecting client PLAYER1 
[21:30:14] [Server thread/INFO]: PLAYER1 left the game

Then PLAYER2 rejoined, and warped to another player, at which point this error appeared:

[21:30:41] [Server thread/INFO]: PLAYER2 issued server command: /tpa PLAYER3
[21:30:47] [Server thread/INFO]: PLAYER3 issued server command: /tpaccept PLAYER2
[21:30:47] [Netty Server IO #2/ERROR]: Packet encoding of packet ID 78 threw (skippable? false)
java.lang.NullPointerException: null
[21:30:47] [Netty Server IO #2/ERROR]: Packet encoding of packet ID 78 threw (skippable? false)
java.lang.NullPointerException: null
[21:30:47] [Server thread/INFO]: PLAYER3 lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.lang.NullPointerException
[21:30:47] [Server thread/INFO]: [voicechat] Disconnecting client PLAYER3
commented

Do you happen to have the TAB plugin (https://github.com/NEZNAMY/TAB) installed? It turned out to be causing me this error. Disabling unlimited-nametag-mode within TAB's config.yml resolved my issue.

@FezzyDev @IPECTER

commented

Do you happen to have the TAB plugin (https://github.com/NEZNAMY/TAB) installed? It turned out to be causing me this error. Disabling unlimited-nametag-mode within TAB's config.yml resolved my issue.

@FezzyDev @IPECTER

Unfortunately I am not using TAB rather a custom-implemented TabList system (which may end up making it difficult to debug/solve.....), thanks for the suggestion however!

commented

Unfortunately I am not using TAB rather a custom-implemented TabList system (which may end up making it difficult to debug/solve.....), thanks for the suggestion however!

Hm. It's possible that they're experiencing the same bug though, especially considering that they perform the same function. Have you tried removing that plugin temporarily to see if that's what's causing the issue?

commented

Hello, I have the same problem as you with packet 78. Here is the error

image

Here is the code associated with my error. In this method, if the mirror parameter is active then the skin returned is that of the player.

The error would come from the line116.

image

Do you have any idea ?

commented

Just experienced the same issue. Have tab, have protocollib, unlimited-nametag-mode disabled and now I'll just see if a new protocollib is out

commented

Also experiencing this issue. Causes everyone in the entire server to disconnect. Weirdly, it continues to loop every once in a while until I restart the server.

java.lang.IllegalArgumentException: The expected number of elements must be nonnegative
    at it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap.<init>(Object2ObjectOpenHashMap.java:91)
    at net.minecraft.nbt.CompoundTag.copy(CompoundTag.java:467)
    at net.minecraft.nbt.CompoundTag.copy(CompoundTag.java:21)
    at net.minecraft.nbt.CompoundTag.copy(CompoundTag.java:471)
    at net.minecraft.world.item.ItemStack.cloneItemStack(ItemStack.java:693)
    at net.minecraft.world.item.ItemStack.copy(ItemStack.java:684)
    at net.minecraft.network.FriendlyByteBuf.writeItem(FriendlyByteBuf.java:643)
    at net.minecraft.network.syncher.EntityDataSerializers$1.write(EntityDataSerializers.java:42)
    at net.minecraft.network.syncher.EntityDataSerializers$1.copy(EntityDataSerializers.java:39)
    at net.minecraft.network.syncher.SynchedEntityData$DataValue.write(SynchedEntityData.java:346)
    at net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket.pack(ClientboundSetEntityDataPacket.java:18)
    at net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket.write(ClientboundSetEntityDataPacket.java:38)
    at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:41)
    at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:14)
    at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107)
    at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881)
    at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863)
    at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968)
    at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856)
    at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:120)
    at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0
- [Sat 02:00:40 ERROR Minecraft/PacketEncoder] Packet encoding of packet ID 78 threw (skippable? false)
java.lang.IllegalArgumentException: The expected number of elements must be nonnegative
    at it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap.<init>(Object2ObjectOpenHashMap.java:91)
    at net.minecraft.nbt.CompoundTag.copy(CompoundTag.java:467)
    at net.minecraft.nbt.CompoundTag.copy(CompoundTag.java:21)
    at net.minecraft.nbt.CompoundTag.copy(CompoundTag.java:471)
    at net.minecraft.world.item.ItemStack.cloneItemStack(ItemStack.java:693)
    at net.minecraft.world.item.ItemStack.copy(ItemStack.java:684)
    at net.minecraft.network.FriendlyByteBuf.writeItem(FriendlyByteBuf.java:643)
    at net.minecraft.network.syncher.EntityDataSerializers$1.write(EntityDataSerializers.java:42)
    at net.minecraft.network.syncher.EntityDataSerializers$1.copy(EntityDataSerializers.java:39)
    at net.minecraft.network.syncher.SynchedEntityData$DataValue.write(SynchedEntityData.java:346)
    at net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket.pack(ClientboundSetEntityDataPacket.java:18)
    at net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket.write(ClientboundSetEntityDataPacket.java:38)
    at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:41)
    at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:14)
    at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107)
    at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881)
    at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863)
    at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968)
    at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856)
    at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:120)
    at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0
- [Sat 02:00:40 ERROR Minecraft/PacketEncoder] Packet encoding of packet ID 78 threw (skippable? false)
java.lang.IllegalArgumentException: The expected number of elements must be nonnegative
    at it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap.<init>(Object2ObjectOpenHashMap.java:91)
    at net.minecraft.nbt.CompoundTag.copy(CompoundTag.java:467)
    at net.minecraft.nbt.CompoundTag.copy(CompoundTag.java:21)
    at net.minecraft.nbt.CompoundTag.copy(CompoundTag.java:471)
    at net.minecraft.world.item.ItemStack.cloneItemStack(ItemStack.java:693)
    at net.minecraft.world.item.ItemStack.copy(ItemStack.java:684)
    at net.minecraft.network.FriendlyByteBuf.writeItem(FriendlyByteBuf.java:643)
    at net.minecraft.network.syncher.EntityDataSerializers$1.write(EntityDataSerializers.java:42)
    at net.minecraft.network.syncher.EntityDataSerializers$1.copy(EntityDataSerializers.java:39)
    at net.minecraft.network.syncher.SynchedEntityData$DataValue.write(SynchedEntityData.java:346)
    at net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket.pack(ClientboundSetEntityDataPacket.java:18)
    at net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket.write(ClientboundSetEntityDataPacket.java:38)
    at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:41)
    at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:14)
    at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107)
    at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881)
    at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863)
    at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968)
    at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856)
    at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:120)
    at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0
  [Sat 02:00:40 INFO  Server/PlayerConnection] Dawn_x2 lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.lang.IllegalArgumentException: The expected number of elements must be nonnegative
  [Sat 02:00:40 INFO  voicechat] Disconnecting client Dawn_x2
  [Sat 02:00:40 INFO  Server] �#79a6ff▌Dawn_x2 left the game
  [Sat 02:00:40 INFO  Server/PlayerConnection] Owehttamy lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.lang.IllegalArgumentException: The expected number of elements must be nonnegative
  [Sat 02:00:40 INFO  DiscordSRV] Player Owehttamy quit with silent quitting permission, not sending a quit message
  [Sat 02:00:40 INFO  voicechat] Disconnecting client Owehttamy
  [Sat 02:00:40 INFO  Server] �#79a6ff▌Owehttamy left the game
  [Sat 02:00:40 INFO  Server/PlayerConnection] styxv1 lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.lang.IllegalArgumentException: The expected number of elements must be nonnegative
  [Sat 02:00:40 INFO  voicechat] Disconnecting client styxv1
  [Sat 02:00:41 INFO  Server] �#79a6ff▌styxv1 left the game
  [Sat 02:00:45 INFO  Server/LoginListener] UUID of player styxv1 is 2f83c7f0-73f7-4c23-917f-9b7ef9915caf
  [Sat 02:00:45 INFO  Server] �#79a6ff▌styxv1 joined the game
  [Sat 02:00:45 INFO  Server/PlayerList] styxv1[/24.207.201.86:57371] logged in with entity id 992933 at ([world]-308.5578614147614, 105.0, -737.2274422546495)
  [Sat 02:00:45 INFO  voicechat] Received secret request of styxv1 (15)
  [Sat 02:00:45 INFO  voicechat] Sent secret to styxv1
  [Sat 02:00:47 INFO  voicechat] Successfully authenticated player 2f83c7f0-73f7-4c23-917f-9b7ef9915caf
  [Sat 02:00:50 INFO  Server] [Not Secure] <RzBwuhh> wth happened lol
  [Sat 02:00:55 INFO  Server] Stopping the server

Protocol install info: https://pastebin.com/be0vU6jm

Plugins (19): Chunky, CoreProtect, DiscordSRV, GPFlags, Graves, GriefPrevention, GSit, InteractiveChat, InteractiveChatDiscordSrvAddon, ItemSwapperPlugin, LetMeDespawn, LuckPerms, OpenInv, Orebfuscator, PlaceholderAPI, ProtocolLib, Vault, voicechat, WorldEdit

This server is running Paper version git-Paper-381 (MC: 1.19.3) (Implementing API version 1.19.3-R0.1-SNAPSHOT) (Git: 42fecd0)
You are running the latest version
Previous version: git-Paper-376 (MC: 1.19.3)

commented

Correction: In my instance, it doesn't cause everyone in the server to disconnect, only people nearby the 'crash zone.' Don't know how large that area is, but at least everyone within loaded chunks of each other.

commented

Correction: In my instance, it doesn't cause everyone in the server to disconnect, only people nearby the 'crash zone.' Don't know how large that area is, but at least everyone within loaded chunks of each other.

this is exactly whats happening to me

commented

@Owehttamy @Spelicious @spookymgmt @TheCalypso

Hey everyone. As I mentioned above, I resolved the issue on my server. I'd like to provide some clarification as to what was causing it.

TAB works, at least in part, by modifying players' name tags (as in, the tags above their head).

In my experience, when players would walk into render distance of each other, it would kick both/all players within render distance of the other player(s) from the server. Players outside render distance from other players would be completely unaffected. As far as I understand, the reason is that whatever the plugin was using to modify players' name tag would kick other players once they rendered (and thereby "observed", even if not visually) another player.

If you have TAB

@IPECTER and I reported this bug to the dev (NEZNAMY/TAB#791), and it has since been fixed in an update. If you have TAB installed, please go ahead and update the plugin to the most recent version and try it again (@Spelicious). If the issue still occurs, completely remove TAB and see if that helps. If it does, I would recommend reopening that thread and letting the TAB dev know. If it doesn't, please make sure to let us all know in this thread.

If you don't have TAB

If like @FezzyDev and @Owehttamy you don't have TAB, please try to locate any additional plugins with nametag modifying features and remove them. Then try to run the server without them. If the issues disappear, report this bug to the dev(s) for that plugin. If your nametags are not modified, please make sure to let us all know in this thread.

(For you specifically @TheCalypso, since it seems like you might be developing a plugin, perhaps you should contact the dev for TAB and see what he did to resolve the issue with the TAB plugin?)

commented

@CommandoEchino

I'm so sorry for the delayed response! I've been spending a lot of time trying to delve deeper into what causes this issue. I can confirm I do not have any plugins that modify player names; however, I do have vanilla scoreboard teams that add colored prefixes to player names. (Indicates which dimension they're in)
The team prefixes aren't the root cause of my issue. Oddly enough, it has something to do with when a player breaks a shulker box. That's the only common denominator I could find. I don't have any more leads or context, that's just what I know. :/

commented

@CommandoEchino

I'm so sorry for the delayed response! I've been spending a lot of time trying to delve deeper into what causes this issue. I can confirm I do not have any plugins that modify player names; however, I do have vanilla scoreboard teams that add colored prefixes to player names. (Indicates which dimension they're in) The team prefixes aren't the root cause of my issue. Oddly enough, it has something to do with when a player breaks a shulker box. That's the only common denominator I could find. I don't have any more leads or context, that's just what I know. :/

Did you manage to solve this problem?

commented

@Timoti11 I have not; this issue is ongoing for me.