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

1.21 and errors #1251

Open ShadowOfHeaven-Me opened 3 months ago

ShadowOfHeaven-Me commented 3 months ago

What happened?

No forceLogin and forceRegister occurs in 1.21 Also, this error happens on reloads and proper disables: image

Steps to reproduce

Use Paper 1.21, fastlogin and use my auth plugin Alix.zip

Plugin list

https://github.com/user-attachments/assets/210ee645-b580-4e6f-8f3d-e35551708a12

Configuration file

No response

Server log

[22:20:50 INFO]: [FastLogin] New incoming packet START[class=ServerboundHelloPacket, id=0] from UNKNOWN[/127.0.0.1:57692]

Is how the debug message looks like. (It was tested on localhost, that's why the loopback address)

Plugin version

1.12-SNAPSHOT-4dd6b9a

Platform

Spigot

Relevance

games647 commented 3 months ago

Please post the log during the login process.

ShadowOfHeaven-Me commented 3 months ago

okay, give me a second

ShadowOfHeaven-Me commented 3 months ago

https://paste.md-5.net/rapamiruki.md

ShadowOfHeaven-Me commented 3 months ago

https://paste.md-5.net/azizojocoy.md with the shutdown included

ShadowOfHeaven-Me commented 3 months ago

I should also mention that spark detects the invocation of forceLogin, however, during my testing, it was never invoked image

Btw, you should also have autoRegister be true by default

games647 commented 3 months ago

FastLogin skipped it's own authentication, because the auth plugin already logged the player in:

joined and was automatically verified for: IP AutoLogin

ShadowOfHeaven-Me commented 3 months ago

The thing is that forceLogin and forceRegister are never invoked, and any premium checks return false. Also (on 1.20, when force login did work), why does BukkitFastLoginPreLoginEvent#getProfile#isPremium return false sometimes, but invokes forceLogin or forceRegister later on, when the player is premium?

ShadowOfHeaven-Me commented 3 months ago

FastLogin skipped it's own authentication, because the auth plugin already logged the player in:

joined and was automatically verified for: IP AutoLogin

Forcelogin never happens, even if the auth plugin doesn't automatically log in the player

ShadowOfHeaven-Me commented 3 months ago

ping me when you find the issue

ShadowOfHeaven-Me commented 2 months ago

Are you having trouble reproducing the error? Or is it caused by ProtocolLib?

ShadowOfHeaven-Me commented 2 months ago

Um

daretmavi commented 2 months ago

The same error on server shutdown with paper-1.21.1-57. I use it together with UserLogin plugin.

[10:01:43 ERROR]: Error occurred while disabling FastLogin v1.12-SNAPSHOT-4dd6b9a java.util.ConcurrentModificationException: null at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1605) ~[?:?] at java.base/java.util.HashMap$ValueIterator.next(HashMap.java:1633) ~[?:?] at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:52) ~[guava-32.1.2-jre.jar:?] at com.google.common.collect.Iterators$ConcatenatedIterator.hasNext(Iterators.java:1400) ~[guava-32.1.2-jre.jar:?] at ProtocolLib.jar/com.comphenix.protocol.async.AsyncFilterManager.unregisterAsyncHandlers(AsyncFilterManager.java:289) ~[ProtocolLib.jar:?] at ProtocolLib.jar/com.comphenix.protocol.async.AsyncFilterManager.unregisterAsyncHandlers(AsyncFilterManager.java:283) ~[ProtocolLib.jar:?] at FastLoginBukkit.jar/com.github.games647.fastlogin.bukkit.FastLoginBukkit.onDisable(FastLoginBukkit.java:198) ~[FastLoginBukkit.jar:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:291) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.disablePlugin(PaperPluginInstanceManager.java:237) ~[paper-1.21.1.jar:1.21.1-57-b483da4] at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.disablePlugins(PaperPluginInstanceManager.java:161) ~[paper-1.21.1.jar:1.21.1-57-b483da4] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.disablePlugins(PaperPluginManagerImpl.java:97) ~[paper-1.21.1.jar:1.21.1-57-b483da4] at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:541) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.CraftServer.disablePlugins(CraftServer.java:609) ~[paper-1.21.1.jar:1.21.1-57-b483da4] at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:1046) ~[paper-1.21.1.jar:1.21.1-57-b483da4] at net.minecraft.server.dedicated.DedicatedServer.stopServer(DedicatedServer.java:847) ~[paper-1.21.1.jar:1.21.1-57-b483da4] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1353) ~[paper-1.21.1.jar:1.21.1-57-b483da4] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.1.jar:1.21.1-57-b483da4] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

ShadowOfHeaven-Me commented 2 months ago

