DriveBackupV2

DriveBackupV2

46.6k Downloads

Error while enabling DriveBackupv1

TsunayoshiSawada opened this issue ยท 3 comments

commented

Describe the bug

[09:25:09 INFO]: [DriveBackupV2] Enabling DriveBackupV2 v1.5.4
[09:25:10 INFO]: [DriveBackupV2] Automatically migrating config to version 2
[09:25:10 ERROR]: Error occurred while enabling DriveBackupV2 v1.5.4 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "org.bukkit.configuration.file.FileConfiguration.getString(String)" is null
        at ratismal.drivebackup.config.ConfigMigrator.migrate(ConfigMigrator.java:55) ~[DriveBackupV2.jar:?]
        at ratismal.drivebackup.plugin.DriveBackup.onEnable(DriveBackup.java:75) ~[DriveBackupV2.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugin(CraftServer.java:564) ~[paper-1.18.1.jar:git-Paper-160]
        at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugins(CraftServer.java:478) ~[paper-1.18.1.jar:git-Paper-160]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:727) ~[paper-1.18.1.jar:git-Paper-160]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:503) ~[paper-1.18.1.jar:git-Paper-160]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:313) ~[paper-1.18.1.jar:git-Paper-160]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1202) ~[paper-1.18.1.jar:git-Paper-160]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.18.1.jar:git-Paper-160]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
[09:25:10 INFO]: [DriveBackupV2] Disabling DriveBackupV2 v1.5.4
[09:25:10 INFO]: [DriveBackupV2] Stopping plugin!

To Reproduce

Started my Minecraft server after a few weeks of downtime
Plugin asked if it were up to date - updated it, started it - didn't help.

Did mess with the config a bit but not sure if that is the cause

Screenshots / Videos

No response

Server and Plugin Versions

Plugin version: 1.5.4
Server version: 1.18.1-160

Additional Context

No response

commented

Config migration is choking on schedule-timezone being set, but getString() returns null.
As a workaround, you should be able to manually set it to "-00:00".

New location is advanced.date-timezone.

if (config.isSet("schedule-timezone") && !config.getString("schedule-timezone").equals(DEFAULT_TIMEZONE_STRING)) {
migrate("schedule-timezone", "advanced.date-timezone");
config.set("backup-format-timezone", null);
} else {
migrate("backup-format-timezone", "advanced.date-timezone");
config.set("schedule-timezone", null);
}

commented

Sorry that you experienced this issue, it is fixed with 4de43b1

commented

The version is still from Nov 2021 - won't there be a release for this?
and uhm ... is this okay?

advanced:
  metrics: true
  update-check: false
  suppress-errors: false
  date-language: en
  ftp-file-separator: /
  date-timezone: "+05:30"