-
-
Notifications
You must be signed in to change notification settings - Fork 647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve Cookie API clientbound error #1359
Resolve Cookie API clientbound error #1359
Conversation
If I undestand your changes correctly, you queue player disconnects triggered by Velocity that would happen in login phase and execute them later, when the protocol is switched to play phase? I don't quite see how this solves the issue you described. Also, Velocity just forwards the cookie packets as they are, if no plugin intervenes via the cookie events. The plugin you mentioned doesn't seem to even touch cookies. Correct me if I'm wrong, but I think, some other plugin on the proxy or backend server just sent an invalid cookie request. Could you perhaps provide logs, I think they might help? |
https://mclo.gs/PAeWivU - Here's log A, which contains the issue. This only appears for the client, not for the actual proxy. [User's client without the fix] I can very much confirm that the fix applied did manage to resolve the issue. The title purely reflects what the error mentions, so I do apologize if that is inaccurately defined. I can confirm that this occurs with only the v4Guard plugin on its own. Client log: https://mclo.gs/fBLiagN |
This seems to be a weird issue and I don't understand why and how it occures. When I disconnect a player during login phase, everything works fine. I'm not sure if queuing disconnects until play phase is reached, is a proper solution, even though it works in your particular situation. |
I'm out of action due to surgery recovery, but, I'd imagine that this is a protocol state desync, disconnection packet in LOGIN is the same ID as the cookie request packet in CONFIG |
I am having the same issue with my plugin for velocity, the client no longer recieves the proper disconnect message send by the plugin and instead its getting this cookie request error. |
We are facing a similar issue that is caused by this. BungeeCord has a similar approach of queueing packets that are not allowed in the current state of the player https://github.com/SpigotMC/BungeeCord/blob/master/proxy/src/main/java/net/md_5/bungee/UserConnection.java#L187 The alternative would involve having checks for the correct state on each call from the caller site |
I am closing this PR, as it isn't the right approach to resolving this issue, which was fixed by correctly specifying how the phase and event should be handled. |
Since 07f1f9e, errors such as listed below appeared when utilizing anti-VPN plugins (most notably): https://github.com/v4Guard/connector
This effectively eliminates this issue and ensures that everything through the connection phase is handled correctly.
Steps for reproduction: