ProtocolLib

3M Downloads

Error caused when player attempts to login in before server has completely started

bcxavier92 opened this issue ยท 1 comments

commented

When a player joins the server before it has completely started, they will be able to join with no errors, but if any player tries to join afterwards, their connection times out and the following error appears many times in console:

[20:56:26 INFO]: Error Unable to intercept a read client packet. (java.lang.IllegalArgumentException: java.lang.ClassCastException@56d08912) occured in com.comphenix.protocol.injector.netty.ChannelInjector@2655a7d8.
[20:56:26 ERROR]: [ProtocolLib] INTERNAL ERROR: Unable to intercept a read client packet.
If this problem hasn't already been reported, please open a ticket
at https://github.com/dmulloy2/ProtocolLib/issues with the following data:
Stack Trace:
java.lang.IllegalArgumentException: java.lang.ClassCastException@56d08912
at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.comphenix.protocol.injector.netty.ChannelInjector.decode(ChannelInjector.java:513)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
at io.netty.handler.codec.ByteToMessageDecoder.decodeLast(ByteToMessageDecoder.java:510)
at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:393)
at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:359)
at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:342)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:245)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:231)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:224)
at io.netty.channel.ChannelInboundHandlerAdapter.channelInactive(ChannelInboundHandlerAdapter.java:75)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:245)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:231)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:224)
at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:377)
at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:342)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:245)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:231)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:224)
at io.netty.channel.ChannelInboundHandlerAdapter.channelInactive(ChannelInboundHandlerAdapter.java:75)
at io.netty.handler.timeout.IdleStateHandler.channelInactive(IdleStateHandler.java:277)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:245)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:231)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:224)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1429)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:245)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:231)
at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:947)
at io.netty.channel.AbstractChannel$AbstractUnsafe$8.run(AbstractChannel.java:822)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:465)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
at java.lang.Thread.run(Unknown Source)
Dump:
Parameters:
io.netty.buffer.PooledUnsafeDirectByteBuf@5dbd1139[
memoryAddress=757223488
recyclerHandle=io.netty.util.Recycler$DefaultHandle@302cd4a6
chunk=Chunk(6ff241c5: 1%, 24576/16777216)
handle=4611686018427389954
memory=java.nio.DirectByteBuffer[pos=0 lim=16777216 cap=16777216]
offset=16384
length=64
maxLength=64
cache=io.netty.buffer.PoolThreadCache@13544852
tmpNioBuf=
allocator=PooledByteBufAllocator(directByDefault: true)
refCnt=1
readerIndex=0
writerIndex=32
markedReaderIndex=0
markedWriterIndex=0
maxCapacity=2147483647
]
manager:
com.comphenix.protocol.injector.PacketFilterManager@62deab17[
unhookTask=com.comphenix.protocol.injector.DelayedSingleTask@21818bb5
packetListeners=[]
packetInjector=com.comphenix.protocol.injector.netty.ProtocolInjector$5@3ab72983
playerInjection=com.comphenix.protocol.injector.netty.ProtocolInjector$4@6883ac6c
interceptWritePacket=com.comphenix.protocol.injector.packet.InterceptWritePacket@7f123478
inputBufferedPackets=[]
recievedListeners=com.comphenix.protocol.injector.SortedPacketListenerList@5263c40c
sendingListeners=com.comphenix.protocol.injector.SortedPacketListenerList@511b14f2
hasClosed=false
classLoader=org.bukkit.plugin.java.PluginClassLoader@7dc23c15
reporter=com.comphenix.protocol.ProtocolLib$1@248e3271
server=CraftServer{serverName=CraftBukkit,serverVersion=git-Spigot-1a3504a-84f3da3,minecraftVersion=1.13.2}
library=ProtocolLib v4.5.0
asyncFilterManager=com.comphenix.protocol.async.AsyncFilterManager@65e8d9e
knowsServerPackets=true
knowsClientPackets=true
phaseLoginCount=0
phasePlayingCount=0
packetCreation=false
spigotInjector=
nettyInjector=com.comphenix.protocol.injector.netty.ProtocolInjector@69e81db8
pluginVerifier=com.comphenix.protocol.injector.PluginVerifier@3bf87f0b
hasRecycleDistance=true
minecraftVersion=(MC: 1.13.2)
loginPackets=com.comphenix.protocol.injector.LoginPackets@7901785a
debug=false
]
Sender:
com.comphenix.protocol.injector.netty.ChannelInjector@2655a7d8[
factory=com.comphenix.protocol.injector.netty.InjectionFactory@9d52b8f
player=com.comphenix.protocol.injector.server.TemporaryPlayer$$EnhancerByCGLIB$$6df97b97@700ace50
updated=
playerName=
playerConnection=
networkManager=net.minecraft.server.v1_13_R2.NetworkManager@d8b45fd
originalChannel=[id: 0xc13621a7, L:/127.0.0.1:25565 ! R:/127.0.0.1:64302]
channelField=VolatileField [accessor=DefaultFieldAccessor [field=public io.netty.channel.Channel net.minecraft.server.v1_13_R2.NetworkManager.channel], container=net.minecraft.server.v1_13_R2.NetworkManager@d8b45fd, previous=[id: 0xc13621a7, L:/127.0.0.1:25565 ! R:/127.0.0.1:64302], current=com.comphenix.protocol.injector.netty.ChannelInjector$3@37cc91fc, previousLoaded=true, currentSet=true, forceAccess=true]
packetMarker={}
currentEvent=
finalEvent=
scheduleProcessPackets=java.lang.ThreadLocal$SuppliedThreadLocal@1112b11b
vanillaDecoder=us.myles.ViaVersion.bukkit.handlers.BukkitDecodeHandler@4661ba69
vanillaEncoder=us.myles.ViaVersion.bukkit.handlers.BukkitEncodeHandler@1ec3f2c9
finishQueue=[]
channelListener=com.comphenix.protocol.injector.netty.ProtocolInjector@69e81db8
processor=com.comphenix.protocol.injector.NetworkProcessor@494d2944
injected=true
closed=false
cumulation=PooledUnsafeDirectByteBuf(ridx: 0, widx: 32, cap: 64)
cumulator=io.netty.handler.codec.ByteToMessageDecoder$1@5f8bad7f
singleDecode=false
decodeWasNull=false
first=false
decodeState=1
discardAfterReads=16
numReads=0
added=true
]
Version:
ProtocolLib v4.5.0
Java Version:
1.8.0_211
Server:
git-Spigot-1a3504a-84f3da3 (MC: 1.13.2)

The error appears in both Spigot and Paper 1.13.2. Client version is 1.13.2. Java version is 1.8.0_211, and ViaVersion 2.2.3 is installed.

commented

This seems to be an interaction between ProtocolLib and ViaVersion, maybe try reporting this to them?