Your connection to lobby encountered a problem (probably malformed packets)
PhaseLocked opened this issue ยท 2 comments
Description
Hi, I have a very strange situation with LuckPerms running on Velocity.
My setup is:
Velocity ----> Paper 1.21.1 (lobby)
(LuckPerms) (LuckPerms)
Both Velocity's and Paper's LuckPerms instances are connected to the same database (MariaDB), when I give certain permissions to myself or other users (like * or luckperms.*) I get an error saying "Your connection to lobby encountered a problem".
Removing the permissions resolves the issue and the other servers I use via Velocity also seem to be affected.
When the permissions are added in-game nothing happens, even exiting and re-entering the game no issues arise, the behavior start the first time the proxy is restarted after the permission is added.
I checked both the server and Velocity's logs and, while the server doesn't provide any useful information Velocity does, the log is in the relevant section.
Particular focus should be on:
Caused by: java.lang.IllegalArgumentException: Unknown node type 3
and
[19:57:55 ERROR]: [server connection] kol_tk -> lobby: exception encountered in com.velocitypowered.proxy.connection.backend.BackendPlaySessionHandler@13b81dbd
io.netty.handler.codec.CorruptedFrameException: Error decoding class com.velocitypowered.proxy.protocol.packet.AvailableCommandsPacket Direction CLIENTBOUND Protocol 1.21 State PLAY ID 11
The error suggests some problem decoding (I can't understand if it's an XML encoder or some kind of cryptographic error), so my opinion is LuckPerms causes a malformed packet when the plugin sends the client the list of available commands but it's just a guess since i'm not very strong in Java.
Reproduction Steps
Connect to the server
Expected Behaviour
Error message "Your connection to lobby encountered a problem"
Server Details
Proxy: Velocity 3.4.0-SNAPSHOT, Server: Paper 1.21.1-131
LuckPerms Version
Proxy: LuckPerms v5.4.145, Server: LuckPerms v5.4.146
Logs and Configs
https://gist.github.com/PhaseLocked/971fe8a72ae91c506df908f13fe52994
Extra Details
No response
unless you can reproduce this with no other plugins installed, chances are some other plugin is causing this
unless you can reproduce this with no other plugins installed, chances are some other plugin is causing this
Upon further analysis I noticed this lines
[19:56:45 WARN]: The server channel initializer has been replaced by org.adde0109.ambassador.Ambassador.inject(Ambassador.java:130)
[19:56:45 WARN]: The backend channel initializer has been replaced by org.adde0109.ambassador.Ambassador.inject(Ambassador.java:133)
Which made me suspect that Ambassador was behind this problem, after removing it everything resolved