AuthMe / AuthMeReloaded

The best authentication plugin for the Bukkit/Spigot API!
https://www.spigotmc.org/resources/authmereloaded.6269/
GNU General Public License v3.0
637 stars 512 forks source link

Player lost their item #2855

Open SimPham02 opened 4 months ago

SimPham02 commented 4 months ago

What behaviour is observed?

Sometimes players exit the server with all their items, but when they rejoin, all their items are gone. The server is running Purpur 1.21.

Expected behaviour

Fix the issue so players no longer lose their items.

To Reproduce

1.Exit the server 2.Log back in

Plugin list

image

Server Implementation

Standalone server (no proxy)

Database Implementation

SQLite

AuthMe Version

2.6.0

Error log (if applicable)

No response

Configuration

https://paste.gg/p/anonymous/5b9aecd47db0424dbd80a13c6ee0370b

sgdc3 commented 3 months ago

@games647 correct me if I'm wrong but we never change the inventory content of the player, we only hide it using fake packets.

games647 commented 3 months ago

Yes that's correct. However, somehow this is version 2.6. @SimPham02 can you check if this really the correct version.

SimPham02 commented 3 months ago

Yes that's correct. However, somehow this is version 2.6. @SimPham02 can you check if this really the correct version.

AuthMe-5.6.0-legacy and authme-5.7.0-SNAPSHOT

SimPham02 commented 3 months ago

When I use version 5.6.0, it only happens occasionally, but when I use version 5.7.0, it happens more frequently @games647

SimPham02 commented 3 months ago

At first, I didn't know what caused it; I thought it was due to version 1.21. However, a few other servers also experienced the issue and said it was caused by AuthMe

games647 commented 3 months ago

We only hide the inventory from the user. So all items are still there. A relogin should also show this. Another issue could be if the user profile switches the UUID, then it's a new user. However, AuthMe doesn't change anything about this. You could also disable ProtectInventoryBeforeLogIn, that will disable our hide feature.

SimPham02 commented 3 months ago

We only hide the inventory from the user. So all items are still there. A relogin should also show this. Another issue could be if the user profile switches the UUID, then it's a new user. However, AuthMe doesn't change anything about this. You could also disable ProtectInventoryBeforeLogIn, that will disable our hide feature.

It wasn't hidden; I've been using AuthMe for almost a year, and when I updated to version 1.21 and used the latest version of AuthMe, this issue started occurring. In some cases, items in the ender chest also disappeared. My server is cracked, and the in-game behavior remained unchanged. Even I lost items, despite being the server admin. I just logged out and back in immediately, and the items were gone. I noticed this issue often occurs when logging out and back in quickly. My friend, who runs a server on version 1.20, is also experiencing similar issues.

t4ba commented 3 months ago

i had this issue when im running 1.20.4 now running 1.20.6 some players lost their inv and endchest and spawn on world spawn point

authme version 5.7.0

JericNisperos commented 3 months ago

Same goes with me. We started experiencing this since the first day of our server last June 1st. We're on 1.20.6 before. We are now on 1.21 and still happens occasionally.

We've reached out to other plugin devs and even stripped down our plugin list to check what's causing it. There's a high chance that this is coming from AuthMe, CMI, Worldedit,Worldguard,Multiverse. But since some of the server owners I talked to don't use CMI,Multiverse, and even Worldedit, the only plugins left are AuthMe and Worldguard.

The reset inventory includes wiped Enderchest, reset Crafting Recipes and being teleported to the world spawn.

krusic22 commented 3 months ago

WorldGuard hard depends on WorldEdit.... We need an actual plugin list.

Kadeluxe commented 3 months ago

I've figured this out. In 1.21 server loads the player's profile after ServerboundFinishConfigurationPacket is received. If connection is unstable, this packet may not land on the server and PlayerList.placeNewPlayer will never be called image

However later when connection is timed out, quit events are still fired and AuthMe will save an empty player data here: https://github.com/AuthMe/AuthMeReloaded/blob/536af46b2b971355c9bdb90eccf357e697fed5cf/src/main/java/fr/xephi/authme/process/quit/ProcessSyncPlayerQuit.java#L30

I don't know what the "proper" fix would be here because I'm not familiar with AuthMe internals. It can be fixed by doing a if (player.getLastLogin() != 0) check but AFAIK this API is only exposed on Paper. So if you can rebuild from source, build AuthMe against Paper API and insert this check: if (player.getLastLogin() != 0) player.saveData();

Lolip-p commented 3 months ago

Yes. I also ran into this problem!

Krissoofer commented 3 months ago

@Kadeluxe Have you fixed it already?

sgdc3 commented 3 months ago

Please try with build 2632 from out jenkins (https://ci.codemc.io/job/AuthMe/job/AuthMeReloaded/)

unnamed199cz commented 3 months ago

EDIT: WRONG call, Newest build may not have the issue

unnamed199cz commented 3 months ago

edited ^^ due to mistake on our server

ghost commented 3 months ago

Hello, we run a minecraft server that's also been dealing with the exact same issue. Seems to be AuthME as well, since our other server which runs on the same config (but isn't in offline mode) hasnt ever encountered this bug.

