Lightman's Currency

Lightman's Currency

331k Downloads

BUG: Randomly not acknowledging trader owner for some players.

Novacurono opened this issue ยท 11 comments

commented

Minecraft Version (REQUIRED): 1.18.2
Forge Version (REQUIRED): 4.1.69
Lightman's Currency Version (REQUIRED): 1.2.0.7
Other Relevant Mods & Version (LC Tech, etc.):
Connection Type (Single-player, server/client, LAN world): server

  1. When I created the store on the server, everything was fine until the server was restarted. After the restart, I could not open the edit menu of the store and, in general, it ceased to belong to me. I have access to operator mode but it didn't help either

What should happen: After the restart, I can still edit the store and its auctions

  1. Restart deletes teams and shared bank accounts.
    What should be: the restart does not affect the teams and the bank account.
commented

Closing due to my inability to replicate the issue, and a lack of response to my request for the latest.log/debug.log file.

commented
  1. Lost only owner data. The auction is not touched, but the owner of the auction does not show.
  2. Yes amin mod allowed to see the teams of the players. Before that, they were not visible (including my own after the restart, before everything showed). I personally was the owner, and I installed the vending machine
  3. Unfortunately, I can not throw it off. Unless absolutely necessary.
  4. Server is in offline mode but uuid doesn't change on restart.
commented

Does it go back to a functional state if you re-assign yourself as the owner in admin mode (Settings -> Transfer Ownership)? Also, was the trader placed while the server was not in offline mode, cause if so your UUID was 100% different from when you placed it, as opposed to now.

That said, my mod does not support offline mode, and likely never will due to how it requires GameProfile access for various features (such as getting a player UUID from a name for transferring ownership, adding allies or team members, certain player-based trade rules, etc.)

commented

Yes, I was able to transfer the owner mode to myself through the admin mod.
No it was posted when the server was in offline mode. And after the restart, this value did not change.
Again, the UUID on the server is static and does not change.

commented

1- Please be more specific about what happened. "I made a store and then when the server rebooted I could not open it" is very vague, and doesn't help me much. Did it lose ALL of it's data (trades, etc.), or only the owner data? Who does it say the owner is if you hover over the traders title from the trading screen? Also, even if a trader is unowned ADMIN MODE (/lcadmin toggleAdmin) will ALWAYS let you access the trader storage etc, so saying "I have access to operator mode but it didn't help either" makes no sense to me...

2- In what way did the restart delete the teams as well. Does activating ADMIN MODE (/lcadmin toggleAdmin) allow you to see your team again? If so we likely a similar issue where the owner data was lost, etc. Also, if the trader from issue 1 was owned by said team, and said team still exists but lost it's ownership data, then that's likely the cause of issue 1 as well.

3- If you haven't rebooted the server a 2nd time since encountering the issue, could you please provide the latest.log file (found in the logs folder) from when the server was first rebooted so that I can check it for errors, etc. I ask for this in the template, but apparently you elected to ignore that...

