PaperMC / Velocity

The modern, next-generation Minecraft server proxy.
https://papermc.io/software/velocity
GNU General Public License v3.0
1.78k stars 626 forks source link

io.netty.handler.codec.EncoderException: Sending unknown packet 'serverbound/minecraft:chat_session_update' #1373

Open jacobjake1 opened 4 months ago

jacobjake1 commented 4 months ago

Expected Behavior

I'm trying to connect my Velocity server which redirects me to my prison server but keep getting kicked for this error

Actual Behavior

I get kicked for the error in the title

full error: disconnect-2024-07-06_00.12.57-client.txt

Steps to Reproduce

I'm trying to connect to a 1.20.4 server with 1.20.1 which was working fine but as time has gone on, I've only gotten this kick error message more often...maybe It's viaverison? but im not really sure

Plugin List

Plugins: anarchyqueue, litebans, luckperms, viaversion, viabackwards, viarewind

Velocity Version

Velocity 3.3.0-SNAPSHOT (git-9d25d309-b400)

Additional Information

No response

jacobjake1 commented 4 months ago

I updated to 5.0.2-SNAPSHOT+452 of ViaVerison and haven't gotten the issue since

jacobjake1 commented 4 months ago

nevermind its still going on

Gerrygames commented 4 months ago

This seems to be somewhat of a vanilla client issue. The client fetches public key of the used Minecraft profile asynchronously and then sends it to the server. The key can only be updated during play state and the client does not check if it is in play state or got put into configuration state again. However this should only really be an issue when switching servers really fast after the initial login. Might this be the case here?

Timongcraft commented 4 months ago

Try without Via* or contact their support, as Velocity does not support protocol hacks.

Gerrygames commented 4 months ago

Try without Via* or contact their support, as Velocity does not support protocol hacks.

This probably isn't caused by ViaVersion. I suspect that the player is being sent to a different server right after connecting to the initial server. This is unsupported and the PlayerChooseInitialServerEvent should be used.

Timongcraft commented 4 months ago

Try without Via* or contact their support, as Velocity does not support protocol hacks.

This probably isn't caused by ViaVersion. I suspect that the player is being sent to a different server right after connecting to the initial server. This is unsupported and the PlayerChooseInitialServerEvent should be used.

Oh, yeah, sorry. I didn't really look at the issue but rather at the fact that they were talking a lot about ViaVersion.

jacobjake1 commented 4 months ago

However this should only really be an issue when switching servers really fast after the initial login. Might this be the case here?

It occurs almost always now for some reason, it could be my first connection of the day to the server and I will still get the error, I'll see if it's maybe my queue plugin and use PlayerChooseInitialServerEvent instead

jacobjake1 commented 4 months ago

Though, a weird thing is, it only occurs on 1.21. No issues on 1.20.6 and below (server native is 1.20.4 paper)

jacobjake1 commented 4 months ago

I ended up doing public void onPlayerChooseInitialServer(PlayerChooseInitialServerEvent event) { Player player = event.getPlayer(); Optional<RegisteredServer> server = proxyServer.getServer(Config.serverQueue); server.ifPresent(event::setInitialServer); } but I still get the error, so I don't think it's the queue plugin

wordandahalf commented 4 months ago

This seems to be somewhat of a vanilla client issue. The client fetches public key of the used Minecraft profile asynchronously and then sends it to the server. The key can only be updated during play state and the client does not check if it is in play state or got put into configuration state again. However this should only really be an issue when switching servers really fast after the initial login. Might this be the case here?

I agree with your interpretation--we've encountered this issue, but luckily we can work around it.

jacobjake1 commented 4 months ago

How can we work around it?

On Sun, Jul 7, 2024, 12:49 PM Ryan Jones @.***> wrote:

This seems to be somewhat of a vanilla client issue. The client fetches public key of the used Minecraft profile asynchronously and then sends it to the server. The key can only be updated during play state and the client does not check if it is in play state or got put into configuration state again. However this should only really be an issue when switching servers really fast after the initial login. Might this be the case here?

