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
482 stars 119 forks source link

1.20.5+ Spigot compatibility (Field index 0 is out of bounds) #1202

Closed omerien closed 2 months ago

omerien commented 2 months ago

What happened?

NOTE: this is on a server on 1.20.6, with several levels of beta builds. See below.

When a player logs in (cracked or not), the error shown above is thrown in the console. The player then has to register/login, even if they're marked as premium.

Full transcript of the error:

[19:45:53 ERROR]: [FastLogin] Unhandled exception occurred in onAsyncPacket() for FastLogin
com.comphenix.protocol.reflect.FieldAccessException: Field index 0 is out of bounds for length 0
        at ProtocolLib.jar/com.comphenix.protocol.reflect.FieldAccessException.fromFormat(FieldAccessException.java:49) ~[ProtocolLib.jar:?]
        at ProtocolLib.jar/com.comphenix.protocol.reflect.StructureModifier.read(StructureModifier.java:244) ~[ProtocolLib.jar:?]
        at FastLoginBukkit.jar/com.github.games647.fastlogin.bukkit.listener.protocollib.ProtocolLibListener.onEncryptionBegin(ProtocolLibListener.java:155) ~[FastLoginBukkit.jar:?]
        at FastLoginBukkit.jar/com.github.games647.fastlogin.bukkit.listener.protocollib.ProtocolLibListener.onPacketReceiving(ProtocolLibListener.java:150) ~[FastLoginBukkit.jar:?]
        at ProtocolLib.jar/com.comphenix.protocol.async.AsyncListenerHandler.processPacket(AsyncListenerHandler.java:622) ~[ProtocolLib.jar:?]
        at ProtocolLib.jar/com.comphenix.protocol.async.AsyncListenerHandler.listenerLoop(AsyncListenerHandler.java:576) ~[ProtocolLib.jar:?]
        at ProtocolLib.jar/com.comphenix.protocol.async.AsyncListenerHandler.access$100(AsyncListenerHandler.java:49) ~[ProtocolLib.jar:?]
        at ProtocolLib.jar/com.comphenix.protocol.async.AsyncListenerHandler$1.run(AsyncListenerHandler.java:221) ~[ProtocolLib.jar:?]
        at ProtocolLib.jar/com.comphenix.protocol.async.AsyncListenerHandler.lambda$start$1(AsyncListenerHandler.java:290) ~[ProtocolLib.jar:?]
        at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.6.jar:git-Paper-49]
        at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.20.6.jar:git-Paper-49]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.20.6.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) ~[?:?]

The server is using several beta builds since this is on 1.20.6

The server is running Geyser but all testing is done with Java accounts by the way.

What did you expect?

The player should be able to log in without having to provide a password.

Steps to reproduce

  1. Start server with latest build of the plugin on 1.20.6
  2. Connect a premium account

Plugin list

DiscordSRV, FastLogin, Geyser-Spigot, ProtocolLib, UserLogin

Configuration file

https://github.com/omerien/omerien/blob/main/FastLogin.2

Server log

https://github.com/omerien/omerien/blob/main/FastLogin.1

Plugin version

v1.12-SNAPSHOT-07e19b5

Platform

Spigot

Relevance

davidjimeneztv commented 2 months ago

I'm the same!

MC: 1.18.2 Plugin Version: Latest and 1.10 ProtocolLib: Latest 5.2.0.

I tried with 1.10 and latest version of FastLogin, with AuthMe and LoginSecurity.

