ProtocolLib

3M Downloads

Unable to intercept a read client packet,then the player can't join

EikoocS opened this issue ยท 1 comments

commented

Describe the bug
I don't know what happened, but when players join, the plug-in will report an error and prevent them from joining

To Reproduce
Steps to reproduce the behavior:

  1. Trigger when players join
  2. Supplement: after the follow-up test, players will report the same error when they get the server information, that is, click refresh in the multiplayer game interface

Expected behavior
I hope I can access the server normally

Screenshots

Version Info
dump-2021-06-12_19.58.16.txt

Additional context
`[19:54:09][ERROR/]: [ProtocolLib] INTERNAL ERROR: Unable to intercept a read c
lient 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.RuntimeException: Error occured while instancing generated class.
at com.comphenix.protocol.reflect.compiler.StructureCompiler.compile(Str
uctureCompiler.java:237)
at com.comphenix.protocol.reflect.compiler.CompiledStructureModifier.wit
hTarget(CompiledStructureModifier.java:132)
at com.comphenix.protocol.events.PacketContainer.(PacketContainer.
java:128)
at com.comphenix.protocol.injector.netty.ProtocolInjector.onPacketReceiv
ing(ProtocolInjector.java:312)
at com.comphenix.protocol.injector.netty.ChannelInjector.decode(ChannelI
njector.java:594)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProte
ction(ByteToMessageDecoder.java:489)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageD
ecoder.java:428)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessage
Decoder.java:265)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(Abstra
ctChannelHandlerContext.java:340)
at com.comphenix.protocol.injector.netty.ChannelInjector$2.channelRead(C
hannelInjector.java:290)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(Abstra
ctChannelHandlerContext.java:340)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMes
sageDecoder.java:310)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMes
sageDecoder.java:297)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageD
ecoder.java:413)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessage
Decoder.java:265)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(Abstra
ctChannelHandlerContext.java:340)
at net.minecraft.network.LegacyPingHandler.channelRead(LegacyPingHandler
.java:84)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(Abstra
ctChannelHandlerContext.java:340)
at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandle
r.java:286)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(Abstra
ctChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(Defau
ltChannelPipeline.java:1434)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChanne
lPipeline.java:965)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(Abstra
ctNioByteChannel.java:163)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.jav
a:647)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEve
ntLoop.java:582)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.ja
va:499)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:461)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThread
EventExecutor.java:884)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou

rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.comphenix.protocol.reflect.compiler.StructureCompiler.compile(Str
uctureCompiler.java:221)
... 40 more
Caused by: java.lang.NoClassDefFoundError: net/minecraft/server/v1_16_R3/Packe
tHandshakingInSetProtocol
at com.comphenix.protocol.reflect.compiler.CompiledStructure$net_minecra
ft_network_handshake_client_CHandshakePacket$java_lang_Object.(Unknown Sou
rce)
... 45 more
Dump:
Parameters:
io.netty.buffer.PooledUnsafeDirectByteBuf@4b67dbdd[
memoryAddress=1355882560
recyclerHandle=io.netty.util.Recycler$DefaultHandle@62da3d88
chunk=Chunk(61183923: 1%, 16384/16777216)
handle=4611686018427389953
memory=java.nio.DirectByteBuffer[pos=0 lim=16777216 cap=16777216]
offset=8192
length=22
maxLength=32
cache=io.netty.buffer.PoolThreadCache@7f9c04bc
tmpNioBuf=
allocator=PooledByteBufAllocator(directByDefault: true)
refCnt=1
readerIndex=22
writerIndex=22
markedReaderIndex=0
markedWriterIndex=0
maxCapacity=2147483647
]
manager:
com.comphenix.protocol.injector.PacketFilterManager@b9b0316[
unhookTask=com.comphenix.protocol.injector.DelayedSingleTask@41f3ea68
packetListeners=[PacketAdapter[plugin=AntiAttack, sending=EMPTY_WHITELIS
T, receiving=ListeningWhitelist[priority=HIGH, packets=[START[class=PacketStatus
InStart, id=0]], gamephase=PLAYING, options=[]]], PacketAdapter[plugin=AntiAttac
k, sending=EMPTY_WHITELIST, receiving=ListeningWhitelist[priority=HIGH, packets=
[PING[class=PacketStatusInPing, id=1]], gamephase=PLAYING, options=[]]], PacketA
dapter[plugin=OhTheWorld, sending=ListeningWhitelist[priority=NORMAL, packets=[R
ESPAWN[class=PacketPlayOutRespawn, id=57], LOGIN[class=PacketPlayOutLogin, id=36
]], gamephase=PLAYING, options=[]], receiving=EMPTY_WHITELIST], PacketAdapter[pl
ugin=AuthMe, sending=ListeningWhitelist[priority=NORMAL, packets=[WINDOW_ITEMS[c
lass=PacketPlayOutWindowItems, id=19], SET_SLOT[class=PacketPlayOutSetSlot, id=2
1]], gamephase=PLAYING, options=[]], receiving=EMPTY_WHITELIST], PacketAdapter[p
lugin=AntiAttack, sending=EMPTY_WHITELIST, receiving=ListeningWhitelist[priority
=HIGH, packets=[SET_CREATIVE_SLOT[class=PacketPlayInSetCreativeSlot, id=40]], ga
mephase=PLAYING, options=[]]], PacketAdapter[plugin=AntiAttack, sending=EMPTY_WH
ITELIST, receiving=ListeningWhitelist[priority=NORMAL, packets=[SET_PROTOCOL[cla
ss=PacketHandshakingInSetProtocol, id=0], TELEPORT_ACCEPT[class=PacketPlayInTele
portAccept, id=0], BLOCK_DIG[class=PacketPlayInBlockDig, id=27], ENTITY_ACTION[c
lass=PacketPlayInEntityAction, id=28], AUTO_RECIPE[class=PacketPlayInAutoRecipe,
id=25], START[class=PacketStatusInStart, id=0], ABILITIES[class=PacketPlayInAbi
lities, id=26], RECIPE_DISPLAYED[class=PacketPlayInRecipeDisplayed, id=31], ITEM
_NAME[class=PacketPlayInItemName, id=32], PING[class=PacketStatusInPing, id=1],
STEER_VEHICLE[class=PacketPlayInSteerVehicle, id=29], RECIPE_SETTINGS[class=Pack
etPlayInRecipeSettings, id=30], POSITION_LOOK[class=PacketPlayInPositionLook, id
=19], LOOK[class=PacketPlayInLook, id=20], DIFFICULTY_LOCK[class=PacketPlayInDif
ficultyLock, id=17], POSITION[class=PacketPlayInPosition, id=18], BOAT_MOVE[clas
s=PacketPlayInBoatMove, id=23], PICK_ITEM[class=PacketPlayInPickItem, id=24], FL
YING[class=PacketPlayInFlying, id=21], VEHICLE_MOVE[class=PacketPlayInVehicleMov
e, id=22], CUSTOM_PAYLOAD[class=PacketPlayInCustomPayload, id=11], B_EDIT[class=
PacketPlayInBEdit, id=12], WINDOW_CLICK[class=PacketPlayInWindowClick, id=9], CL
OSE_WINDOW[class=PacketPlayInCloseWindow, id=10], JIGSAW_GENERATE[class=PacketPl
ayInJigsawGenerate, id=15], KEEP_ALIVE[class=PacketPlayInKeepAlive, id=16], ENTI
TY_NBT_QUERY[class=PacketPlayInEntityNBTQuery, id=13], USE_ENTITY[class=PacketPl
ayInUseEntity, id=14], CHAT[class=PacketPlayInChat, id=3], CLIENT_COMMAND[class=
PacketPlayInClientCommand, id=4], TILE_NBT_QUERY[class=PacketPlayInTileNBTQuery,
id=1], DIFFICULTY_CHANGE[class=PacketPlayInDifficultyChange, id=2], TRANSACTION
[class=PacketPlayInTransaction, id=7], ENCHANT_ITEM[class=PacketPlayInEnchantIte
m, id=8], SETTINGS[class=PacketPlayInSettings, id=5], TAB_COMPLETE[class=PacketP
layInTabComplete, id=6], UPDATE_SIGN[class=PacketPlayInUpdateSign, id=43], ARM_A
NIMATION[class=PacketPlayInArmAnimation, id=44], SET_JIGSAW[class=PacketPlayInSe
tJigsaw, id=41], STRUCT[class=PacketPlayInStruct, id=42], BLOCK_PLACE[class=Pack
etPlayInBlockPlace, id=47], SPECTATE[class=PacketPlayInSpectate, id=45], USE_ITE
M[class=PacketPlayInUseItem, id=46], TR_SEL[class=PacketPlayInTrSel, id=35], BEA
CON[class=PacketPlayInBeacon, id=36], RESOURCE_PACK_STATUS[class=PacketPlayInRes
ourcePackStatus, id=33], ADVANCEMENTS[class=PacketPlayInAdvancements, id=34], SE
T_COMMAND_MINECART[class=PacketPlayInSetCommandMinecart, id=39], SET_CREATIVE_SL
OT[class=PacketPlayInSetCreativeSlot, id=40], HELD_ITEM_SLOT[class=PacketPlayInH
eldItemSlot, id=37], SET_COMMAND_BLOCK[class=PacketPlayInSetCommandBlock, id=38]
, ENCRYPTION_BEGIN[class=PacketLoginInEncryptionBegin, id=1], START[class=Packet
LoginInStart, id=0], CUSTOM_PAYLOAD[class=PacketLoginInCustomPayload, id=2]], ga
mephase=PLAYING, options=[]]], PacketAdapter[plugin=AntiAttack, sending=EMPTY_WH
ITELIST, receiving=ListeningWhitelist[priority=HIGH, packets=[TAB_COMPLETE[class
=PacketPlayInTabComplete, id=6]], gamephase=PLAYING, options=[]]], PacketAdapter
[plugin=AntiAttack, sending=EMPTY_WHITELIST, receiving=ListeningWhitelist[priori
ty=HIGH, packets=[SET_PROTOCOL[class=PacketHandshakingInSetProtocol, id=0]], gam
ephase=PLAYING, options=[]]]]
packetInjector=com.comphenix.protocol.injector.netty.ProtocolInjector$5@
43c436a0
playerInjection=com.comphenix.protocol.injector.netty.ProtocolInjector$4
@719ece87
inputBufferedPackets=[]
recievedListeners=com.comphenix.protocol.injector.SortedPacketListenerLi
st@22cef011
sendingListeners=com.comphenix.protocol.injector.SortedPacketListenerLis
t@7cb0ee8a
hasClosed=false
classLoader=org.bukkit.plugin.java.PluginClassLoader@311e6574
reporter=com.comphenix.protocol.ProtocolLib$1@1ea3a68a
server=CraftServer{serverName=LoliServer,serverVersion=1.16.5-c2ab253,mi
necraftVersion=1.16.5}
library=ProtocolLib v4.6.0
asyncFilterManager=com.comphenix.protocol.async.AsyncFilterManager@4c559
c7f
knowsServerPackets=true
knowsClientPackets=true
phaseLoginCount=3
phasePlayingCount=8
packetCreation=false
nettyInjector=com.comphenix.protocol.injector.netty.ProtocolInjector@384
39138
pluginVerifier=com.comphenix.protocol.injector.PluginVerifier@58b77516
hasRecycleDistance=true
minecraftVersion=(MC: 1.16.5)
debug=false
]
Sender:
com.comphenix.protocol.injector.netty.ChannelInjector@ad081a1[
decodeBuffer=protected void net.minecraft.network.NettyPacketDecoder.decod
e(io.netty.channel.ChannelHandlerContext,io.netty.buffer.ByteBuf,java.util.List)
throws java.lang.Exception
encodeBuffer=protected void net.minecraft.network.NettyPacketEncoder.encod
e(io.netty.channel.ChannelHandlerContext,java.lang.Object,io.netty.buffer.ByteBu
f) throws java.lang.Exception
factory=com.comphenix.protocol.injector.netty.InjectionFactory@6a6d4d30
player=com.comphenix.protocol.injector.server.TemporaryPlayerInvocationHan
dler@39d5db0e
updated=
playerName=
playerConnection=
networkManager=net.minecraft.network.NetworkManager@19a43c36
originalChannel=[id: 0x5fd84ad0, L:/127.0.0.1:25565 - R:/127.0.0.1:55968]
channelField=VolatileField [accessor=DefaultFieldAccessor [field=public io
.netty.channel.Channel net.minecraft.network.NetworkManager.field_150746_k], con
tainer=net.minecraft.network.NetworkManager@19a43c36, previous=[id: 0x5fd84ad0,
L:/127.0.0.1:25565 - R:/127.0.0.1:55968], current=com.comphenix.protocol.injecto
r.netty.ChannelInjector$3@85126a2, previousLoaded=true, currentSet=true, forceAc
cess=true]
packetMarker={}
currentEvent=
finalEvent=
unfilteredProcessedPackets=com.comphenix.protocol.injector.netty.PacketFil
terQueue@1f4b910d
vanillaDecoder=net.minecraft.network.NettyPacketDecoder@27364b5e
vanillaEncoder=net.minecraft.network.NettyPacketEncoder@32337d50
finishQueue=[]
channelListener=com.comphenix.protocol.injector.netty.ProtocolInjector@384
39138
processor=com.comphenix.protocol.injector.NetworkProcessor@7056151c
injected=true
closed=false
cumulation=PooledUnsafeDirectByteBuf(ridx: 22, widx: 22, cap: 22)
cumulator=io.netty.handler.codec.ByteToMessageDecoder$1@51601c2e
singleDecode=false
decodeWasNull=false
first=true
decodeState=1
discardAfterReads=16
numReads=0
added=true
]
Version:
ProtocolLib v4.6.0
Java Version:
1.8.0_291
Server:
1.16.5-c2ab253 (MC: 1.16.5)`

*The expression may be very bad, because the text is from the network translation
*The server is ues Loliserver https://github.com/Loli-Server/LoliServer1.16
*This problem also appears in Mohist

commented

I don't think we support mohist