It's really weird how delayForceLogin is invoked, while the actual forceLogin method isn't

RobertGaminPlayz commented 1 month ago

idk if my issue is the same but it may be similar. There are no errors on bungee but the errors from lobby shows this... Basically the issue is it doesn't force register the player.... It uses the latest FastLogin and Authme plugin on the servers bungee or paper.

[13:40:31 INFO]: [DiscordSRV] Player XxTBNRfatxX_ joined with silent joining permission, not sending a join message [13:40:31 INFO]: XxTBNRfatxX_[/] logged in with entity id 1077 at ([login]4.83456653865907, 105.0, 25.221890852964954) [13:40:31 INFO]: [FastLogin] Player info LOGIN command for XxTBNRfatxX_ from proxy [13:40:31 INFO]: [FastLogin] Delaying force login until join event fired?: false [13:40:32 INFO]: [FastLogin] Logging player XxTBNRfatxX_ in [13:40:32 WARN]: [FastLogin] ERROR ON FORCE LOGIN of XxTBNRfatxX_ java.lang.IllegalStateException: AuthMeAsyncPreLoginEvent may only be triggered synchronously. at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:42) ~[paper-1.21.jar:1.21-127-4e6a2a1] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[paper-1.21.jar:1.21-127-4e6a2a1] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?] at authme-5.7.0-SNAPSHOT.jar/fr.xephi.authme.service.BukkitService.callEvent(BukkitService.java:249) ~[authme-5.7.0-SNAPSHOT.jar:?] at authme-5.7.0-SNAPSHOT.jar/fr.xephi.authme.process.login.AsynchronousLogin.getPlayerAuth(AsynchronousLogin.java:193) ~[authme-5.7.0-SNAPSHOT.jar:?] at authme-5.7.0-SNAPSHOT.jar/fr.xephi.authme.process.login.AsynchronousLogin.getPlayerAuth(AsynchronousLogin.java:144) ~[authme-5.7.0-SNAPSHOT.jar:?] at authme-5.7.0-SNAPSHOT.jar/fr.xephi.authme.process.login.AsynchronousLogin.forceLogin(AsynchronousLogin.java:116) ~[authme-5.7.0-SNAPSHOT.jar:?] at authme-5.7.0-SNAPSHOT.jar/fr.xephi.authme.process.Management.lambda$forceLogin$1(Management.java:57) ~[authme-5.7.0-SNAPSHOT.jar:?] at authme-5.7.0-SNAPSHOT.jar/fr.xephi.authme.service.BukkitService.runTaskOptionallyAsync(BukkitService.java:123) ~[authme-5.7.0-SNAPSHOT.jar:?] at authme-5.7.0-SNAPSHOT.jar/fr.xephi.authme.process.Management.runTask(Management.java:105) ~[authme-5.7.0-SNAPSHOT.jar:?] at authme-5.7.0-SNAPSHOT.jar/fr.xephi.authme.process.Management.forceLogin(Management.java:57) ~[authme-5.7.0-SNAPSHOT.jar:?] at authme-5.7.0-SNAPSHOT.jar/fr.xephi.authme.api.v3.AuthMeApi.forceLogin(AuthMeApi.java:265) ~[authme-5.7.0-SNAPSHOT.jar:?] at FastLoginBukkit.jar/com.github.games647.fastlogin.bukkit.hook.AuthMeHook.forceLogin(AuthMeHook.java:92) ~[FastLoginBukkit.jar:?] at FastLoginBukkit.jar/com.github.games647.fastlogin.bukkit.hook.AuthMeHook.forceLogin(AuthMeHook.java:52) ~[FastLoginBukkit.jar:?] at FastLoginBukkit.jar/com.github.games647.fastlogin.core.shared.ForceLoginManagement.forceLogin(ForceLoginManagement.java:120) ~[FastLoginBukkit.jar:?] at FastLoginBukkit.jar/com.github.games647.fastlogin.core.shared.ForceLoginManagement.run(ForceLoginManagement.java:76) ~[FastLoginBukkit.jar:?] at FastLoginBukkit.jar/com.github.games647.fastlogin.bukkit.task.ForceLoginTask.run(ForceLoginTask.java:64) ~[FastLoginBukkit.jar:?] at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:86) ~[paper-1.21.jar:1.21-127-4e6a2a1] at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.21.jar:1.21-127-4e6a2a1] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.21.jar:?] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?] [13:40:37 INFO]: [AuthMe] XxTBNRfatxX_ logged in []

ShadowOfHeaven-Me commented 1 month ago

It's really weird how delayForceLogin is invoked, while the actual forceLogin method isn't

(It was fixed in the latest build)