Suwayomi / Suwayomi-Server

A rewrite of Tachiyomi for the Desktop
Mozilla Public License 2.0
3.73k stars 196 forks source link

[Bug] Server crashes trying to schedule automated backup #885

Closed PhymIsBored closed 4 months ago

PhymIsBored commented 4 months ago

Device information

Steps to reproduce

  1. Start docker-container

Other details

16:09:36.236 [main] DEBUG suwayomi.tachidesk.util.HAScheduler -- schedule: Task "global-update" (18a79f4c-8c81-4832-9de3-c6d6b73781f9) lastExecution= Sun Feb 18 01:00:00 CET 2024 nextExecution= Wed Feb 21 01:00:00 CET 2024 interval= 259200000, initialDelay= 31823820
16:09:36.254 [main] ERROR suwayomi.tachidesk.server.ServerSetup -- unhandled exception
java.lang.NumberFormatException: For input string: "00 - time of day at which the automated backup should be triggered"
        at java.base/java.lang.NumberFormatException.forInputString(Unknown Source)
        at java.base/java.lang.Integer.parseInt(Unknown Source)
        at java.base/java.lang.Integer.parseInt(Unknown Source)
        at suwayomi.tachidesk.manga.impl.backup.proto.ProtoBackupExport.scheduleAutomatedBackupTask(ProtoBackupExport.kt:84)
        at suwayomi.tachidesk.server.ServerSetupKt.applicationSetup(ServerSetup.kt:270)
        at suwayomi.tachidesk.MainKt.main(Main.kt:14)
        at suwayomi.tachidesk.MainKt.main(Main.kt)
PhymIsBored commented 4 months ago

The crash was caused by a misconfiguration in the server.conf file. The input string should obviously not have included "- time of day at which the automated backup should be triggered". Adding a comment before the string fixed the issue.