NikitaCartes / EasyAuth

Easy authentication mod for Fabric servers
MIT License
121 stars 23 forks source link

[BUG] Sometimes online player treated as offline player #51

Closed EnderGirl1500 closed 1 year ago

EnderGirl1500 commented 2 years ago

Versions

Describe the bug After creating this "mixed" offline-online mode, the inventory of my players disappeared. I'll do more research to see if it happened on everyone or just premium accounts. Also, other data like location and homes will be lost.

To Reproduce Steps to reproduce the behavior:

  1. Set the EasyAuth config to default, and the server to offline mode.
  2. Enter the server and put something in your inventory.
  3. Stop the server, then create the mixed mode.
  4. Start the server and enter. You'll be in the spawn with no items at all.

Expected behavior I guess everybody should have their inventories after making this changes.

TechPro424 commented 2 years ago

This is a known issue. Check https://github.com/NikitaCartes/EasyAuth/wiki/AutoLogin-Mojang-accounts

NikitaCartes commented 2 years ago

As I understand you moved from fully offline mode to mixed mode? In that case all advancements, playerdata should be migrated automatical for all players, both offline and online.

If you move back to offline from online mode items (and other things) will be lost. (You can rename files that contain that information by hands)

EnderGirl1500 commented 2 years ago

Well is there any solution after all items being lost?

EnderGirl1500 commented 2 years ago

I entered the playerdata folder but everything is encrypted

NikitaCartes commented 2 years ago

You can rename files in world/playerdata, world/stats and world/advancement. They use uuid of player as their name, so you need to change that. You can use https://minecraft-serverlist.com/tools/offline-uuid for offline uuid and https://namemc.com/ for online uuid.

EnderGirl1500 commented 2 years ago

Some of my players cant join the server, how can I fix that aswell?

NikitaCartes commented 2 years ago

What type of error they get?

EnderGirl1500 commented 2 years ago

Before forcing their offline-uuid they got something like invalid player data, and after doing so they just get disconnected

NikitaCartes commented 2 years ago

Something useful in logs?

EnderGirl1500 commented 2 years ago

I don't think so, but here's the lastest log latest.log

NikitaCartes commented 2 years ago

Check your config.worldSpawn.dimension setting or set spawn via command

EnderGirl1500 commented 2 years ago

Did it

NikitaCartes commented 2 years ago

Does it help after restart?

EnderGirl1500 commented 2 years ago

A different person tried to join and he couldn't aswell latest.log

NikitaCartes commented 2 years ago

Can you send server.properties and mod's config?

EnderGirl1500 commented 2 years ago

config.zip

NikitaCartes commented 2 years ago

It's seems like that player tries to connect with offline account but this name is used in someone's else online account. You can add it in forcedOfflinePlayers with auth addToForcedOffline <player>

EnderGirl1500 commented 2 years ago

I did it with one of the players but it didn't work

EnderGirl1500 commented 2 years ago

I just did it with someone else and worked, how can i fix it for the ones that cant join even with the force offline?

EnderGirl1500 commented 2 years ago

Today I made no changes and someone who played like 3h ago has lost the inventory

NikitaCartes commented 2 years ago

Sometimes online player treated as offline player, this known rare bug. I will look into that in next week, but for now server restart should help

EnderGirl1500 commented 2 years ago

ok and what about those who cant join at all? One tried changing the username into one that isnt occupied and it didnt work

NikitaCartes commented 2 years ago

So one more time: It's offline player; This nickname doesn't belongs to someone's else online account (or this player in forced offline list); There is no any error in logs?

Can you join in Discord server, I think it would be easier? https://discord.gg/UY4nhvUzaK

EnderGirl1500 commented 2 years ago

Its offline player, his nickname doesnt belong to anyone and even when forcing him on the list it doesnt work. Imma join now.

TechPro424 commented 2 years ago

Yes the same thing is happening to me as well offline player; the player is in forcedoffline list

there is some red thing related to easyauth in the logs, idk what it means tho it is the same error that EnderGirl got https://mclo.gs/gw4E4cq

TechPro424 commented 2 years ago

I fixed the problem I had to go to spawn and use the auth SetSpawn command because spawn dimension was null in config @EnderGirl1500 maybe it might work for you?

Glaived commented 1 year ago

I fixed the problem I had to go to spawn and use the auth SetSpawn command because spawn dimension was null in config

https://github.com/NikitaCartes/EasyAuth/blob/4a15a7223037e64e5cbfff0035c6213288150018/src/main/java/xyz/nikitacartes/easyauth/storage/AuthConfig.java#L252

I am not a Java developer, but this should solve the problem:

public String dimension = "minecraft:overworld";