[BUG] PacketEvents caught an unhandled exception while calling your listener.
cgw2023 opened this issue ยท 3 comments
Describe the bug
kick player out of server with error message
lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.io.IOException: Can't serialize unregistered packet
[11:19:52 WARN]: [com.github.kaspiandev.antipopup.libs.packetevents.PacketEventsAPI] PacketEvents caught an unhandled exception while calling your listener.
java.lang.ClassCastException: class com.github.kaspiandev.antipopup.libs.packetevents.protocol.packettype.PacketType$Login$Server cannot be cast to class com.github.kaspiandev.antipopup.libs.packetevents.protocol.packettype.PacketType$Configuration$Server (com.github.kaspiandev.antipopup.libs.packetevents.protocol.packettype.PacketType$Login$Server and com.github.kaspiandev.antipopup.libs.packetevents.protocol.packettype.PacketType$Configuration$Server are in unnamed module of loader 'AntiPopup-7.1.jar' @3b726444)
at com.github.kaspiandev.antipopup.libs.packetevents.event.simple.PacketConfigSendEvent.getPacketType(PacketConfigSendEvent.java:57) ~[AntiPopup-7.1.jar:?]
at com.github.kaspiandev.antipopup.libs.packetevents.event.simple.PacketConfigSendEvent.getPacketType(PacketConfigSendEvent.java:29) ~[AntiPopup-7.1.jar:?]
at com.github.kaspiandev.antipopup.listeners.PacketEventsListener.onPacketSend(PacketEventsListener.java:25) ~[AntiPopup-7.1.jar:?]
at com.github.kaspiandev.antipopup.libs.packetevents.event.PacketSendEvent.call(PacketSendEvent.java:51) ~[AntiPopup-7.1.jar:?]
at com.github.kaspiandev.antipopup.libs.packetevents.event.EventManager.callEvent(EventManager.java:52) ~[AntiPopup-7.1.jar:?]
at com.github.kaspiandev.antipopup.libs.packetevents.util.PacketEventsImplHelper.handleClientBoundPacket(PacketEventsImplHelper.java:44) ~[AntiPopup-7.1.jar:?]
at com.github.kaspiandev.antipopup.libs.packetevents.injector.handlers.PacketEventsEncoder.handleClientBoundPacket(PacketEventsEncoder.java:82) ~[AntiPopup-7.1.jar:?]
at com.github.kaspiandev.antipopup.libs.packetevents.injector.handlers.PacketEventsEncoder.encode(PacketEventsEncoder.java:67) ~[AntiPopup-7.1.jar:?]
at com.github.kaspiandev.antipopup.libs.packetevents.injector.handlers.PacketEventsEncoder.encode(PacketEventsEncoder.java:46) ~[AntiPopup-7.1.jar:?]
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:90) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
at com.github.kaspiandev.antipopup.libs.packetevents.injector.handlers.PacketEventsEncoder.write(PacketEventsEncoder.java:101) ~[AntiPopup-7.1.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:113) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:120) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:113) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:940) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:966) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:934) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1020) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:311) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.lambda$writeAndFlush$1(NettyChannelProxy.java:223) ~[ProtocolLib#673.jar:?]
at com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.lambda$processPacketOutbound$2(NettyChannelProxy.java:266) ~[ProtocolLib#673.jar:?]
at com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.processPacketOutbound(NettyChannelProxy.java:268) ~[ProtocolLib#673.jar:?]
at com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.writeAndFlush(NettyChannelProxy.java:223) ~[ProtocolLib#673.jar:?]
at com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.writeAndFlush(NettyChannelProxy.java:233) ~[ProtocolLib#673.jar:?]
at net.minecraft.network.Connection.doSendPacket(Connection.java:475) ~[?:?]
at net.minecraft.network.Connection.sendPacket(Connection.java:457) ~[?:?]
at net.minecraft.network.Connection$PacketSendAction.lambda$new$0(Connection.java:1038) ~[?:?]
at net.minecraft.network.Connection$WrappedConsumer.accept(Connection.java:1022) ~[?:?]
at net.minecraft.network.Connection.processQueue(Connection.java:590) ~[?:?]
at net.minecraft.network.Connection.flushQueue(Connection.java:547) ~[?:?]
at net.minecraft.network.Connection.send(Connection.java:438) ~[?:?]
at net.minecraft.network.Connection.send(Connection.java:404) ~[?:?]
at net.minecraft.network.Connection.exceptionCaught(Connection.java:243) ~[?:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:346) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:325) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireExceptionCaught(AbstractChannelHandlerContext.java:317) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.ChannelHandlerAdapter.exceptionCaught(ChannelHandlerAdapter.java:92) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at com.github.kaspiandev.antipopup.libs.packetevents.injector.handlers.PacketEventsEncoder.exceptionCaught(PacketEventsEncoder.java:124) ~[AntiPopup-7.1.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:346) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:325) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireExceptionCaught(AbstractChannelHandlerContext.java:317) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.ChannelHandlerAdapter.exceptionCaught(ChannelHandlerAdapter.java:92) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at com.viaversion.viaversion.bukkit.handlers.BukkitEncodeHandler.exceptionCaught(BukkitEncodeHandler.java:109) ~[ViaVersion-4.8.1.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:346) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:325) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireExceptionCaught(AbstractChannelHandlerContext.java:317) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.ChannelInboundHandlerAdapter.exceptionCaught(ChannelInboundHandlerAdapter.java:143) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at com.github.kaspiandev.antipopup.libs.packetevents.injector.handlers.PacketEventsDecoder.exceptionCaught(PacketEventsDecoder.java:64) ~[AntiPopup-7.1.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:346) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:325) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireExceptionCaught(AbstractChannelHandlerContext.java:317) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.ChannelInboundHandlerAdapter.exceptionCaught(ChannelInboundHandlerAdapter.java:143) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at com.viaversion.viaversion.bukkit.handlers.BukkitDecodeHandler.exceptionCaught(BukkitDecodeHandler.java:66) ~[ViaVersion-4.8.1.jar:?]
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:346) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:325) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireExceptionCaught(AbstractChannelHandlerContext.java:317) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.handler.flush.FlushConsolidationHandler.exceptionCaught(FlushConsolidationHandler.java:159) ~[netty-handler-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:346) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:325) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireExceptionCaught(AbstractChannelHandlerContext.java:317) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.exceptionCaught(DefaultChannelPipeline.java:1377) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:346) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:325) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.DefaultChannelPipeline.fireExceptionCaught(DefaultChannelPipeline.java:907) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.ChannelFutureListener$3.operationComplete(ChannelFutureListener.java:69) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.ChannelFutureListener$3.operationComplete(ChannelFutureListener.java:65) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:590) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:557) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:492) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
at io.netty.util.concurrent.DefaultPromise.addListener(DefaultPromise.java:185) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.DefaultChannelPromise.addListener(DefaultChannelPromise.java:95) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.DefaultChannelPromise.addListener(DefaultChannelPromise.java:30) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
at net.minecraft.network.Connection.doSendPacket(Connection.java:498) ~[?:?]
at net.minecraft.network.Connection.lambda$sendPacket$10(Connection.java:460) ~[?:?]
at com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.lambda$proxyRunnable$2(NettyEventLoopProxy.java:48) ~[ProtocolLib#673.jar:?]
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:413) ~[netty-transport-classes-epoll-4.1.97.Final.jar:4.1.97.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
[11:19:52 INFO]: UUID of player TarmacAsh608103 is 5f145b5f-2aad-4623-b9ff-e59c30cb4b81
[11:19:52 INFO]: ChosenNote70386 (/) lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.io.IOException: Can't serialize unregistered packet
To Reproduce
install plugin
Expected behavior
no errors
Operating System
Ubuntu 23.04
Server Software
folia-bundler-1.20.2-R0.1-SNAPSHOT-reobf
Server Version
Not Listed
Proxy Type
Waterfall
Plugin List
Server Plugins (39):
[11:24:52 INFO]: Bukkit Plugins:
[11:24:52 INFO]: - AnnouncerPlus, AntiPopup, Attollo, BetterRTP, BlockLocker, BlueMap, Chunky, ChunkyBorder, CMILib, CodFrame
[11:24:52 INFO]: CoreProtect, DeluxeMenus, DiscordSRV, DragonDropElytra, Essentials, EssentialsChat, EssentialsGeoIP, EssentialsProtect, EssentialsSpawn, FancyNpcs
[11:24:52 INFO]: floodgate, FoliaFlow, GreenChunk, GSit, HeadDrop, Kaiivoid, LuckPerms, Matrix, PlaceholderAPI, PlayerWarps
[11:24:52 INFO]: ProtocolLib, Residence, ShulkerRespawner, spark, TAB-Bridge, Vault, ViaBackwards, ViaVersion, zAuctionHouseV3
Server logs
will it be a problem of protocolib?i am using ProtocolLib#673 dev build, is it stable? or i should use another protocolib dev build for antipopup