NeoApplications / Neo-Backup

backup manager for android
GNU Affero General Public License v3.0
2.52k stars 124 forks source link

[Bug] Restore Loop #701

Open clempe opened 1 year ago

clempe commented 1 year ago

Description A clear and concise description of what the bug is.

Steps To Reproduce

  1. Enter the wrong encryption password
  2. Got to restore the tab
  3. Select all/multiple apps to restore
  4. No progress during the restore app is in a "restore loop"

Expected behavior Stop the restore and display an error. E.g. if you restore only one app the error message "RestoreFailedException: Could not read the input file or write an output file due to IOException: java.io.IOException: Input is not in the .gz format" is shown

System Information(please complete the following information):

distbit0 commented 1 year ago

Can confirm I experienced the same issue. Initially forgot to enter my encryption password, and it just looped and kept crashing until I eventually entered it, after-which it then began making progress after I re-started the restore process.

hg42 commented 1 year ago

So the first question is, is it really a crash? Why do you think it is a loop?

Normally, if the app crashes, it just closes. Not sure why it should be restarted... so it looks like the "crash" isn't a crash.

In the single case, it is an error message, so the exception is catched and it's not a crash (where app would loose control).

I guess it is not looping, but simply executing all the jobs even if they fail. This includes a single repeat of a failed job (by default unless you increased the retries).

The general problem is, that NB does not know which package you encrypted with which password.

It is well possible, that only one package was encrypted with another password and the remaining packages would work. Asking for each package wouldn't be what you want.

It is not unusual to use that functionality to restore a set of packages with one password and then with another when you don't remember which password was used with which packages.

Even if NB runs through all packages and they all fail, it should still be possible to cancel all jobs from the notification. Did you try that?

To make the cancel option more visible, I could imagine opening a dialog in case of failures (with jobs running in background).