LuckPerms

LuckPerms

41.4k Downloads

net.milkbowl.vault.chat.Chat#getPlayerSuffix(Player) tried to load offline player and threw an exception

NEZNAMY opened this issue ยท 5 comments

commented

Before starting, I want to say that I am reporting this for someone else who had this issue and doesn't know how to make a bug report. If the info provided is not sufficient or anything else is wrong, feel free to close. Just wanted to forward this.

Description

Running a command that called Chat#getPlayerSuffix threw an exception (https://paste.gg/p/anonymous/17155bf2a1b644339def4661edff27f2).

Reproduction steps

No idea. I guess run a command that iterates through online players and calls the vault method.

Expected behaviour

Not try to load offline player when the player is in fact online. The command iterated through all online players using Bukkit.getOnlinePlayers, therefore, the player could not be offline. The player could not disconnect while the code was being processed since it was called synchronously using a command, which is what this issue is about.

Environment details

  • Server type/version: 1.16.5, "im using Purplane, fork of airplane+purpur"
  • LuckPerms version: "LuckPerms-Bukkit-5.2.104.jar"

Any other relevant details

The error https://paste.gg/p/anonymous/17155bf2a1b644339def4661edff27f2

commented

If the player is definitely online, then LP should have some data loaded for them - the full log may give some more insight into this.

Without it though, not much I can do to debug the problem further.

commented

The UUIDs are the same

commented

Yeah, so, logs are pretty clear - they weren't connected to the server when the LP warning message was printed. ๐Ÿ˜‰

[11:37:15] [User Authenticator #4/INFO]: UUID of player AleafL is 9a7b2995-03dd-38c2-b715-69673f57e3e5
[11:37:15] [Server thread/INFO]: AleafL[/xxxx] logged in with entity id 18188 at ([world]4019.815052779904, 69.0, -2911.5489495565566)

...

[11:46:52] [Server thread/INFO]: AleafL lost connection: Disconnected

...

[11:50:53] [Server thread/INFO]: [TAB v2.8.10] Failed to enable. Did you just invent a new way to break the plugin by misconfiguring it?
[11:50:53] [Server thread/INFO]: java.lang.RuntimeException: The operation to load user data for '9a7b2995-03dd-38c2-b715-69673f57e3e5' was cancelled by LuckPerms. This is NOT a bug.
The lookup request was made on the main server thread. It is not safe to execute a request to
load data for offline players from the database in this context.
If you are a plugin author, please consider making your request asynchronously.
Alternatively, server admins can disable this catch by setting 'vault-unsafe-lookups' to true
in the LP config, but should consider the consequences (lag) before doing so.
commented

May have been a different player?