Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Nextcloud Backup stops working with createFile returned null #1426

Open
Bruceforce opened this issue Jul 14, 2024 · 6 comments
Open

[BUG] Nextcloud Backup stops working with createFile returned null #1426

Bruceforce opened this issue Jul 14, 2024 · 6 comments
Labels
bug A bug report

Comments

@Bruceforce
Copy link

Version

3.1

Source

Google Play

Vault encryption

Yes (with biometric unlock)

Device

Poco F2 Pro

Android version

12

ROM

No response

Steps to reproduce

  1. Enable Auto Backup.
  2. Configure a Nextcloud folder as target for the backups.
  3. Don't change anything for some time (sorry it's unclear to me what exactly triggers this)

What do you expect to happen?

Nextcloud backups should continue to work also if there was no backup in a few weeks.

What happens instead?

Nextcloud backups stop working after some time. I get an error com.beemdevelopment.aegis.vault.VaultManagerException: createFile returned null" if I click on Details.

Log

No response

@Bruceforce Bruceforce added the bug A bug report label Jul 14, 2024
@alexbakker
Copy link
Member

This is likely to be an issue at Nextcloud's end. It can't hurt to take a look at the logs to see if there's anything that points us in the right direction though.

Please capture a log using ADB while reproducing the issue and share it with us: https://github.com/beemdevelopment/Aegis/blob/master/CONTRIBUTING.md#bug-reports. Just Aegis' logs won't suffice, so please exclude the log filter for Aegis.

@Bruceforce
Copy link
Author

Will do. But it might take a time because I just "re-enabled" the backup granting access to the folder which usually fixes the issue for a couple of days. Once it comes back I'll capture some logs and post them here.

@Bruceforce
Copy link
Author

Hey @alexbakker I grabbed the debug log.
full-debug.log

@alexbakker
Copy link
Member

alexbakker commented Aug 21, 2024

Thanks. Relevant portion from the log:

08-11 12:09:16.890 14674 18746 I VaultBackupManager: Creating backup at content://org.nextcloud.documents/tree/083520c769d3fadce4db0d5a8f4ba118/2312/document/083520c769d3fadce4db0d5a8f4ba118/2312: aegis-backup-20240811-120916.json
08-11 12:09:16.894 14674 18746 E ActivityThread: Failed to find provider info for org.nextcloud.documents
08-11 12:09:16.894 14674 18746 W DocumentFile: Failed query: java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.database.Cursor.moveToNext()' on a null object reference
08-11 12:09:16.896 14674 18746 E ActivityThread: Failed to find provider info for org.nextcloud.documents
08-11 12:09:16.896 14674 18746 W DocumentsContract: Failed to create document
08-11 12:09:16.896 14674 18746 W DocumentsContract: java.lang.IllegalArgumentException: Unknown authority org.nextcloud.documents
08-11 12:09:16.896 14674 18746 W DocumentsContract: 	at android.content.ContentResolver.call(ContentResolver.java:2447)
08-11 12:09:16.896 14674 18746 W DocumentsContract: 	at android.provider.DocumentsContract.createDocument(DocumentsContract.java:1380)
08-11 12:09:16.896 14674 18746 W DocumentsContract: 	at androidx.documentfile.provider.TreeDocumentFile.createFile(SourceFile:23)
08-11 12:09:16.896 14674 18746 W DocumentsContract: 	at com.beemdevelopment.aegis.vault.VaultBackupManager.createBackup(SourceFile:88)
08-11 12:09:16.896 14674 18746 W DocumentsContract: 	at com.beemdevelopment.aegis.vault.VaultBackupManager$$ExternalSyntheticLambda0.run(SourceFile:12)
08-11 12:09:16.896 14674 18746 W DocumentsContract: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
08-11 12:09:16.896 14674 18746 W DocumentsContract: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
08-11 12:09:16.896 14674 18746 W DocumentsContract: 	at java.lang.Thread.run(Thread.java:1012)
08-11 12:09:16.896 14674 18746 E VaultBackupManager: Unable to create backup: com.beemdevelopment.aegis.vault.VaultRepositoryException: createFile returned null
08-11 12:09:16.897 14674 18746 W System.err: com.beemdevelopment.aegis.vault.VaultRepositoryException: createFile returned null
08-11 12:09:16.897 14674 18746 W System.err: 	at com.beemdevelopment.aegis.vault.VaultBackupManager.createBackup(SourceFile:346)
08-11 12:09:16.897 14674 18746 W System.err: 	at com.beemdevelopment.aegis.vault.VaultBackupManager$$ExternalSyntheticLambda0.run(SourceFile:12)
08-11 12:09:16.897 14674 18746 W System.err: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
08-11 12:09:16.897 14674 18746 W System.err: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
08-11 12:09:16.897 14674 18746 W System.err: 	at java.lang.Thread.run(Thread.java:1012)

In particular:

Failed to find provider info for org.nextcloud.documents

You do still have the Nextcloud app installed and are logged into it, right? And you didn't uninstall / reinstall Nextcloud in the mean time after you enabled automatic backups in Aegis?

@Bruceforce
Copy link
Author

You do still have the Nextcloud app installed and are logged into it, right?

Correct. Nextcloud works like normal and I'm still logged in when receiving the error. Don't know if this matters, but Nextcloud is only accessible if I'm connected via VPN to my network, but the Aegis backup fails also when I'm home.

And you didn't uninstall / reinstall Nextcloud in the mean time after you enabled automatic backups in Aegis?

Nope. Nextcloud was installed all the time. As mentioned initially it fails after some amount of time, but this happens every few weeks. That's why I provided the log so late.

@alexbakker
Copy link
Member

I'm not sure what could be going on here. I would have to dig into how document providers are managed by Android and what might cause Android to forget about one. Either way, I don't think there's anything we can do about it from Aegis' end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report
Projects
None yet
Development

No branches or pull requests

2 participants