Closed afflux closed 1 year ago
@grote: git blame pointed to https://github.com/nextcloud/android/commit/44227d828d117585408f101189c81c67a7810d4d - do you think this just needs a check for empty storage path?
@grote: git blame pointed to 44227d8 - do you think this just needs a check for empty storage path?
I notice that when the backup attempt initializes correctly for the first time that I have more success getting everything backed up afterwards
@afflux thanks for the in-depth debugging!
do you think this just needs a check for empty storage path?
I only helped with the DocumentsProvider, but don't know the internal of Nextcloud so well. If we need to check for null
and empty string, this should probably get added to the place you identified.
This might indeed be one of the ongoing issues with Nextcloud's DocumentsProvider implementation that you've found here.
⚠️ Before posting ⚠️
Steps to reproduce
Expected behaviour
Backup should work :-)
Actual behaviour
I've debugged this using frida. As you can see here, the first attempt to store .backup.metadata works:
But shortly after, the same file is written again, and this fails:
Note that
local=
is just the empty string, which is set, for example, here: https://github.com/nextcloud/android/blob/5836b300a2f15b9ee37894e30ddb84d04a0154ee/app/src/main/java/com/owncloud/android/operations/UploadFileOperation.java#L985-L991(also here: https://github.com/nextcloud/android/blob/5836b300a2f15b9ee37894e30ddb84d04a0154ee/app/src/main/java/com/owncloud/android/operations/UploadFileOperation.java#L1295-L1309)
I don't get why sometimes there is the empty string and sometimes it's set to null (it's not really documented). But most accessors in
OCFile
check for empty string. Not the DocumentStorageProvider, though: https://github.com/nextcloud/android/blob/5836b300a2f15b9ee37894e30ddb84d04a0154ee/app/src/main/java/com/owncloud/android/providers/DocumentsStorageProvider.java#L214Android version
13
Device brand and model
Google Pixel 4
Stock or custom OS?
Custom (explain in "additional information")
Nextcloud android app version
3.23.1
Nextcloud server version
25.0.3
Using a reverse proxy?
Yes
Android logs
nextcloud-logcat.txt
Server error logs
No response
Additional information
LineageOS 20