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

Tried to connect as a Java Edition player! Is Floodgate configured correctly? #703

Closed
2 tasks done
rad1914 opened this issue Jan 17, 2022 · 13 comments · Fixed by #876
Closed
2 tasks done

Tried to connect as a Java Edition player! Is Floodgate configured correctly? #703

rad1914 opened this issue Jan 17, 2022 · 13 comments · Fixed by #876
Labels
bug Something isn't working Floodgate/Geyser

Comments

@rad1914
Copy link

rad1914 commented Jan 17, 2022

What happened?

When trying to auto login with FastLogin, Floodgate throws an error and disconnects some of my players

What did you expect?

Common Auto-Login

Steps to reproduce

I noticed that only people who log in with Bedrock and specifically a Gamertag with spaces are the ones that get logged out, the rest can log in correctly.
I tried replacing the spaces with the "_" from the Floodgate config, but that doesn't work either

Plugin list

AdvancedLogin, PlaceholderAPI, Oraxen, FastLogin, Spark, plugman, Worldedit, WorldGuard, EssentialsX

Configuration file

https://gist.github.com/rad1914/1764bcca8ebe53dfa268ff075fd49b89

Server log

https://pastebin.com/D2DgWE5S

Plugin version

1.11-SNAPSHOT-3bcc6c2

Platform

Spigot

Relevance

  • I tried the latest build
  • I checked for existing tickets -
    If there are, please vote them with a thumps reaction and not create new ones
@rad1914 rad1914 added the bug Something isn't working label Jan 17, 2022
@Smart123s
Copy link
Contributor

Duplicate of #647, but no response from it's author.

[FastLogin] Requesting premium login for registered player: Otoniel_Gamer73�[m

The player was saved as a premium player, which means that auto login is needed for them (this behavior will change with #700). This means that the player was recognized as a Floodgate player at least once. But I'm sure that they are not detected at some point, and that causes the bug.

Are you using BungeeCord/Waterfall? If not, are you using ProtocolLIb or ProtocolSupport?

@fabegalo
Copy link

Bedrock players are being recognized as Java players in FastLogin causing a geyser error

@fabegalo
Copy link

[floodgate]: Floodgate player who is logged in as *fabegalo 00000000-0000-0000-0009-01f872f2a6d7 joined
[15:50:10 INFO] [fastlogin]: Incoming login request for fabegalo from /191.177.48.139:36337
[15:50:10 INFO] [fastlogin]: Handling player fabegalo
[15:50:10 INFO] [fastlogin]: Requesting premium login for registered player: fabegalo
[15:50:10 INFO] [geyser]: Could not find packet for ClientboundHelloPacket
[15:50:10 INFO] [geyser]: fabegalo has disconnected from remote Java server on address 191.177.48.139 because of Tentou fazer login como um jogador Java Edition! O Floodgate está configurado corretamente?
[15:50:10 ERROR]: com.github.steveice10.mc.protocol.data.UnexpectedEncryptionException: Cannot reply to ClientboundHelloPacket without profile and access token.
[15:50:10 ERROR]: at com.github.steveice10.mc.protocol.ClientListener.packetReceived(ClientListener.java:55)
[15:50:10 ERROR]: at com.github.steveice10.packetlib.tcp.TcpSession.callPacketReceived(TcpSession.java:156)
[15:50:10 ERROR]: at com.github.steveice10.packetlib.tcp.TcpSession.channelRead0(TcpSession.java:377)
[15:50:10 ERROR]: at com.github.steveice10.packetlib.tcp.TcpSession.channelRead0(TcpSession.java:28)
[15:50:10 ERROR]: at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
[15:50:10 ERROR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
[15:50:10 ERROR]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)

@fabegalo

This comment was marked as spam.

@LuizLoyola
Copy link

Same error as him ^
Tried with a Bedrock-only and with a Bedrock+Java linked account, same error. (Java players work fine)

@fabegalo
Copy link

Same error as him ^ Tried with a Bedrock-only and with a Bedrock+Java linked account, same error. (Java players work fine)

Yes, this error is linked to Fast Login, since without Fast Login, it works normally

@games647

@games647
Copy link
Owner

Please use BungeeCord or ProtocolSupport. The implementation for integration with ProtocolLib requires the cancellation and later re-submission of the client packet. Floodgate/Geyser intercept the packets too early in the process to see the cancellation. Fixing requires all of refactoring to only hold the first packet instead of cancel it. However many things needs to be considered, because the packet needs to be hold the complete login process. Things like timeout, session matching and more.

I'm open for any contribution as a pull request, but I don't have the time for a free hobby project.

@Smart123s
Copy link
Contributor

In the past few days, I spent some time debugging the ProtocolLib and Floodgate sources in connection with #689 and I might have a better way to detect Floodgates players. Currently, FastLogin checks the players names, and since spaces get replaced in the names, the algorithm screws up. The netty Channel on which the player/packet is sent through contains an attribute FloodgatePlayerImpl for Floodgate players. Unfortunately, ProtocolLib doesn't give any way to access the channel "of" a packet. My plan is to use Reflections to bypass some access modifiers (ProtocolLib and Floodgate does the same things in certain places), but we'll see how it goes, as that solution is extremely unsafe, and requires precision to be reliable. But it would be still better than using names. This is just a plan for now, I can't grantee that it'll actually work, or that it'll be reliable enough to be used.

Smart123s added a commit to Smart123s/FastLogin that referenced this issue Aug 5, 2022
@Smart123s
Copy link
Contributor

@rad1914 @fabegalo @LuizLoyola Could you check build FastLoginBukkit-40ac373.zip on a CLEAN SERVER!!!! Do NOT install this on an existing server, as this build contains modifications to the FastLogin database model, therefore making it incompatible with existing versions. If you install it on an existing server, you won't be able to revert to older versions of FastLogin!

This build fixes Floodgate prefixes with ProtocolLib. If you are not using ProtocolLib, then you shouldn't even have this issue...

Also, I'd be really happy if someone could check this out with a gamertag that has at least one space in it.

Thanks for helping, have a nice day!

@fabegalo
Copy link

fabegalo commented Aug 5, 2022

@Smart123s This version is just bukkit?, and for the velocity proxy?

@Smart123s
Copy link
Contributor

FastLogin for Velocity doesn't support Floodgate yet. #649

@Override
public BedrockService<?> getBedrockService() {
return null;
}

@fabegalo
Copy link

fabegalo commented Aug 5, 2022

@Smart123s in my case the problem is in the velocity proxy that turns bedrock players into java accounts

@Smart123s
Copy link
Contributor

@Smart123s in my case the problem is in the velocity proxy that turns bedrock players into java accounts

Because FastLogin for Velocity doesn't support Floodgate, it doesn't even understand the concept of a Bedrock player. Every Velocity player is a Java player in the plugins understanding.
I will port Floodgate support to Velocity when I'll have more time and when it'll work reasonably well on the existing platforms. But as of today, there are already 17 open issues for Floodgate, and I don't want to increase that number by adding numerous bugs from Velocity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Floodgate/Geyser
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants