TheNewEconomy / EconomyCore

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

[BUG]: SQLIntegrityConstraintViolationException on startup #84

Closed fabianmakila closed 3 months ago

fabianmakila commented 5 months ago

TNE Version

0.1.2.7-Release-1

Spigot Version

1.20.4

Your config.yml

https://gist.github.com/fabianmakila/2de9b0046939f69028e51a3c887ea821

Your latest server log

https://gist.github.com/fabianmakila/1d1098924d302a41e9f34aaa45c035f6

What modules are you using?

No response

What part of TNE is the bug affecting?

Transactions

Is your server using online mode?

Yes

Bug description

I'm opening this in case the bug still exists. When starting up the server we get the java.sql.SQLIntegrityConstraintViolationException seen in the latest.log above.

I read through issue #75 , and this seems it could be the same bug. The big difference is that we do not and have never used Geyser nor Floodgate. We've recently updated from the version 0.1.2.3 so that might be part of the issue.

I should note that the log says that the TNE version is 0.1.2.6, but the JAR name has the version 0.1.2.7-Release-1 so I assumed that is the correct one.

How to reproduce

Sadly I don't have the exact steps to reproduce this.

creatorfromhell commented 5 months ago

Is this a new installation? Have you deleted accounts on this install?

fabianmakila commented 5 months ago

It's using the same database as the old version did so not a new installation. As far as I know no accounts have been deleted.

creatorfromhell commented 5 months ago

It's using the same database as the old version did so not a new installation. As far as I know no accounts have been deleted.

Which old version?

fabianmakila commented 5 months ago

It's using the same database as the old version did so not a new installation. As far as I know no accounts have been deleted.

Which old version?

0.1.2.3 as I mentioned in the issue description

creatorfromhell commented 5 months ago

It's using the same database as the old version did so not a new installation. As far as I know no accounts have been deleted.

Which old version?

0.1.2.3 as I mentioned in the issue description

Thank you, and then also, could you enable debug mode and then post the log? Set it to developer mode, I want to see what it's trying to add to the database.

fabianmakila commented 5 months ago

latestlog.zip

Here it is. The log file is around 35MB so I couldn't upload it to any of the paste sites.

creatorfromhell commented 5 months ago

latestlog.zip

Here it is. The log file is around 35MB so I couldn't upload it to any of the paste sites.

Cheers, ty. Also do you have access to view the SQL tables that you could take a picture of the _accounts, and players_accounts tables for the following accounts:

Also, if you could run /tne extract and give me the extracted.yml file that is created.

creatorfromhell commented 5 months ago

Also if you could keep debug enabled with this updated version of TNE(unzip the zip and the jar is inside) this will print out the exact query being sent that is causing the error. TNE-BukkitCore-0.1.2.8-Pre-1.zip

fabianmakila commented 5 months ago

Sorry for the delay, here are all the things you requested.

tne github bugreport.zip

creatorfromhell commented 5 months ago

Sorry for the delay, here are all the things you requested.

tne github bugreport.zip

Cheers. Now we're able to figure out the accounts with issues, could you find the entries for these in the _accounts table: d00dd2fa-4726-428d-88b5-1d15ecef8f80 Name: okhe 9a871117-f961-4a33-bc08-bcbb207c0a51 Name: Homofoobikko 17d71345-f006-4497-b084-3f6955217963 Name: mustakissa546 d9e3af13-97ef-40cd-a4eb-fd2816147aa8 Name: kuudralover 988dfef1-3680-47d8-9de5-4bc38b09759a Name: Lehrom 45def8c3-f98b-42ee-85d5-2c09505cafe9 Name: Vyyhti c6c532c9-3c17-4093-899b-2dcf28d5d448 Name: dqrkred f51c63cc-8da9-4dfc-a6d6-3ed954fdccf5 Name: Wohbeli 8e99a548-a88b-4cb5-8740-5f8fa05e5b06 Name: pahwuu

Also did you use the converter to switch from a previous plugin or are all these accounts made on login?

fabianmakila commented 4 months ago

They are all clean accounts made in login.

Apparently only 2 of the accounts you specified were present in the _accounts table. Here they are: pahwuu okhe

creatorfromhell commented 4 months ago

They are all clean accounts made in login.

Apparently only 2 of the accounts you specified were present in the _accounts table. Here they are: pahwuu okhe

Interesting, I'll have a test jar soon to see if maybe the account insert SQL is failing or what is going on... It may be SQL latency which would be interesting and weird.

creatorfromhell commented 4 months ago

TNE-BukkitCore-0.1.2.8-Pre-1.zip Try this jar, hopefully it'll give us some insight into why the accounts, which should be inserted into _accounts first, are/aren't. Remember to set Debug Mode to DEVELOPER before starting.

fabianmakila commented 4 months ago

I got this error when starting the server with the jar above preventing the plugin from enabling.

creatorfromhell commented 4 months ago

I got this error when starting the server with the jar above preventing the plugin from enabling.

What is your proxy type setting in data.yml?

fabianmakila commented 4 months ago

There is no such setting. Should I add it manually and if so where?

creatorfromhell commented 4 months ago

There is no such setting. Should I add it manually and if so where?

https://github.com/TheNewEconomy/EconomyCore/blob/main/Core/resources/data.yml

fabianmakila commented 4 months ago

Here is all I could get before TNE crashed the server (due to PID spam) 2024-02-13-4.log.gz

creatorfromhell commented 4 months ago

Here is all I could get before TNE crashed the server (due to PID spam) 2024-02-13-4.log.gz

Gotcha, unfortunately that log doesn't have any errors in it. Here's what I would say is turn off debugging, if it errors out, remove those UUID's from the _players table. Make sure you turn off the server before doing this. It should recreate these accounts on next login.