Skip to content
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

Set UUID and Username earlier #5326

Closed
wants to merge 1 commit into from
Closed

Set UUID and Username earlier #5326

wants to merge 1 commit into from

Conversation

pkt77
Copy link

@pkt77 pkt77 commented Feb 9, 2025

Currently, the Java UUID and Username are null during login events, causing remotes to receive a random UUID.

This PR initializes them after the Bedrock player is authenticated, before SessionInitializeEvent

I'm not the most familiar with Geyser code, so I am unaware of any problems that might occur from this. It is working as expected with Velocity online floodgate

@onebeastchris
Copy link
Member

Hey! Thanks for the PR. However, this PR will cause issues, which is why I'm closing it:
The final UUID and username (as in, those used by the server) is sent by the Java server in the ClientboundLoginFinished packet. With the changes in this PR, e.g. Floodgate's linking system (which can log in a Bedrock player with a Java player's UUID/username) wouldn't work as it would lead to neither the username, nor the UUID being correct. This would then lead to larger issues.

Further, this looks like a fix for an issue where the UUID is "randomly" incorrect on offline mode servers (instead of being the one set by floodgate) that can occur only on Geyser-Spigot and Floodgate-Spigot both being installed. When online mode is enabled, it would result in a different error and block the log-in.

This issue is, as we currently suspect it, caused by Geyser's code for direct injection (aka, avoiding a TCP connection) which sometimes causes floodgate to not register the new connection. To temporarily resolve this issue, try setting use-direct-connection to false in the Geyser config.

@pkt77
Copy link
Author

pkt77 commented Feb 9, 2025

Like I said, this is tested with Floodgate, it does not break it. The random UUIDs are in online mode. Setting use-direct-connection to false does not fix the issue. If you know a better way to fix this, please share.

@onebeastchris
Copy link
Member

It sounds like you've not set up data forwarding from velocity -> backends properly; that's my initial guess

Please join the Geyser discord, I'd be happy to debug the issue there :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants