PaperMC / Velocity

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

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

Open jacobjake1 opened 2 weeks ago

jacobjake1 commented 2 weeks 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 2 weeks ago

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

jacobjake1 commented 2 weeks ago

nevermind its still going on

Gerrygames commented 2 weeks 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 2 weeks ago

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

Gerrygames commented 2 weeks 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 2 weeks 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 2 weeks 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 2 weeks 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 2 weeks 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 2 weeks 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 2 weeks 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: @.***>

LemonjamesD commented 2 weeks ago

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

Gerrygames commented 2 weeks ago

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

jacobjake1 commented 2 weeks 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 2 weeks ago

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

jacobjake1 commented 2 weeks 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 2 weeks 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.