MaxMaeder / DriveBackupV2

Uploads Minecraft backups to Google Drive/OneDrive or by (S)FTP
https://dev.bukkit.org/projects/drivebackupv2
MIT License
157 stars 47 forks source link

[Bug] Internal error after trying to get status while uploading #162

Closed AdyStudios closed 2 months ago

AdyStudios commented 5 months ago

Describe the bug

Bug happens when trying to get status while uploading the backup.

To Reproduce

  1. /drivebackup backup
  2. Wait until in the console it says uploading to google drive
  3. run /driverbackup status
  4. Internal error.

Screenshots / Videos

No response

Server and Plugin Versions

DrivebackupV2, dynmap, Factions, floodgate, Geyser-Spigot, GSit, Multiverse-Core, Multiverse-NetherPortals I do not backup plugins

Logs

[22:17:30 INFO]: [DriveBackupV2] Uploading backup(s)...
[22:17:48 INFO]: [DriveBackupV2] Starting upload(s) for file "C:/Users/Kara/mcServer/backups/LargeBiomeNormalGen/Backup-LargeBiomeNormalGen-2024-4-29--20-16.zip"
[22:17:48 INFO]: [DriveBackupV2] Uploading file to Google Drive
[22:20:01 INFO]: cukipele issued server command: /gamemode creative
[22:20:01 INFO]: [cukipele: Set own game mode to Creative Mode]
[22:20:10 INFO]: cukipele issued server command: /difficulty hard
[22:20:10 INFO]: [cukipele: The difficulty has been set to Hard]
[22:21:13 INFO]: cukipele issued server command: /drivebackup status
[22:21:13 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'drivebackup' in plugin DriveBackupV2 v1.6.3
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.dispatchCommand(CraftServer.java:999) ~[paper-1.20.4.jar:git-Paper-493]
        at org.bukkit.craftbukkit.v1_20_R3.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) ~[paper-1.20.4.jar:git-Paper-493]
        at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
        at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:31) ~[paper-1.20.4.jar:git-Paper-493]
        at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19) ~[paper-1.20.4.jar:git-Paper-493]
        at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[paper-1.20.4.jar:git-Paper-493]
        at net.minecraft.commands.execution.CommandQueueEntry.a(CommandQueueEntry.java:5) ~[paper-1.20.4.jar:git-Paper-493]
        at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103) ~[paper-1.20.4.jar:git-Paper-493]
        at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:434) ~[?:?]
        at net.minecraft.commands.Commands.performCommand(Commands.java:336) ~[?:?]
        at net.minecraft.commands.Commands.performCommand(Commands.java:323) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2230) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$14(ServerGamePacketListenerImpl.java:2190) ~[?:?]
        at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:59) ~[?:?]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.4.jar:git-Paper-493]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:149) ~[?:?]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1465) ~[paper-1.20.4.jar:git-Paper-493]
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:194) ~[paper-1.20.4.jar:git-Paper-493]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:123) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1442) ~[paper-1.20.4.jar:git-Paper-493]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1365) ~[paper-1.20.4.jar:git-Paper-493]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:133) ~[?:?]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1343) ~[paper-1.20.4.jar:git-Paper-493]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1232) ~[paper-1.20.4.jar:git-Paper-493]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-493]
        at java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
        at ratismal.drivebackup.UploadThread.getBackupStatus(UploadThread.java:552) ~[DriveBackupV2.jar:?]
        at ratismal.drivebackup.handler.commandHandler.CommandHandler.onCommand(CommandHandler.java:125) ~[DriveBackupV2.jar:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        ... 29 more

Config

version: 2

delay: 30
backup-thread-priority: 1
keep-count: 20
local-keep-count: 0
zip-compression: 1
backups-require-players: true
disable-saving-during-backups: true

scheduled-backups: false

backup-list:
- glob: LargeBiomeNormalGen*
  format: Backup-%NAME-%FORMAT.zip
  create: true

local-save-directory: backups
remote-save-directory: backups

googledrive:
  enabled: true
  shared-drive-id: ''
onedrive:
  enabled: true
dropbox:
  enabled: false
webdav:
  enabled: false
  hostname: http://example.com/directory
  username: Username
  password: Password
nextcloud:
  enabled: false
  hostname: https://example.com/remote.php/dav/files/user/
  username: Username
  password: Password
  chunk-size: 20000000
s3:
  enabled: false
  endpoint: https://s3.us-west-2.amazonaws.com
  access-key: AKIAxxxxxxxxxxxxxxxx
  secret-key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  bucket: bucket
ftp:
  enabled: false
  hostname: ftp.example.com
  port: 21
  sftp: false
  ftps: false
  username: Username
  password: Password

messages:
  send-in-chat: true
  prefix: '&6[&4DriveBackupV2&6] '
  default-color: '&3'

advanced:
  metrics: true
  update-check: true
  suppress-errors: false
  debug: false
  date-language: en
  date-timezone: -00:00
  ftp-file-separator: /

Additional Information

No response

Veivel commented 3 months ago

I'm having the same issue here. On 1.20.4 (Paper-497), plugin v1.6.3, Java 21.0.3

Plugins: PaperTweaks, Autorank, ChatEx, Chunky, CleanPing, ColoredAnvils, CoreProtect, DiscordSRV, DriveBackupV2, Essentials, EssentialsAntiBuild, GSit, HexNicks, LuckPerms, OreAnnouncer, Otherside, PrometheusExporter, spark, StaffPlus, TabTPS, TerraformGenerator, UltimateAutoRestart

Same steps to reproduce as above. The only difference is I do backup plugins

rynstwrt commented 2 months ago

I'm still experiencing this myself.

rhld16 commented 2 months ago

Fixed in v1.8.0

moeelbadri commented 1 month ago

still experiencing the same issue in 1.8.0 drivebackup status org.bukkit.command.CommandException: Unhandled exception executing command 'drivebackup' in plugin DriveBackupV2 v1.8.0