games647 / FastLogin

Checks if a minecraft player has a valid paid account. If so, they can skip offline authentication automatically. (premium auto login)
https://www.spigotmc.org/resources/fastlogin.14153
MIT License
506 stars 123 forks source link

FastLogin won't start with latest version of Geyser #922

Open deiphiz opened 2 years ago

deiphiz commented 2 years ago

What happened?

Running FastLogin build #1159 and any GeyserMC Spigot build above #1189 causes FastLogin to run into a NoSuchMethodError error and the plugin will refuse to start. With GeyserMC disabled, FastLogin will still start as normal.

This error in particular seems to be caused by Geyser renaming their session.auth.AuthType class into api.network.AuthType. The change looks to be in part of their big API changes indicated here: https://github.com/GeyserMC/Geyser/pull/3267.

For reference, this is the Jenkins link for the Geyser build that started the issue: https://ci.opencollab.dev/job/GeyserMC/job/Geyser/job/master/1189/

What did you expect?

The plugin should start smoothly along with GeyserMC upon server startup

Steps to reproduce

Start server with FastLogin, ProtocolLib, and any GeyserMC build above #1189

Plugin list

AuthMe, FastLogin, floodgate, Geyser-Spigot, ProtocolLib

Configuration file

https://gist.github.com/deiphiz/7318f24a14c369333804a6a153daa88e

Server log

[21:43:36 ERROR]: Error occurred while enabling FastLogin v1.12-SNAPSHOT-7425df8 (Is it up to date?)
java.lang.NoSuchMethodError: 'org.geysermc.geyser.session.auth.AuthType org.geysermc.geyser.configuration.GeyserConfiguration$IRemoteConfiguration.getAuthType()'
        at com.github.games647.fastlogin.core.hooks.bedrock.GeyserService.<init>(GeyserService.java:47) ~[FastLoginBukkit.jar:?]
        at com.github.games647.fastlogin.bukkit.FastLoginBukkit.initializeFloodgate(FastLoginBukkit.java:155) ~[FastLoginBukkit.jar:?]
        at com.github.games647.fastlogin.bukkit.FastLoginBukkit.onEnable(FastLoginBukkit.java:101) ~[FastLoginBukkit.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:548) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugin(CraftServer.java:596) ~[purpur-1.19.2.jar:git-Purpur-1774]
        at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugins(CraftServer.java:510) ~[purpur-1.19.2.jar:git-Purpur-1774]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:641) ~[purpur-1.19.2.jar:git-Purpur-1774]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:427) ~[purpur-1.19.2.jar:git-Purpur-1774]        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:343) ~[purpur-1.19.2.jar:git-Purpur-1774]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1142) ~[purpur-1.19.2.jar:git-Purpur-1774]
        at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:310) ~[purpur-1.19.2.jar:git-Purpur-1774]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
[21:43:36 INFO]: [FastLogin] Disabling FastLogin v1.12-SNAPSHOT-7425df8
[21:43:36 INFO]: [FastLogin] Safely shutting down scheduler. This could take up to one minute.

Plugin version

1.12-SNAPSHOT-7425df8

Platform

Spigot

Relevance

Smart123s commented 2 years ago

Duplicate of https://github.com/games647/FastLogin/issues/871

TheDiego845 commented 2 years ago

image

Smart123s commented 2 years ago

image

Did you update Geyser?

TheDiego845 commented 2 years ago

Yes now image

Smart123s commented 2 years ago

Which ProtocolLib version do you have? Seems like it's 4.x And what MC version are you on? Also https://github.com/games647/FastLogin/issues/881 might be useful.

TheDiego845 commented 2 years ago

1.17.1 Paper and 4.8.0

TheDiego845 commented 2 years ago

image

TheDiego845 commented 2 years ago

Same problem with build 1079

Smart123s commented 2 years ago

Same problem with build 1079

FastLogin build 1079 is only compatible with Geyser build 1188 (and older), ProtocolLib 4.8.0 and MC version 1.18.2 (or older).

TheDiego845 commented 2 years ago

So no more than 1.19.30 people will be able to enter my bedrock server?

infinite1945 commented 2 years ago

unknown

Smart123s commented 2 years ago

I've backported the changes from https://github.com/games647/FastLogin/pull/923 on top of 41890679ed9c4d78664608ee5e115efb97d25371 (build 1079).

Could you try the result? FastLoginBukkit-31bc57c.zip (source: https://github.com/Smart123s/FastLogin/commit/31bc57c8f2f217b1ec3a156c616614ff6eeb6b87)

EDIT: use this with ProtocolLib 4.8.0 and MC version 1.18.2 (or older), and latest Geyser.

TheDiego845 commented 2 years ago

Ok i am going to test it

TheDiego845 commented 2 years ago

WORKS PERFECT. THANKS YOU

infinite1945 commented 2 years ago

It's working now , thanks for your help @Smart123s i hope you the best ; )

spartamc commented 2 years ago

@Smart123s Im using Minecraft 1.19 and don't work, any solution? Im using ProtocolLib version 4.8.0 and Last of Geyser

Smart123s commented 2 years ago

@spartamc for MC 1.19 you need to use ProtocolLib 5.0.

spartamc commented 2 years ago

@Smart123s If I have now noticed that when using version 4.8.0 it only gives errors, I am with version 5.0 but it does not work either. And I have downloaded the zip that you have passed your

Smart123s commented 2 years ago

@spartamc the zip is for ProtocolLib 4.8 which is needed for MC version 1.18 or earlier. With MC 1.19 you can use ProtocolLib 5.0 with latest FastLogin and latest Geyser.

spartamc commented 2 years ago

@Smart123s I've tried but it hasn't worked for me. FastLogin's latest version is #1163 isn't it?

Smart123s commented 2 years ago

Yes it is. Could you please double check if you have the appropriate versions of Geyser, ProtocolLib and FastLogin? If it still doesn't work, open a new issue with server logs.

spartamc commented 2 years ago

@Smart123s im using: ProtocolLib version 5.0.0 FastLogin #1163 And Geyser image

Smart123s commented 2 years ago

@spartamc could you post server logs?

spartamc commented 2 years ago

@Smart123s I don't understand why it works now, I think it was because I used the zip for the FastLogin and I wasn't using the latest version when I was doing tests. Sorry for wasting your time and thank you very much.

Smart123s commented 2 years ago

@spartamc it's ok, I'm glad it works now 🎉

spartamc commented 2 years ago

@Smart123s I have another question that is not related to this but it is normal that sometimes the plugin changes the UUID to some players?

Smart123s commented 2 years ago

@spartamc you can check premiumuuid in config.yml. also, does it happen for Java or Bedrock players?

spartamc commented 2 years ago

@Smart123s That option I have disabled, it has only happened to me with java accounts, that of a friend and mine for now. I didn't take much thought out until I realized that when the UUID changes it loses the money.

jondycz commented 1 year ago

Same issue 1.19.3, latest geyser, fast login, protocollib

Smart123s commented 1 year ago

@jondycz Couldn't reproduce the issue. Tested on

Client:

Server