OldCombatMechanics

OldCombatMechanics

46.1k Downloads

My players are getting kicked when I'm using ProtocolSupport

x9nico opened this issue ยท 47 comments

commented

Info

Problem Description

Hi, when I'm using the plugin with ProtocolSupport on a 1.14.4 server, my players are getting kicked when they're doing a right click: didifaure lost connection: Internal Exception: java.lang.IllegalArgumentException: You must pass a 'Packet' object!

The developers of ProtocolSupport has told me of it wasn't an error from them.

commented

The players are getting that when they are < to 1.9

commented

Do you mean players running a 1.8 client?

commented

Yes.

commented

I think it can affect the most olders versions for 1.7, etc. I tested only for 1.8.x.

commented

I thinked by doing the test it was due to the usage of the shield ? It does only with the plugin.
With ProtocolSupport without OldCombatMechanics, I don't have this error.

commented

Any solutions for this ?

commented

The latest

commented

What version of OldCombatMechanics are you running?

commented

That is completely meaningless. I would need the version printed when you run /ocm and, if it was downloaded from the Jenkins server, the build number. Otherwise, I will not know what to be testing for.

commented

It's the version 1.7.4. I downloaded it on Spigot.

commented

image

commented

We believe this is a bug in ProtocolSupport. Where did you get the information that it is an OldCombatMechanics bug?

commented

I can not reproduce it with:
1.14.4 server, latest OCM, latest ProtocolSupport
one 1.14.4 client and one 1.8.8.

Can you post the exact reproduction steps?

grafik

commented

The 1.8 player have done a right click @I-Al-Istannen and the 1.8 player has been kicked. (sorry for my bad English)

commented

I have done the same and nothing happened. The shield state was (nearly) properly synced.

What items did you hold in your hand?
What did you right click with?
What was your version?
What was the exact 1.8 version? 1.8.8?
What is your 1.14.4 server version (/version)?
What your ProtocolSupport version?

commented

PaperSpigot 1.14.4
Latest protocolSupport dev build
1.8.9
I given in my plugins a shield into PlayerInventory (for all player versions), and when he's doing a right click, he's kicked with the Packet's object message (I have ProtocolSupportStuff to)
A sword, with a shield into the off hand.

commented

I don't tested Players < to 1.8.9, but in 1.8.9, it affect.

commented

I am on [11:01:33 INFO]: This server is running Paper version git-Paper-194 (MC: 1.14.4) Implementing API version 1.14.4-R0.1-SNAPSHOT).

I am on release 1.8.9.

I used replaceitem entity @p weapon.offhand minecraft:shield to get a shield in my offhand.
I have a diamond sword in my hand.
I right click the air, blocks, whatever.

I am using your OCM config file.

I am not being kicked and do not experience any issues.

Do you do anything differently?

commented

No, Maybe with the plugin ProtocolSupportStuff ?

commented

I am using this plugin:
grafik

Plugins (2): OldCombatMechanics, ProtocolSupport

commented

I have the version 4.29-dev of ProtocolSupport.

commented

What is the build number?

commented
commented

Nope, no changes. Looks like a weird issue on your side.

Can you try this build:
OCM.zip

It will output a few @NICO lines. Those are the ones that I am interested in. They should be printed when a player joins and right before the player disconnects due to the crash.

commented

[11:19:09 INFO]: @nico Got packet class: class com.comphenix.protocol.events.PacketContainer PacketContainer[type=BLOCK_PLACE[class=PacketPlayInBlockPlace, id=45], structureModifier=StructureModifier[fieldType=class java.lang.Object, data=[private net.minecraft.server.v1_14_R1.EnumHand net.minecraft.server.v1_14_R1.PacketPlayInBlockPlace.a, public long net.minecraft.server.v1_14_R1.PacketPlayInBlockPlace.timestamp]]] [11:19:09 INFO]: x9nico lost connection: Internal Exception: java.lang.IllegalArgumentException: You must pass a 'Packet' object! [11:19:10 INFO]: x9nico has left the server!

commented

Can you also post the ones when a player connects:

Channel handlers:
timeout
decrypt
splitter
decompress
ps_raw_capture_receive
ps_decoder_transformer
decoder
encrypt
prepender
compress
ps_raw_capture_send
ps_encoder_transformer
encoder
ps_logic
ocm_handler
packet_handler

commented

