Velocity icon indicating copy to clipboard operation
Velocity copied to clipboard

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

Open jacobjake1 opened this issue 1 year ago • 22 comments

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 avatar Jul 06 '24 05:07 jacobjake1

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

jacobjake1 avatar Jul 06 '24 07:07 jacobjake1

nevermind its still going on

jacobjake1 avatar Jul 06 '24 12:07 jacobjake1

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?

Gerrygames avatar Jul 06 '24 12:07 Gerrygames

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

Timongcraft avatar Jul 06 '24 12:07 Timongcraft

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.

Gerrygames avatar Jul 06 '24 12:07 Gerrygames

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.

Timongcraft avatar Jul 06 '24 12:07 Timongcraft

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 avatar Jul 07 '24 00:07 jacobjake1

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 avatar Jul 07 '24 00:07 jacobjake1

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

jacobjake1 avatar Jul 07 '24 00:07 jacobjake1

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.

wordandahalf avatar Jul 07 '24 17:07 wordandahalf

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: @.***>

jacobjake1 avatar Jul 07 '24 18:07 jacobjake1

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

lemonlambda avatar Jul 08 '24 21:07 lemonlambda

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

Gerrygames avatar Jul 10 '24 21:07 Gerrygames

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: @.***>

jacobjake1 avatar Jul 10 '24 23:07 jacobjake1

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

electronicboy avatar Jul 10 '24 23:07 electronicboy

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 avatar Jul 10 '24 23:07 jacobjake1

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.

jacobjake1 avatar Jul 11 '24 02:07 jacobjake1

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

saifsuleman avatar Aug 24 '24 19:08 saifsuleman

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

electronicboy avatar Aug 24 '24 20:08 electronicboy

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

Little100 avatar Aug 27 '24 04:08 Little100

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: @.***>

jacobjake1 avatar Aug 27 '24 05:08 jacobjake1

Experiencing this on 2B2T

ghost avatar Feb 06 '25 01:02 ghost