fix(android): backup retry stuck in 2h backoff lockout - press forces retry, cap ends honest failure #1408
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/backup-retry-backoff"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Device-verified problem (Pixel 2, adb)
After repeated upload 502s (server-side proxy hop, tracked separately as ISSUE-213), the one-off BackupWorker sat deep in WorkManager exponential backoff: attempt 9 → next run in +2h08m (JobScheduler dump:
Minimum latency: +2h7m59s). During that whole window:BackupScheduler.enqueueNowearly-returned on the merely ENQUEUED request,so the user could not force a retry and the Sicherung tab looked hung for two hours.
Fix
MAX_AUTO_RETRIES = 5, singleretryOrFailfunnel for all three retry sites): after the cap the run FAILS with the error marker — the last-run card shows the honest „Fehlgeschlagen" + cause instead of an endless backoff wait. Auth-expired handling untouched.isRunInProgressgate (RUNNING only, either lane) drives button enable/label and thebackupNow()/retryFailed()guards;isWorkActivekeeps the wider ISSUE-208 semantics; the terminal-refresh now fires when a run ends, not when queue states flip.Verification
shouldSkipImmediateEnqueue,shouldFailInsteadOfRetry) + rewritten VM gating tests (one-off ENQUEUED now pressable with normal label; RUNNING disabled „Sichert …"; periodic ENQUEUED unchanged)TypeError: fetch failedon multi-100MB uploads) and ISSUE-214 (worker_jobs retention DELETE violatesdiscovery_results_worker_job_id_fkey, recurring ERROR in API logs)