[11:22:02 INFO]: Channel handlers:
[11:22:02 INFO]: timeout
[11:22:02 INFO]: decrypt
[11:22:02 INFO]: splitter
[11:22:02 INFO]: decompress
[11:22:02 INFO]: ps_raw_capture_receive
[11:22:02 INFO]: protocol_lib_finish
[11:22:02 INFO]: protocol_lib_decoder
[11:22:02 INFO]: decoder
[11:22:02 INFO]: encrypt
[11:22:02 INFO]: prepender
[11:22:02 INFO]: compress
[11:22:02 INFO]: ps_raw_capture_send
[11:22:02 INFO]: encoder
[11:22:02 INFO]: protocol_lib_encoder
[11:22:02 INFO]: ps_logic
[11:22:02 INFO]: ocm_handler
[11:22:02 INFO]: packet_handler
[11:22:02 INFO]: viaversion_packet_handler
[11:22:02 INFO]: x9nico[/127.0.0.1:52482] logged in with entity id 12 at ([world]-296.0, 52.0, -140.0)

commented

But I think the error comes from Protocollib. PacketContainer are in Protocollib !

commented

Yea, it sees a ProtocolLib structure instead of an NMS packet. That's a new one... Might be due to the position of the listener in the chain it printed.

What plugins you use require/use protocol lib?

commented

For AuthMe Reloaded.

commented

And the remove of ProtocolLib does error with ProtocolSupport.

commented

Not sure what you mean with that. The only difference in the handler chain seems to be that I have a ps_decoder_transformer and a ps_encoder_transformer.

Your error sounds a bit weird. I will later try AuthMe Reloaded and see if I can reproduce the error. If not, you'd probably need to remove auth me, protocollib, via version and ProtocolSupport in that order and see when it starts working...

I will be away for a few hours, a christmas market is calling :) Enjoy your day and I will talk to you later :)

commented

I have a lots of error with ProtocolSupport when I don't have ProtocolLib.

commented

I can not reproduce it. I also do not get any errors from ProtocolSupport without ProtcolLib.

Sounds like there is something else amiss in your configuration?

Can you try ProtocolSupport, ProtocolLib, ViaVersion and OCM on an otherwise fresh "install" of Paper 1.14.4 and see if the problem persists?

I am bit out of things I could do on my end, it looks like a configuration or other issue on your end at the moment.

commented

Hi, the problem persist.

commented

Can you do what I suggested in the previous post?

Can you try ProtocolSupport, ProtocolLib, ViaVersion and OCM on an otherwise fresh "install" of Paper 1.14.4 and see if the problem persists?

There isn't much I can do at the moment, as I am unable to reproduce the problem.

commented

(I have still the problem on my 1.14.4 Paper Server)

commented

I tried, and the problem is solved.
But I don't know where the bug come from.
On another 1.14.4 Paper server, I don't have the problem.

commented

I am sorry, but I can not debug what I can not reproduce at all. Based on your descriptions it sounds like an issue with the configuration / plugin selection on that specific 1.14.4 server.

Can you see whether you can reproduce it on the fresh server by copying over your plugins one by one (or copy half of them, see if the error occurs, copy the other half if not and so on)

If that does not work, you could zip/tar/whatever your server up (except for the world folders) and send it to us. Either by posting it here if it is not remotely sensitive or via a DM on Discord / per E-Mail. If I can reproduce the error with that zipped server, I might be able to effectively debug it.

commented

Hello,
It's a Setup, I'm selling it on Mc-Market.
If you have a Mc-Market account, I can give you a license for download it.
Can I have your Mc-Market username please ?

commented

Thanks you :)
Please send me a message when you have any news about this.

commented

With a heavy heart I created yet another account at some random website, I pray to god that the website isn't as trustworthy as it looks.

IAlIstannen

commented

I added you as Buyer.
You can now download it => https://www.mc-market.org/resources/9784/
PS: I don't have added OCM into the Setup. You have to add it.

commented

Thanks for that.

I found the error, but sadly it is in ProtocolSupportStuff. I will add a not ideal mitigation for the OCM crash, but ProtcolSupportStuff should fix the error on their side as well.

The commit will probably land in my fork this hour, then I will make a PR which will need to be reviewed and merged by Rayzr or kernitus and then a dev build will be available from the CI.
So no ETA, but it shouldn't take too long.

commented

@x9nico I have merged the Pull Request, but it is currently untested. If you wish to test on your configuration you can find the test build here. Do make sure you have a backup just in case.

commented

Thanks you, the problem has been resolved.