4- I have to ask cause we've had similar issues with this before, but is the server in offline mode? Cause if it is, this is 100% and offline mode issue, as player UUID's tend to change while in offline mode (since it's no longer bound to your account id), which causes a trader/teams owner ID data to no longer match your player UUID.

commented

@Lightman314 the server runs in online-mode: true, the player's uuid never changes.

commented

If it's been in online mode the whole time, I've no clue why this would be happening, as this very much doesn't happen in single-player after closing/re-opening the save, nor does it happen on the other Minecraft server I'm staffing. I'm 100% going to need a log file or something to even begin to look into this.

Edit: I tested in both single-player and a client-server connection. Team & Trader ownership data worked as intended on both.

commented

log from the console when start the server:

java.lang.NullPointerException: Cannot invoke "io.github.lightman314.lightmanscurrency.trader.settings.PlayerReference.lastKnownName()" because the return value of "io.github.lightman314.lightmanscurrency.trader.settings.PlayerReference.of(java.util.UUID, String)" is null
        at TRANSFORMER/[email protected]/io.github.lightman314.lightmanscurrency.common.universal_traders.TradingOffice.load(TradingOffice.java:295)
        at TRANSFORMER/[email protected]/io.github.lightman314.lightmanscurrency.common.universal_traders.TradingOffice.<init>(TradingOffice.java:143)
        at TRANSFORMER/[email protected]/net.minecraft.world.level.storage.DimensionDataStorage.m_164868_(DimensionDataStorage.java:70)
        at TRANSFORMER/[email protected]/net.minecraft.world.level.storage.DimensionDataStorage.m_164858_(DimensionDataStorage.java:54)
        at TRANSFORMER/[email protected]/net.minecraft.world.level.storage.DimensionDataStorage.m_164861_(DimensionDataStorage.java:39)
        at TRANSFORMER/[email protected]/io.github.lightman314.lightmanscurrency.common.universal_traders.TradingOffice.get(TradingOffice.java:1034)
        at TRANSFORMER/[email protected]/io.github.lightman314.lightmanscurrency.common.universal_traders.TradingOffice.onTick(TradingOffice.java:1114)
        at net.minecraftforge.eventbus.ASMEventHandler_360_TradingOffice_onTick_WorldTickEvent.invoke(.dynamic)
        at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85)
        at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.EventBus.post(EventBus.java:302)
        at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.EventBus.post(EventBus.java:283)
        at TRANSFORMER/[email protected]/net.minecraftforge.event.ForgeEventFactory.onPreWorldTick(ForgeEventFactory.java:884)
        at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:899)
        at TRANSFORMER/[email protected]/net.minecraft.server.dedicated.DedicatedServer.m_5703_(DedicatedServer.java:326)
        at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:842)
        at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:685)
        at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:261)
        at java.base/java.lang.Thread.run(Thread.java:833)```
commented

log from the console when start the server:

java.lang.NullPointerException: Cannot invoke "io.github.lightman314.lightmanscurrency.trader.settings.PlayerReference.lastKnownName()" because the return value of "io.github.lightman314.lightmanscurrency.trader.settings.PlayerReference.of(java.util.UUID, String)" is null
        at TRANSFORMER/[email protected]/io.github.lightman314.lightmanscurrency.common.universal_traders.TradingOffice.load(TradingOffice.java:295)
        at TRANSFORMER/[email protected]/io.github.lightman314.lightmanscurrency.common.universal_traders.TradingOffice.<init>(TradingOffice.java:143)
        at TRANSFORMER/[email protected]/net.minecraft.world.level.storage.DimensionDataStorage.m_164868_(DimensionDataStorage.java:70)
        at TRANSFORMER/[email protected]/net.minecraft.world.level.storage.DimensionDataStorage.m_164858_(DimensionDataStorage.java:54)
        at TRANSFORMER/[email protected]/net.minecraft.world.level.storage.DimensionDataStorage.m_164861_(DimensionDataStorage.java:39)
        at TRANSFORMER/[email protected]/io.github.lightman314.lightmanscurrency.common.universal_traders.TradingOffice.get(TradingOffice.java:1034)
        at TRANSFORMER/[email protected]/io.github.lightman314.lightmanscurrency.common.universal_traders.TradingOffice.onTick(TradingOffice.java:1114)
        at net.minecraftforge.eventbus.ASMEventHandler_360_TradingOffice_onTick_WorldTickEvent.invoke(.dynamic)
        at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85)
        at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.EventBus.post(EventBus.java:302)
        at MC-BOOTSTRAP/[email protected]/net.minecraftforge.eventbus.EventBus.post(EventBus.java:283)
        at TRANSFORMER/[email protected]/net.minecraftforge.event.ForgeEventFactory.onPreWorldTick(ForgeEventFactory.java:884)
        at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:899)
        at TRANSFORMER/[email protected]/net.minecraft.server.dedicated.DedicatedServer.m_5703_(DedicatedServer.java:326)
        at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:842)
        at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:685)
        at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:261)
        at java.base/java.lang.Thread.run(Thread.java:833)```

This is a known error that is being safely caught (if it wasn't the game would crash when trying to load), and has no lasting repercussions except at most having your bank account's name not update should you change your IGN.

Is not in any way relevant to this issue.

commented

I found out the reason in a little more detail. This error occurs not for all players on the server. For some everything works fine and save.

commented

That's odd. Is there anything mentioned in the logs? You can just send me the entire log file if you'd like, and I'll look through it myself.

Edit: Oops, accidentally hit the close button on accident.