NeoApplications / Neo-Backup

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

[Bug] Backup Stalling, keyboard disabled (8.3.0) #728

Closed anaxonda closed 1 year ago

anaxonda commented 1 year ago

Description I have two backups that run at midnight and 1 AM respectively. Backups go to external SD card.

1) backs up most User Apps with the APK, Data, and Device Protected Data. 2) backs up Whatsapp with apk, data, device protected data, external data, and media data.

I'm not sure what exactly is going on but I've noticed in the last few days in the morning that the backup has stalled, and I am unable to use the keyboard on the phone (does not pop up at text prompt).

If I restart the phone the keyboard works, and the backup finishes successfully.

Steps To Reproduce

  1. run scheduled backup
  2. backup stalls, keyboard doesn't work
  3. reboot, backup finishes, keyboard works

Expected behavior not stalling, keyboard working.

System Information(please complete the following information):

MrEngineerMind commented 1 year ago

I would:

1) If the problem has been reliably happening for the last few days, then try narrowing it down to see if it's just one of backups that is causing the problem.

2) How long (time wise) does it typically take to do each backup?

3) Is it possible that the first backup didn't complete by the time the second scheduled backup starts?

4) How many apps and approx how much data (MB) is being backed-up - might give a clue if this is an out of memory problem.

anaxonda commented 1 year ago

1) It seems to be the first backup causing the problem. 2) Backup 1 stalling after 15 minutes. Won't complete and seems to disable keyboard. If I reboot it does not finish, but I can cancel it (and keyboard back). Backup 2 completes in under 10 minutes. 3) This seems possible, but I was able to reproduce the problem by running just backup 1 manually. 4) Around 40 GB total. Looking into it there was at least 20+ GB of stuff that didn't need to be backed up, mainly from Signal that I didn't realize was being backed up.

I just reorganized my backups into four schedules.
1) important backup that should run (just a handful of apps), daily 2) whatsapp (with all media folders), daily 3) (most) apps that can be backed up once weekly 3) apps that were taking up large amounts of space and/or only want the apk, weekly

Running all manually seems to work fine, so I'll close this issue. Not sure why it wasn't working before.

What's the best way to get a log? Application log seems to always be empty.

hg42 commented 1 year ago

probably due to library version changes in 8.3.0 the Android WorkManager starts all backups of a schedule (and also of a batch) at once. I guess, in your case the number was too large.

How many apps were in the stalling backup?

I think the issue is caused by that, because reducing the number of packages in a schedule helps. I also remember another report about the keyboard not popping up combined with too many parallel backups. I guess the keyboard doesn't get necessary resources in this case.

A fix is already part of an alpha test. If you have Telegram, you can find the alpha version or my so called "pumpkin" apks in the group (look into pinned messages).

Reorganizing schedules like you did, is a good thing, anyways...

A log is either created manually via NBs terminal tool, via SUPPORT button, or you can use autoLogAfterSchedule to create one automatically. You should increase maxLogLines to maximum (20000) to get a full log of a schedule. You also need to enable all trace* (but disable traceBackupProps, traceBackupsScanAll in your case).