I agree with your interpretation--we've encountered this issue, but luckily we can work around it.

— Reply to this email directly, view it on GitHub https://github.com/PaperMC/Velocity/issues/1373#issuecomment-2212521339, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCS4P5TRIZPZSFQ43PQEYDZLF5Q5AVCNFSM6AAAAABKOD6O3KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJSGUZDCMZTHE . You are receiving this because you modified the open/close state.Message ID: @.***>

lemonlambda commented 4 months ago

I am experiencing this but only while I'm op'ed.

Gerrygames commented 4 months ago

This will apparently be fixed in a future version of Minecraft: https://bugs.mojang.com/browse/MC-272506

jacobjake1 commented 4 months ago

That's months if not years into the future, I need a way to fix it now

On Wed, Jul 10, 2024, 4:33 PM Gero @.***> wrote:

This will apparently be fixed in a future version of Minecraft: https://bugs.mojang.com/browse/MC-272506

— Reply to this email directly, view it on GitHub https://github.com/PaperMC/Velocity/issues/1373#issuecomment-2221545614, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCS4P6RTHVEGF6SMK65DC3ZLWSD3AVCNFSM6AAAAABKOD6O3KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRRGU2DKNRRGQ . You are receiving this because you were mentioned.Message ID: @.***>

electronicboy commented 4 months ago

The only real fix we could do for velocity would be to prevent server switching until we get that packet

jacobjake1 commented 4 months ago

If it's caused by switching servers too quickly, I could try adding a small delay between server switches I guess

On Wed, Jul 10, 2024, 6:28 PM Shane Freeder @.***> wrote:

The only real fix we could do for velocity would be to prevent server switching until we get that packet

— Reply to this email directly, view it on GitHub https://github.com/PaperMC/Velocity/issues/1373#issuecomment-2221699972, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCS4PZNO4ZH4ZAGHII7KBDZLW7TLAVCNFSM6AAAAABKOD6O3KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRRGY4TSOJXGI . You are receiving this because you were mentioned.Message ID: @.***>

jacobjake1 commented 4 months ago

Adding a 3 second delay before transferring the player to the main server fixed the issue. Need to make sure they are actually fully connected to the hub main server before you transition them with the delay.

saifsuleman commented 2 months ago

The only real fix we could do for velocity would be to prevent server switching until we get that packet

Do you know specifically what packet this is? I'm thinking of deferring my redirects until I receive it as I'm experiencing this issue

electronicboy commented 2 months ago

The mojang name of the packet is in the error, don't recall off the top of my head what we call that packet

Little100 commented 2 months ago

Adding a 3 second delay before transferring the player to the main server fixed the issue. Need to make sure they are actually fully connected to the hub main server before you transition them with the delay.在将玩家转移到主服务器之前添加 3 秒的延迟修复了该问题。在延迟转换它们之前,需要确保它们实际上完全连接到中心主服务器。

May I ask how you did it specifically? I'm not very familiar with Velocity. Can you tell me? I've also encountered this problem

jacobjake1 commented 2 months ago

timeout.(3000ms) is literally all I added to my queue plugin

On Mon, Aug 26, 2024, 9:13 PM Little_100 @.***> wrote:

Adding a 3 second delay before transferring the player to the main server fixed the issue. Need to make sure they are actually fully connected to the hub main server before you transition them with the delay.在将玩家转移到主服务器之前添加 3 秒的延迟修复了该问题。在延迟转换它们之前,需要确保它们实际上完全连接到中心主服务器。

May I ask how you did it specifically? I'm not very familiar with Velocity. Can you tell me? I've also encountered this problem

— Reply to this email directly, view it on GitHub https://github.com/PaperMC/Velocity/issues/1373#issuecomment-2311533598, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCS4P5BZYSU5ZMG7KLWJUDZTP4E7AVCNFSM6AAAAABKOD6O3KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJRGUZTGNJZHA . You are receiving this because you were mentioned.Message ID: @.***>