Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Player lost their item #2855

Open
SimPham02 opened this issue Jul 26, 2024 · 22 comments
Open

Player lost their item #2855

SimPham02 opened this issue Jul 26, 2024 · 22 comments

Comments

@SimPham02
Copy link

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
Copy link
Member

sgdc3 commented Jul 26, 2024

@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
Copy link
Member

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

@SimPham02
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Member

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
Copy link
Author

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
Copy link

t4ba commented Jul 27, 2024

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
Copy link

JericNisperos commented Jul 27, 2024

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
Copy link
Member

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

@Kadeluxe
Copy link

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:

player.saveData(); // #1238: Speed is sometimes not restored properly

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
Copy link

Lolip-p commented Jul 31, 2024

Yes. I also ran into this problem!

@Krissoofer
Copy link

@Kadeluxe Have you fixed it already?

@sgdc3 sgdc3 closed this as completed in c962471 Aug 7, 2024
@sgdc3 sgdc3 reopened this Aug 7, 2024
@sgdc3
Copy link
Member

sgdc3 commented Aug 7, 2024

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

@sgdc3 sgdc3 added the Status: awaiting answer Marks issues blocked by an open question to the reporter. label Aug 7, 2024
@unnamed199cz
Copy link

unnamed199cz commented Aug 8, 2024

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

@unnamed199cz
Copy link

edited ^^ due to mistake on our server

@sgdc3 sgdc3 added Status: please verify and removed Status: awaiting answer Marks issues blocked by an open question to the reporter. labels Aug 13, 2024
@ghost
Copy link

ghost commented Aug 19, 2024

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
Copy link
Member

sgdc3 commented Aug 19, 2024

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

@ghost
Copy link

ghost commented Aug 19, 2024

@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
Copy link
Member

sgdc3 commented Aug 28, 2024

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

@ghost
Copy link

ghost commented Aug 28, 2024

@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
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

10 participants