kyngs / LibreLogin

Open-source, multiplatform, and highly customizable authentication plugin with outstanding features and API.
Mozilla Public License 2.0
171 stars 56 forks source link

Exception in receiveFakeStartPacket on PaperMC 1.20.2 #144

Closed Nadwey closed 1 year ago

Nadwey commented 1 year ago

This exception is thrown when an user that enabled premium account tries to join the server:

[20:15:32 ERROR]: [LibreLogin] Unhandled exception occurred in onAsyncPacket() for LibreLogin
com.comphenix.protocol.reflect.FieldAccessException: Field index 0 is out of bounds for length 0
        at com.comphenix.protocol.reflect.FieldAccessException.fromFormat(FieldAccessException.java:49) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.reflect.StructureModifier.write(StructureModifier.java:316) ~[ProtocolLib.jar:?]
        at xyz.kyngs.librelogin.paper.PaperListeners.receiveFakeStartPacket(PaperListeners.java:358) ~[LibreLogin.jar:?]
        at xyz.kyngs.librelogin.paper.PaperListeners.onPacketReceive(PaperListeners.java:321) ~[LibreLogin.jar:?]
        at xyz.kyngs.librelogin.paper.protocollib.ProtocolListener.onPacketReceiving(ProtocolListener.java:38) ~[LibreLogin.jar:?]
        at com.comphenix.protocol.async.AsyncListenerHandler.processPacket(AsyncListenerHandler.java:622) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.async.AsyncListenerHandler.listenerLoop(AsyncListenerHandler.java:576) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.async.AsyncListenerHandler.access$100(AsyncListenerHandler.java:49) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.async.AsyncListenerHandler$1.run(AsyncListenerHandler.java:221) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.async.AsyncListenerHandler.lambda$start$1(AsyncListenerHandler.java:290) ~[ProtocolLib.jar:?]
        at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.2.jar:git-Paper-203]
        at org.bukkit.craftbukkit.v1_20_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.20.2.jar:git-Paper-203]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.20.2.jar:?]
        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:833) ~[?:?]

Using ProtocolLib #669 and PaperMC 1.20.2 build #203

The issue happens both on the stable version (0.17.4) and the dev branch.

kyngs commented 1 year ago

1.20.2 is not supported and will not be until Velocity releases 1.20.2 support.