Simple Discord Link Bot

Simple Discord Link Bot

1M Downloads

Error after the player's death - (LuckPerms Forge Related Bug with Curios)

K0rS1z opened this issue ยท 18 comments

commented

The latest versions of the SimpleDiscordLink and CraterLib mods are used. After death, this is written in the console - https://pastebin.com/4wsRNRYF (If necessary, I can throw off the full log, but there is nothing interesting there)

If you rejoice, ALL entities will disappear (and the players too), you will not receive damage, you will not be able to enter commands, etc. It's like you're between the living and the not-alive ._.
Restarting the server does not help.

Forge 1.20.1 47.3.12
There are other mods

commented

It's happening with the Curios compat for Accessories too. :/

commented

Odd. Was working fine when I tested it

commented

That is a command execution error. What the hell is executing commands when the player dies?

This has to be a mod conflict, because during testing this did not occur. The error seems to be coming from luckperms itself, so that is extremely weird. If you are playing a modpack, please send a link to the pack so I can do some tests on it

Edit: Now that I look at it, the error is from CraterLib's command system, which is used for mod commands (in this case sdlink), so this whole thing makes no sense

commented

Tested with LuckPerms 5.4.102, CraterLib 2.1.2+hotfix.1 and Simple Discord Link 3.2.1. Cannot replicate the error.

However, I found a couple of similar reports on the LuckPerms GitHub (it seems the issue was fixed), but it's almost identical to what you are describing

LuckPerms/LuckPerms#3584
LuckPerms/LuckPerms#3471
LuckPerms/LuckPerms#3830 (I tested this one too, but could not replicate it)

commented

To save time, I've almost figured out exactly what's going on. A couple of minutes.

commented

And so, I'm a little shocked myself, but it's because of the Curios mod... Perhaps it conflicts with LuckPerms, and LuckPerms is already with CraterLib. There are no such issues at all on GitHub Curios. I don't understand exactly why this is happening.
Mods:
CraterLib-Forge-1.20-2.1.2+hotfix.1.jar
SimpleDiscordLink-Universal-3.2.1.jar
LuckPerms-Forge-5.4.102.jar
curios-forge-5.11.0+1.20.1.jar (also the latest version)
Forge 1.20.1 47.3.12

Everything works fine without Curios.

commented

Thanks for narrowing it down. Let me run some tests and see what I can figure out

commented

Okay, I can replicate the issue when curios is installed.

It does seem to be a luckperms bug in their API on forge. The bad news is, luckperms drops support for older versions once they move on to a new MC version, meaning that even if it is their bug, it won't get fixed.

We can add a work around to craterlib to prevent the main issue, but in doing so, will break our luckperms compat when ever a player dies, which is also bad.

Regarding the issue of players not being able to get back into the server after they die, the "temp" fix would be to delete sdlink, let them all respawn, then add it back.

So I'll need to figure out some "hackaround" to both fix this issue, without breaking our own features as well. Not really sure what causes the issue in the first place, but it seems to be related to the issues I linked above, where luckperms itself encounters an error, and doesn't handle it, breaking the game.

commented

Just want to say thank you. Just came across this exact issue myself.

commented

CraterLib-Forge-1.20-2.1.2+release.1.jar.zip

Here is a temp fix for the issue. As I suspected, it does completely break any of our commands which uses luckperms permissions. (Meaning if you gave someone access to a command from one of our mods through luckperms, they won't be able to use the commands when they die. Relogging will allow them to use the command again. I will report the core issue to both LuckPerms and Curios. Hopefully one of them has a solution)

Also sorry for the zip, GitHub doesn't allow me to upload the jar file as is....

commented

Has anyone tested if Accessories mod with Curios compat works in place of Curios (for this issue)?

commented

Has anyone tested if Accessories mod with Curios compat works in place of Curios (for this issue)?

It seems to work just fine

commented

Just adding to this, we have confirmed that the same issue occurs with Styled Chat as well, without craterlib or sdlink installed.

Same core issue of luckperms failing to load player data after death, and then just desyncing the player

commented

Now I'm having this issue again, for non-overworld deaths.

commented

Thank you for all your hard work in researching this. Much appreciated.

commented

So.... Looking through issue reports, I found this.... LuckPerms/LuckPerms#3747

Been reported Sept 2023.... Exactly the same bug

So, given all this, it looks like I have no choice but to disable luckperms integration in 1.20/1.20.1

commented

I made the workaround a permanent fix now in 3.2.2 (and version 2.1.3) of craterlib. If this is still an issue after this, I am just going to ditch luckperms compat completely