SpigotMC / BungeeCord

BungeeCord, the 6th in a generation of server portal suites. Efficiently proxies and maintains connections and transport between multiple Minecraft servers.
https://www.spigotmc.org/go/bungeecord
Other
1.57k stars 1.1k forks source link

Cannot get ID for packet class net.md_5.bungee.protocol.packet.PlayerListItemRemove in phase CONFIGURATION with direction TO_CLIENT #3666

Open IAISI opened 5 months ago

IAISI commented 5 months ago

Bungeecord version

git:BungeeCord-Bootstrap:1.20-R0.3-SNAPSHOT:ee02d98:unknown by md_5

Server version

Latest Paper

Client version

Unsure

Bungeecord plugins

One custom plugin, NuVotifier, TcpShield

The bug

Seeing this randomly in console, not sure how to replicate or what causes it..

19:10:57 [SEVERE] [Redacted] -> UpstreamBridge - encountered exception
io.netty.handler.codec.EncoderException: java.lang.IllegalArgumentException: Cannot get ID for packet class net.md_5.bungee.protocol.packet.PlayerListItemRemove in phase CONFIGURATION with direction TO_CLIENT
    at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:125)
    at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:893)
    at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:956)
    at io.netty.channel.AbstractChannelHandlerContext$WriteTask.run(AbstractChannelHandlerContext.java:1263)
    at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:405)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.IllegalArgumentException: Cannot get ID for packet class net.md_5.bungee.protocol.packet.PlayerListItemRemove in phase CONFIGURATION with direction TO_CLIENT
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:463)
    at net.md_5.bungee.protocol.Protocol$DirectionData.getId(Protocol.java:937)
    at net.md_5.bungee.protocol.MinecraftEncoder.encode(MinecraftEncoder.java:26)
    at net.md_5.bungee.protocol.MinecraftEncoder.encode(MinecraftEncoder.java:10)
    at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107)
    ... 10 more

Log output (links)

No response

Checking

IAISI commented 5 months ago

I've already removed all code related to Tab List on bungee (I'm sending Tab list header and footer with spigot plugin) but that didn't help.

Outfluencer commented 5 months ago

at what time is this happening? On server switch or something like that?

Outfluencer commented 5 months ago

Log output needed

IAISI commented 5 months ago

I think it's when players are switching servers...

18:15:31 [INFO] [Username] <-> ServerConnector [slimefun] has connected
18:15:31 [INFO] [Username] <-> DownstreamBridge <-> [lobby] has disconnected
...
18:16:29 [INFO] [Username] <-> ServerConnector [lobby] has connected
18:16:29 [INFO] [Username] <-> DownstreamBridge <-> [slimefun] has disconnected
...
18:16:45 [SEVERE] [Username] -> UpstreamBridge - encountered exception
io.netty.handler.codec.EncoderException: java.lang.IllegalArgumentException: Cannot get ID for packet class net.md_5.bungee.protocol.packet.PlayerListItemRemove in phase CONFIGURATION with direction TO_CLIENT
    at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:125)
    at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:893)
    at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:956)
    at io.netty.channel.AbstractChannelHandlerContext$WriteTask.run(AbstractChannelHandlerContext.java:1263)
    at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:405)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.IllegalArgumentException: Cannot get ID for packet class net.md_5.bungee.protocol.packet.PlayerListItemRemove in phase CONFIGURATION with direction TO_CLIENT
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:463)
    at net.md_5.bungee.protocol.Protocol$DirectionData.getId(Protocol.java:937)
    at net.md_5.bungee.protocol.MinecraftEncoder.encode(MinecraftEncoder.java:26)
    at net.md_5.bungee.protocol.MinecraftEncoder.encode(MinecraftEncoder.java:10)
    at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107)
    ... 10 more
18:16:45 [INFO] [Username] disconnected with: §f§fEncoderException : java.lang.IllegalArgumentException: Cannot get ID for packet class net.md_5.bungee.protocol.packet.PlayerListItemRemove in phase CONFIGURATION with direction TO_CLIENT @ io.netty.handler.codec.MessageToByteEncoder:125
18:16:45 [INFO] [Username] -> UpstreamBridge has disconnected
18:16:45 [INFO] [Username] <-> DownstreamBridge <-> [lobby] has disconnected
18:16:47 [INFO] [Username,/1.1.1.1:22326] <-> InitialHandler has connected
18:16:48 [INFO] [Username] <-> ServerConnector [lobby] has connected
...
18:16:56 [INFO] [Username] <-> ServerConnector [skygrid] has connected
18:16:56 [INFO] [Username] <-> DownstreamBridge <-> [lobby] has disconnected
Outfluencer commented 5 months ago

Have you removed all plugin from bungee while testing

IAISI commented 5 months ago

Can't replicate on testing with or without plugins, can't really test on prod, from what I saw most of not all players used 1.20.3/1.20.4 and were very laggy, 800ms, 1000ms pings, Not sure if that's related somehow...

IAISI commented 5 months ago

I also went and checked old logs and I can find this occurring since March 2024 (don't have older logs)

topbars commented 4 months ago

I also discovered this problem myself. After updating to the latest version of BungeeKord, players who connect with versions 1.20.5 and 1.20.6 kick when trying to connect. Have you solved this problem?

IAISI commented 4 months ago

No, we've ended up migrating away from BungeeCord to Velocity.

Yarethf commented 4 months ago

What's up, I have bungeecord on my server and when I enter with forge it takes me out, but if I have op it lets me enter normally Error: encountered exception java.lang.NullPointerException

Janmm14 commented 4 months ago

@Yarethf pls use spigotmc.org forums for support - or maybe you can attempt to find out potential reasons if you look in the console. either way, its wrong to just post your issue under something unrelated.

jquery-package commented 3 days ago

I found a way to replicate this issue. You need to quickly change servers multiple times using plugin like this - https://pastebin.com/cP7CT6r1. I was able to get kicked even on the latest bungee without any plugins, using MC client > 1.20.2. Could you please check this, @Janmm14 @Outfluencer

Outfluencer commented 3 days ago

i can reproduce

Outfluencer commented 3 days ago

I think that #3746 should fix this, as the startconfig packet is the cause in your case @jquery-package