seedvault-app / seedvault

A backup application for the Android Open Source Project.
1.26k stars 74 forks source link

Backup of many APKs time out and make backup fail #590

Closed azarok closed 6 months ago

azarok commented 11 months ago

I spoke with Nick from Clyxos, and he told me to provide you the log. There are some personal details in the log. How might I attach the file such that no one a part of you could view it? Thank you

grote commented 11 months ago

@chirayudesai didn't we have an email address for these cases?

chirayudesai commented 11 months ago

We have one for calyx, bugreports@calyxos.org

IIRC GitHub doesn't allow others to open private / confidential issues, otherwise that'd have been another way.

azarok commented 11 months ago

Thank you both, I have just emailed you with the log.

t-m-w commented 11 months ago

The backup proceeds successfully for a while but eventually encounters a particular package, stalls, and times out. (I removed anything even close to being identifiable from this snippet.)

I BackupNotificationManager: [redacted progress] - Opt-out APK for [redacted package]
[ ~10 seconds later ]
W BackupTransportClient: Failed to get result from transport:
W BackupTransportClient: java.util.concurrent.TimeoutException
W BackupTransportClient:    at java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1862)
W BackupTransportClient:    at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1997)
W BackupTransportClient:    at com.android.server.backup.transport.BackupTransportClient.getFutureResult(BackupTransportClient.java:377)
W BackupTransportClient:    at com.android.server.backup.transport.BackupTransportClient.requestBackupTime(BackupTransportClient.java:159)
W BackupTransportClient:    at com.android.server.backup.keyvalue.KeyValueBackupTask.revertTask(KeyValueBackupTask.java:1239)
W BackupTransportClient:    at com.android.server.backup.keyvalue.KeyValueBackupTask.run(KeyValueBackupTask.java:387)
W BackupTransportClient:    at java.lang.Thread.run(Thread.java:1012)
I KeyValueBackupTask: K/V backup pass finished
I NotificationBackupObserver: Backup finished 1/[redacted total]. Status: -1000
grote commented 11 months ago

Good find @t-m-w! I think this is the same issue we found when porting to Android 14: https://github.com/seedvault-app/seedvault/issues/564#issuecomment-1758222387

There's so many APKs to backup for this user and the connection is probably too slow to finish all of them within the transport timeout.

CalyxOS 5 bumped these timeouts, but they might still not be sufficient. @azarok for now you could disable APK backup settings, this should work around the issue. During restore, if Aurora/F-Droid are installed, you should be able to manually install these apps. Not great, but better than nothing.


Some extra bit from the log:

I BackupNotificationManager: 22/263 - 8% - Opt-out APK for [redacted package]
grote commented 11 months ago

Ticket that may help here: https://github.com/seedvault-app/seedvault/issues/583

t-m-w commented 11 months ago

I think it was trying to back up the app's data with key/value, but maybe I am reading it wrong?

In this case, though, I received word (and permission to share) that excluding Santander (uk.co.santander.santanderUK) allowed the backup to proceed.

azarok commented 10 months ago

As soon as I excluded the santander app, the backup worked flawlessly. Everything else operated without a hitch.

grote commented 6 months ago

Fixed by #628