seedvault-app / seedvault

A backup application for the Android Open Source Project.
1.31k stars 75 forks source link

File backup: Empty snapshots shown when none can be decrypted #804

Open donni-h opened 6 days ago

donni-h commented 6 days ago

Hey folks, so I've backed up apps and files from my device and it shows me that that 7Gb on the drive I saved the backup to were used. When I want to restore my files, it tells me that it cannot find any files to restore (even though it shows me it finds a backup on that page). Is there a way to retrieve those files manually and put them back onto my phone? I know this feature is in beta, but it would be nice if there was a way :)

grote commented 6 days ago

Thanks for the issue. The Discussions may be the better fit for such questions next time: https://github.com/seedvault-app/seedvault/discussions

When I want to restore my files, it tells me that it cannot find any files to restore (even though it shows me it finds a backup on that page).

Can you post a screenshot of that message, so we can understand better what is happening there?

donni-h commented 6 days ago

Absolutely! I am not sure if I am misinterpreting this view, but it looks as though it sees that there is a backup (apps restored just fine)

seedvault_screenshot

grote commented 6 days ago

Did you redact something from this screenshot or is the space above "2 days ago" empty for real?

Otherwise, yes there is one backup. Did you try tapping on that backup? If not, please do and report what happens when you do.

donni-h commented 6 days ago

no i did not redact anything, and yes that should be the same backup from which I restored my apps (2 days ago). When tapping on it, nothing happens

donni-h commented 6 days ago

I went ahead and recorded the backup process, this is GrapheneOS btw. I just fetched the latest OS image, since I had to bring my phone into repairs. So everything should be up to date OS-wise.

edit: also the second backup alsways appears for a split second and then disappears

https://github.com/user-attachments/assets/0235c472-f1b3-4821-90eb-eda054ee0773

grote commented 6 days ago

OK sounds like you found a bug then. On the main screen, there's three dots, taping on that brings up a menu with "Expert settings" and "About". Can you post a screenshot of the About screen, please? Scratch that, your ROM seems to have removed the About screen where the version number of the app would have been.

Then, after you tap on the backup and nothing happens, please go to expert settings and select "Save app log" and either post it here or mail it to t at grobox dot de.

donni-h commented 6 days ago

I've sent you an email, thanks for looking into this! :)

grote commented 6 days ago

Thanks! It looks like the reason why you can't restore is because Seedvault is set-up with a different recovery code. If your ROM has a new enough version, clearing all Seedvault app data and starting it again should allow you to re-enter the correct recovery code, but only do this, if there's nothing on the existing installation of Seedvault you can't lose.

Otherwise, this so far looks like a UI glitch that there's an empty clickable snapshot, even though it didn't find anything it could decrypt.

donni-h commented 6 days ago

But why can it decrypt the apps then? It should have come from the same password (same backup even). I haven't backed up anything on my (new) seedvault/phone yet. Does that mean I can safely set the password again? :)

grote commented 6 days ago

In the log, it seems it also can't decrypt some app backups. Did you maybe change your recovery code at some point or used a different one, on a different phone maybe?

donni-h commented 6 days ago

In the log, it seems it also can't decrypt some app backups. Did you maybe change your recovery code at some point or used a different one, on a different phone maybe?

This was the, I believe, first time I have used Seedvault and DEFINITELY the only time I actually did a backup. So those two things should've come from the same batch so to speak

grote commented 6 days ago

On the main screen, the second option is "Recovery Code". Can you please verify the recovery code you have written down there?

donni-h commented 6 days ago

On the main screen, the second option is "Recovery Code". Can you please verify the recovery code you have written down there?

should I generate a new one? I can either verify my current code or generate a new code

I just noticed, that I have a second code written down, the only thing I can think of is that maybe the files were backed up before I changed my code, but when I enter the second code, it tells me it is invalid. So there's that. But the first code (the one I entered today) seems valid.

grote commented 6 days ago

you could clear app data of seedvault and try restore with that other code that fails verification currently and see if this is able to restore file backups.

donni-h commented 6 days ago

you could clear app data of seedvault and try restore with that other code that fails verification currently and see if this is able to restore file backups.

This fixed it! I can now see two backups of my files. Thank you so much for taking the time. Silver lining seems to be that I unearthed a visual bug. :)