DiscordSRV

DiscordSRV

86.8k Downloads

DiscordSRV Deletes the Accounts.aof file when booting up the newest snapshot on 1.21

Goinging opened this issue ยท 2 comments

commented

Expected behavior

The server boots up using the .aof file previously created and the linked accounts work.

Actual behavior

It sends this error in the console and deletes the file completely. [15:23:51 ERROR]: [DiscordSRV] Failed to load linked accounts
[15:23:51 ERROR]: [DiscordSRV] java.io.IOException: couldn't rename temporary file to master file after write
[15:23:51 ERROR]: [DiscordSRV] at DiscordSRV-1.28.0-SNAPSHOT-9dd4cd4.jar//github.scarsz.discordsrv.objects.managers.link.file.AppendOnlyFileAccountLinkManager.save(AppendOnlyFileAccountLinkManager.java:152)
[15:23:51 ERROR]: [DiscordSRV] at DiscordSRV-1.28.0-SNAPSHOT-9dd4cd4.jar//github.scarsz.discordsrv.objects.managers.link.file.AppendOnlyFileAccountLinkManager.readAOF(AppendOnlyFileAccountLinkManager.java:111)
[15:23:51 ERROR]: [DiscordSRV] at DiscordSRV-1.28.0-SNAPSHOT-9dd4cd4.jar//github.scarsz.discordsrv.objects.managers.link.file.AppendOnlyFileAccountLinkManager.load(AppendOnlyFileAccountLinkManager.java:55)
[15:23:51 ERROR]: [DiscordSRV] at DiscordSRV-1.28.0-SNAPSHOT-9dd4cd4.jar//github.scarsz.discordsrv.objects.managers.link.file.AbstractFileAccountLinkManager.(AbstractFileAccountLinkManager.java:48)
[15:23:51 ERROR]: [DiscordSRV] at DiscordSRV-1.28.0-SNAPSHOT-9dd4cd4.jar//github.scarsz.discordsrv.objects.managers.link.file.AppendOnlyFileAccountLinkManager.(AppendOnlyFileAccountLinkManager.java:50)
[15:23:51 ERROR]: [DiscordSRV] at DiscordSRV-1.28.0-SNAPSHOT-9dd4cd4.jar//github.scarsz.discordsrv.DiscordSRV.init(DiscordSRV.java:1071)
[15:23:51 ERROR]: [DiscordSRV] at java.base/java.lang.Thread.run(Thread.java:1583)

Steps to reproduce

This can be reproduced with old or new .aof files.

Server software and version

Paper version 1.21-44-master@8d91b85

Checks

  • I am not using an outdated version of DiscordSRV.
  • I asked in DiscordSRV's Discord server to see whether this issue is in fact a bug that needs to be fixed.
  • I didn't actually check any of these things

Anything else

No response

commented

Should be fixed now. Let me know if you no longer run into this issue on the latest snapshot build: https://snapshot.discordsrv.com

commented

Tested this and it works fully.