TheNewEconomy / EconomyCore

The core code powering TNE.
Other
8 stars 5 forks source link

[BUG]: foreign key constraint fails SQL-Error on startup #75

Closed dotI0 closed 8 months ago

dotI0 commented 8 months ago

TNE Version

0.1.2.5

Spigot Version

1.20.2

Your config.yml

https://pastebin.com/ZbvPJC4K

Your latest server log

https://pastebin.com/CAT7Nn97

What modules are you using?

No response

What part of TNE is the bug affecting?

Won't Startup

Is your server using online mode?

Yes

Bug description

On startup, I get the following Errors. https://pastebin.com/ct8QwAsP

Where is the Error coming from and what to do?

How to reproduce

Use MySql database

creatorfromhell commented 8 months ago

Unable to reproduce using provide reproduction steps.

dotI0 commented 8 months ago

I think it's a Data Error in my Database? Can you help me with it? Its after I upgraded from 0.1.2.0-pre23 to 0.1.2.5

dotI0 commented 8 months ago

The error appears after the plugin is trying to save account e6c99d8a-c60c-3317-862e-87658d521ea9. I can't find that UUID online or on the database… There is no account for this UUID, and it appears in no other save on the server.

The Error also appears for other uuids.

dotI0 commented 8 months ago

I have a Solution.

I have to create an account named test with the UUID that not exists. On the next restart, TNE debug shows the username that it belongs to because it's already existing. Then I can delete the user and It's able to save again.

creatorfromhell commented 8 months ago

I have a Solution.

I have to create an account named test with the UUID that not exists. On the next restart, TNE debug shows the username that it belongs to because it's already existing. Then I can delete the user and It's able to save again.

Alright. If there is an actual reproduction method for this let me know so I could test the reproduction for it

dotI0 commented 8 months ago

After looking into it, the UUIDs all belong to Bedrock Players that are connected via Geyser and Authenticating via Floodgate on Bungee. Seems to be a conversion problem from pre 0.1.2.0 to a higher version specific for bedrock players.

The account_type on the mismatched username/uuid accounts are "bedrock" instead of "player or non-player" .

If the error occurs on new bedrock players, I will tell you.

Thanks!

dotI0 commented 8 months ago

After looking into it, the UUIDs all belong to Bedrock Players that are connected via Geyser and Authenticating via Floodgate on Bungee. Seems to be a conversion problem from pre 0.1.2.0 to a higher version specific for bedrock players.

The account_type on the mismatched username/uuid accounts are "bedrock" instead of "player or non-player" .

If the error occurs on new bedrock players, I will tell you.

Thanks!

In case you missed the edit.. It seems to affect accounts after conversion with the account type "bedrock". And only bedrock accounts which are not linked to an java account. The linked bedrock acconts are account type "none-player". The username is in the db with the wrong uuid. Does the uuid for bedrock players change over time?

creatorfromhell commented 8 months ago

After looking into it, the UUIDs all belong to Bedrock Players that are connected via Geyser and Authenticating via Floodgate on Bungee. Seems to be a conversion problem from pre 0.1.2.0 to a higher version specific for bedrock players.

The account_type on the mismatched username/uuid accounts are "bedrock" instead of "player or non-player" .

If the error occurs on new bedrock players, I will tell you.

Thanks!

Yes the account type should be bedrock .. yeah pre 0.1.2.0 did not have geyser support so that's probably the issue

dotI0 commented 8 months ago

It won't fit here in the ticket, but it also won't require a ticket… Version 0.1.2.5 shows an Update Available message for version 0.1.2.3.

creatorfromhell commented 8 months ago

It won't fit here in the ticket, but it also won't require a ticket… Version 0.1.2.5 shows an Update Available message for version 0.1.2.3.

Weird, will have a look at it.

Also, not sure if this is related but sometimes changing floodgate stuff makes UUIDS change. Not sure if it happened after you modified your auth plugin or if you changed anything with floodgate.

https://github.com/GeyserMC/Geyser/issues/2804