[20:10:03 ERROR]: [FastLogin] Unhandled exception occurred in onAsyncPacket() for FastLogin org.bukkit.plugin.IllegalPluginAccessException: Plugin attempted to register task while disabled at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftScheduler.validate(CraftScheduler.java:467) ~[forge-1.18.2-40.2.17-universal.jar%23124!/:?] at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftScheduler.runTaskTimerAsynchronously(CraftScheduler.java:221) ~[forge-1.18.2-40.2.17-universal.jar%23124!/:?] at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftScheduler.runTaskTimerAsynchronously(CraftScheduler.java:217) ~[forge-1.18.2-40.2.17-universal.jar%23124!/:?] at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftScheduler.runTaskLaterAsynchronously(CraftScheduler.java:168) ~[forge-1.18.2-40.2.17-universal.jar%23124!/:?] at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftScheduler.runTaskAsynchronously(CraftScheduler.java:137) ~[forge-1.18.2-40.2.17-universal.jar%23124!/:?] at com.github.games647.fastlogin.bukkit.listener.protocollib.ProtocolLibListener.onLogin(ProtocolLibListener.java:81) ~[FastLogin.jar:?] at com.github.games647.fastlogin.bukkit.listener.protocollib.ProtocolLibListener.onPacketReceiving(ProtocolLibListener.java:52) ~[FastLogin.jar:?] at com.comphenix.protocol.async.AsyncListenerHandler.processPacket(AsyncListenerHandler.java:622) ~[ProtocolLib%20(2).jar:?] at com.comphenix.protocol.async.AsyncListenerHandler.listenerLoop(AsyncListenerHandler.java:576) ~[ProtocolLib%20(2).jar:?] at com.comphenix.protocol.async.AsyncListenerHandler.access$100(AsyncListenerHandler.java:49) ~[ProtocolLib%20(2).jar:?] at com.comphenix.protocol.async.AsyncListenerHandler$1.run(AsyncListenerHandler.java:221) ~[ProtocolLib%20(2).jar:?] at com.comphenix.protocol.async.AsyncListenerHandler.lambda$start$1(AsyncListenerHandler.java:290) ~[ProtocolLib%20(2).jar:?] at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:77) [forge-1.18.2-40.2.17-universal.jar%23124!/:?] at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [forge-1.18.2-40.2.17-universal.jar%23124!/:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?] at java.lang.Thread.run(Thread.java:840) [?:?]

games647 commented 2 months ago

Outdated plugin version. Please check the link from the checklist.

EDIT: 1.10 is only outdated. I'm currently investigating. Protocol changes require a lot of time.

Nonstopgaming75 commented 2 months ago

i have the same issue with 1.20.6

Nonstopgaming75 commented 2 months ago

[22:16:44 INFO]: [FastLogin] Hooking into auth plugin: AuthMeHook [22:19:14 INFO]: [FastLogin] New packet Dynamic-d7b0ec1b-abce-4da9-9025-affa23ab941a[class=ServerboundHelloPacket, id=0] from com.comphenix.protocol.injector.temporary.TemporaryPlayerInvocationHandler@122ea23f [22:19:14 ERROR]: [FastLogin] Unhandled exception occurred in onAsyncPacket() for FastLogin com.comphenix.protocol.reflect.FieldAccessException: Field index 0 is out of bounds for length 0 at ProtocolLib.jar/com.comphenix.protocol.reflect.FieldAccessException.fromFormat(FieldAccessException.java:49) ~[ProtocolLib.jar:?] at ProtocolLib.jar/com.comphenix.protocol.reflect.StructureModifier.read(StructureModifier.java:244) ~[ProtocolLib.jar:?] at FastLoginBukkit.jar/com.github.games647.fastlogin.bukkit.listener.protocollib.ProtocolLibListener.onEncryptionBegin(ProtocolLibListener.java:155) ~[FastLoginBukkit.jar:?] at FastLoginBukkit.jar/com.github.games647.fastlogin.bukkit.listener.protocollib.ProtocolLibListener.onPacketReceiving(ProtocolLibListener.java:150) ~[FastLoginBukkit.jar:?] at ProtocolLib.jar/com.comphenix.protocol.async.AsyncListenerHandler.processPacket(AsyncListenerHandler.java:622) ~[ProtocolLib.jar:?] at ProtocolLib.jar/com.comphenix.protocol.async.AsyncListenerHandler.listenerLoop(AsyncListenerHandler.java:576) ~[ProtocolLib.jar:?] at ProtocolLib.jar/com.comphenix.protocol.async.AsyncListenerHandler.access$100(AsyncListenerHandler.java:49) ~[ProtocolLib.jar:?] at ProtocolLib.jar/com.comphenix.protocol.async.AsyncListenerHandler$1.run(AsyncListenerHandler.java:221) ~[ProtocolLib.jar:?] at ProtocolLib.jar/com.comphenix.protocol.async.AsyncListenerHandler.lambda$start$1(AsyncListenerHandler.java:290) ~[ProtocolLib.jar:?] at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.6.jar:git-Paper-54] at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.20.6.jar:git-Paper-54] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.20.6.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) ~[?:?]

games647 commented 2 months ago

That's a bug from ProtocolLib. It doesn't have the new packet ids. Furthermore, Mojang changed the protocol. Protocol changes require a lot of effort, but I'm on it.

Nonstopgaming75 commented 2 months ago

Great hope to see it working soon

games647 commented 2 months ago

Should be fixed now.