Photon-GitHub / AntiCheatAddition

An anticheat with nieche checks to cover cheats usually not covered by anticheats.
GNU General Public License v3.0
153 stars 42 forks source link

onEnable exception error | and | onJoin console spam (zip file closed) #494

Closed mrfloris closed 2 years ago

mrfloris commented 2 years ago

Hey, I just wanted to give this a try and installed it, I noticed that on the first run I had an exception error. I assumed it was perhaps related to not having the config files yet. When it was done loading, I /stop and started up, the config files were generated but it still gives the error. I thought as a courtesy I'd report it.

[15:21:45 INFO]: [AntiCheatAddition] Enabling AntiCheatAddition v8.0.0
[15:21:45 INFO]: [AntiCheatAddition] Bungeecord not detected
[15:21:45 INFO]: [AntiCheatAddition] Starting metrics. This plugin uses bStats metrics: https://bstats.org/plugin/bukkit/AntiCheatAddition/14608
[15:21:45 INFO]: [AntiCheatAddition] ViaVersion hooked
[15:21:45 INFO]: [AntiCheatAddition] Floodgate hooked
[15:21:45 ERROR]: Error occurred while enabling AntiCheatAddition v8.0.0 (Is it up to date?)
java.lang.ExceptionInInitializerError: null
        at de.photon.anticheataddition.AntiCheatAddition.onEnable(AntiCheatAddition.java:128) ~[AntiCheatAddition-8.0.0.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:501) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugin(CraftServer.java:559) ~[paper-1.18.2.jar:git-Paper-247]
        at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugins(CraftServer.java:473) ~[paper-1.18.2.jar:git-Paper-247]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:664) ~[paper-1.18.2.jar:git-Paper-247]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:431) ~[paper-1.18.2.jar:git-Paper-247]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:316) ~[paper-1.18.2.jar:git-Paper-247]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1163) ~[paper-1.18.2.jar:git-Paper-247]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315) ~[paper-1.18.2.jar:git-Paper-247]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.NullPointerException: Tried to define region with unknown world
        at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:907) ~[guava-31.0.1-jre.jar:?]
        at de.photon.anticheataddition.util.minecraft.world.Region.<init>(Region.java:29) ~[AntiCheatAddition-8.0.0.jar:?]
        at de.photon.anticheataddition.util.minecraft.world.Region.parseRegion(Region.java:53) ~[AntiCheatAddition-8.0.0.jar:?]
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
        at java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
        at de.photon.anticheataddition.modules.checks.teaming.Teaming.<init>(Teaming.java:27) ~[AntiCheatAddition-8.0.0.jar:?]
        at de.photon.anticheataddition.modules.ModuleManager.<clinit>(ModuleManager.java:101) ~[AntiCheatAddition-8.0.0.jar:?]
        ... 12 more
[15:21:45 INFO]: [AntiCheatAddition] Disabling AntiCheatAddition v8.0.0
[15:21:45 INFO]: [AntiCheatAddition] AntiCheatAddition disabled.
[15:21:45 INFO]: [AntiCheatAddition]
> ver
[15:23:33 INFO]: Checking version, please wait...
[15:23:33 INFO]: This server is running Paper version git-Paper-247 (MC: 1.18.2) (Implementing API version 1.18.2-R0.1-SNAPSHOT) (Git: 1358d1e)
You are running the latest version
Previous version: git-Paper-246 (MC: 1.18.2)
> ver AntiCheatAddition
[15:23:36 INFO]: AntiCheatAddition version 8.0.0
[15:23:36 INFO]: This plugin provides niche checks for cheats which are not covered by most anticheats.
[15:23:36 INFO]: Website: https://www.spigotmc.org/resources/anticheataddition.33590/
[15:23:36 INFO]: Author: Photon
> ver ProtocolLib
[15:23:39 INFO]: ProtocolLib version 5.0.0-SNAPSHOT-b551
[15:23:39 INFO]: Provides read/write access to the Minecraft protocol.
[15:23:39 INFO]: Authors: dmulloy2 and comphenix
>

Additionally, a second issue, when I connect to the server the console gets spammed with zip file closed error, which repeats until the user disconnects. I am new to the plugin, I only have changed in the config file the staff command and changed the kick to send a mail to an admin. I haven't touched anything else.

[15:24:04 ERROR]: [AntiCheatAddition] Unhandled exception occured in onPacketReceiving(PacketEvent) for AntiCheatAddition
java.lang.IllegalStateException: zip file closed
        at java.util.zip.ZipFile.ensureOpen(ZipFile.java:831) ~[?:?]
        at java.util.zip.ZipFile.getEntry(ZipFile.java:330) ~[?:?]
        at java.util.jar.JarFile.getEntry(JarFile.java:518) ~[?:?]
        at java.util.jar.JarFile.getJarEntry(JarFile.java:473) ~[?:?]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:163) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:587) ~[?:?]
        at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:108) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:103) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
        at de.photon.anticheataddition.user.User.safeGetUserFromPacketEvent(User.java:105) ~[AntiCheatAddition-8.0.0.jar:?]
        at de.photon.anticheataddition.user.data.DataUpdaterEvents$VelocityChangeDataUpdater.onPacketReceiving(DataUpdaterEvents.java:281) ~[AntiCheatAddition-8.0.0.jar:?]
        at com.comphenix.protocol.injector.SortedPacketListenerList.invokeReceivingListener(SortedPacketListenerList.java:114) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.SortedPacketListenerList.invokePacketRecieving(SortedPacketListenerList.java:67) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.PacketFilterManager.postPacketToListeners(PacketFilterManager.java:560) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.PacketFilterManager.invokePacketReceiving(PacketFilterManager.java:525) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.netty.manager.NetworkManagerInjector.onPacketReceiving(NetworkManagerInjector.java:113) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.netty.channel.InboundPacketInterceptor.channelRead(InboundPacketInterceptor.java:31) ~[ProtocolLib.jar:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.handler.flush.FlushConsolidationHandler.channelRead(FlushConsolidationHandler.java:152) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
[15:24:04 ERROR]: Parameters:
  net.minecraft.network.protocol.game.PacketPlayInFlying$PacketPlayInPosition@5d1e29b1[
    a=931.9149762519633
    b=67.0
    c=-637.3598818715936
    d=0.0
    e=0.0
    f=true
    g=true
    h=false
  ]

At this point I cannot use this plugin, I have to uninstall it. Hopefully I learn through this ticket what to do to improve the setup or if this is a bug that i can try again when there's an update.

Thank you for reviewing this.

Photon-GitHub commented 2 years ago

The first error will be fixed in 8.0.1, the second should be fixed in 8.0.2.

Photon-GitHub commented 2 years ago

Turns out someone else had the same problem and ProtocolLib sometimes doesn't like getting the player before checking for a temporary player. In any case, the errors should be fixed in 8.0.2