sgdc3 commented 3 months ago

@CyberHydra have you tried the latest dev build from https://ci.codemc.io/job/AuthMe/job/AuthMeReloaded/ ?

ghost commented 3 months ago

@CyberHydra have you tried the latest dev build from https://ci.codemc.io/job/AuthMe/job/AuthMeReloaded/ ?

We've installed it right now. Hopefully it will fix the issue. I'll keep you informed.

sgdc3 commented 2 months ago

@SimPham02 @t4ba @JericNisperos @Kadeluxe @Lolip-p @Krissoofer @unnamed199cz @CyberHydra is the issue fixed in dev builds?

ghost commented 2 months ago

@SimPham02 @t4ba @JericNisperos @Kadeluxe @Lolip-p @Krissoofer @unnamed199cz @CyberHydra is the issue fixed in dev builds?

This seems to be the case for our server. I've not heard of this bug happening anymore.

Kadeluxe commented 2 months ago

@SimPham02 @t4ba @JericNisperos @Kadeluxe @Lolip-p @Krissoofer @unnamed199cz @CyberHydra is the issue fixed in dev builds?

Yes, it was the only cause of that issue

ConsoleGods commented 1 month ago

I'm having this issue now and I have the latest version

t4ba commented 1 month ago

I'm having this issue now and I have the latest version

install the latest version from here https://ci.codemc.io/job/AuthMe/job/AuthMeReloaded/

ConsoleGods commented 1 month ago

I'm having this issue now and I have the latest version

install the latest version from here https://ci.codemc.io/job/AuthMe/job/AuthMeReloaded/

I do have the latest version image

Kadeluxe commented 1 month ago

AuthMe no longer calls Player.saveData when player quits, most likely it comes from another plugin then or you have a whole different issue (in your case the cause of the inventory loss is different)

ConsoleGods commented 1 month ago

AuthMe no longer calls Player.saveData when player quits, most likely it comes from another plugin then or you have a whole different issue (in your case the cause of the inventory loss is different)

image Do you know if any of these plugins would be causing this issue? I installed InventoryRollback for a fall back just in case

t4ba commented 1 month ago

AuthMe no longer calls Player.saveData when player quits, most likely it comes from another plugin then or you have a whole different issue (in your case the cause of the inventory loss is different)

image Do you know if any of these plugins would be causing this issue? I installed InventoryRollback for a fall back just in case

better test plugin one by one and try installing the authme 2636 and fastlogin new version https://ci.codemc.io/job/Games647/job/FastLogin/1326/

foxya27 commented 1 month ago

AuthMe no longer calls Player.saveData when player quits, most likely it comes from another plugin then or you have a whole different issue (in your case the cause of the inventory loss is different)

image Do you know if any of these plugins would be causing this issue? I installed InventoryRollback for a fall back just in case

better test plugin one by one and try installing the authme 2636 and fastlogin new version https://ci.codemc.io/job/Games647/job/FastLogin/1326/

It's normal that the plugin weighs so little, on spigot it weighs about 16mb???????????

krusic22 commented 1 month ago

Yes. The required libraries are now fetched at runtime.

Rhull18 commented 2 weeks ago

The bug is still up we host our servers using Aternos(Cracked/Offline) Paper 1.21.1 AuthMe 5.6.0 DiscordSRV 1.28.0 image_2024-11-06_001145142

We only have 11 players playing in our server and it happened twice with different player and same event where:

  1. a player disconnected(Both having Internet issues)
  2. Reconnected(Right after)
  3. Enderchest/Inventory/Crafting Recipe reset(However his statistics still remain)

Here's a what happened: -player named 284Hi359 disconnect and reconnects disconnect log

-His player statistics from Aternos(after the Inventory/Enderchest/CraftingRecipes) image

I will try to disable AuthMeReloaded and I'll be back if the problem reoccurs. Ask me questions if needed.

t4ba commented 2 weeks ago

The bug is still up we host our servers using Aternos(Cracked/Offline) Paper 1.21.1 AuthMe 5.6.0 DiscordSRV 1.28.0 image_2024-11-06_001145142

We only have 11 players playing in our server and it happened twice with different player and same event where:

  1. a player disconnected(Both having Internet issues)
  2. Reconnected(Right after)
  3. Enderchest/Inventory/Crafting Recipe reset(However his statistics still remain)

Here's a what happened: -player named 284Hi359 disconnect and reconnects disconnect log

-His player statistics from Aternos(after the Inventory/Enderchest/CraftingRecipes) image

I will try to disable AuthMeReloaded and I'll be back if the problem reoccurs. Ask me questions if needed.

i think Aternos not allow you to upload jar so you must contact they support to install the new version from here https://ci.codemc.io/job/AuthMe/job/AuthMeReloaded/ and not 5.6.0