johannesjo / super-productivity

Super Productivity is an advanced todo list app with integrated Timeboxing and time tracking capabilities. It also comes with integrations for Jira, Gitlab, GitHub and Open Project.
http://super-productivity.com
MIT License
12k stars 933 forks source link

Bug: Android - LocalFile and Nextcloud Client Synchronization #3577

Open theatischbein opened 1 month ago

theatischbein commented 1 month ago

Moved from https://github.com/johannesjo/super-productivity-android/issues/58

Your Environment

Expected Behavior

Current Behavior

I want use the sync feature with my Nextcloud android client file system integration.

If I start with Sync disabled, I can select my folder and allow file access. Afterwards the file path is not shown, but the error "Needs file access permission".

If I enable Sync first, I can select my folder and allow file access. Afterwars I got the popup error in superproductivity: "Sync Local file permission denied. Your file permission for local syncing has been revoked." I can choose to disable to sync or to "Give permission". If I click "Give permission" I am back at the folder select and can do this in an endless loop.

Using a local folder does work, but I haven't found a way to automatically download files in a folder in Nextcloud client, only for AutoUpload. My idea for a work around was to use Android/media/com.nextcloud.client/nextcloud/[account]/path/ which does work, but not for fetching remote updates automatically.

Steps to Reproduce (for bugs)

First scenario

  1. Go to settings, open sync collapsable
  2. Disable Syncing
  3. Click on Sync Provider and select LocalFile
  4. In open folder select menu choose Nextcloud as source and your folder
  5. Click 'USE THIS FOLDER'
  6. Click on 'ALLOW' file access permission
  7. See the red error message 'Needs file access permission' instead of the file path

Second scenario

  1. Go to settings, open sync collapsable
  2. Enable Syncing
  3. Click on Sync Provider and select LocalFile
  4. In open folder select menu choose Nextcloud as source and your folder
  5. Click 'USE THIS FOLDER'
  6. Click on 'ALLOW' file access permission
  7. Popup back in superproductiviy appears. Click 'Disable Sync' to exit the loop. Click 'Give permission' to go back to step 4
  8. ... (looping)

Can you reproduce this reliably?

yes. I reinstalled the app multiple time from f-droid and GPlay Store and redproduce them in the clean installed environment

Console Output

Error Log (Desktop only)

github-actions[bot] commented 1 month ago

Thank you very much for opening up this issue! I am currently a bit overwhelmed by the many requests that arrive each week, so please forgive me, if I fail to respond personally. I am still very likely to at least skim read your request and I'll probably try to fix all (real) bugs if possible and I will likely review every single PR being made (please, give me a heads up if you intent to do so) and I will try to work on popular requests (please upvote via thumbs up on the original issue) whenever possible, but trying to respond to every single issue over the last years has been kind of draining and I need to adjust my approach for this project to remain fun for me and to make any progress with actually coding new stuff. Thanks for your understanding!

github-actions[bot] commented 1 month ago

Hello there theatischbein! 👋

Thank you and congratulations 🎉 for opening your very first issue in this project! 💖

In case you want to claim this issue, please comment down below! We will try to get back to you as soon as we can. 👀

For more open ended discussions and/or specific questions, please visit the discussions page. 💖

theatischbein commented 1 month ago

I tried to get something out of the logs when choosing the folder if sync is already enabled!

Click to expand for whole adb log
``` 10-14 11:07:32.946 2449 2449 D ShadeCarrierGroup: ignoring old pipeline callback because new mobile icon is enabled 10-14 11:07:33.109 20031 20111 D SuperProductivity: Before SimpleStorageHelper callback func def 10-14 11:07:33.114 20031 20111 D SuperProductivity: Get Storage Access permission 10-14 11:07:33.131 1612 12862 I ActivityTaskManager: START u0 {act=android.intent.action.OPEN_DOCUMENT_TREE cmp=com.android.documentsui/.picker.PickActivity (has extras)} with LAUNCH_MULTIPLE from uid 10289 (BAL_ALLOW_VISIBLE_WINDOW) result code=0 10-14 11:07:33.138 1612 1764 W libprocessgroup: SetCgroup::ExecuteForProcess: failed to open /dev/blkio//cgroup.procs: No such file or directory 10-14 11:07:33.138 1612 1697 I ActivityManager: Killing 18332:com.instagram.android:mqtt/u0a166 (adj 985): empty #17 10-14 11:07:33.139 1612 1697 I ActivityManager: Killing 19044:com.google.process.gservices/u0a157 (adj 985): empty #18 10-14 11:07:33.140 1612 1697 W ProcessStats: Tracking association SourceState{4d1f5bf system/1000 BFgs #1303724} whose proc state 4 is better than process ProcessState{e3aacc4 org.lineageos.profiles/10118 pkg=org.lineageos.profiles} proc state 14 (21 skipped) 10-14 11:07:33.153 1612 2225 D CompatibilityChangeReporter: Compat change id reported: 265195908; UID 10059; state: ENABLED 10-14 11:07:33.162 1168 1168 I BpBinder: onLastStrongRef automatically unlinking death recipients: 10-14 11:07:33.175 20031 20031 I chromium: [INFO:CONSOLE(240)] "immediate sync trigger I_PAUSE_APP", source: https://app.super-productivity.com/main-DUZ4F2RX.js (240) 10-14 11:07:33.176 20476 20476 D PickActivity: Created new state object: State{action=6, acceptMimes=[*/*], allowMultiple=false, localOnly=false, stack=DocumentStack{root=null, docStack=[], stackTouched=false}, dirConfigs={}, excludedAuthorities=[], openableOnly=false, restrictScopeStorage=true, sortModel=SortModel{dimensions={16908304=SortDimension{id=16908304, labelId=2131886447, dataType=0, sortCapability=0, defaultSortDirection=1, sortDirection=0, visibility=4}, 16908310=SortDimension{id=16908310, labelId=2131886441, dataType=0, sortCapability=3, defaultSortDirection=1, sortDirection=0, visibility=0}, 2131296436=SortDimension{id=2131296436, labelId=2131886434, dataType=1, sortCapability=3, defaultSortDirection=2, sortDirection=0, visibility=0}, 2131296508=SortDimension{id=2131296508, labelId=2131886438, dataType=0, sortCapability=3, defaultSortDirection=1, sortDirection=0, visibility=0}, 2131296776=SortDimension{id=2131296776, labelId=2131886444, dataType=1, sortCapability=3, defaultSortDirection=1, sortDirection=0, visibility=0}}, defaultDimensionId=0, sortedDimension=null}} 10-14 11:07:33.176 20476 20476 D DrawerController: Calculated drawer width:280.0 10-14 11:07:33.190 20476 20476 D AbstractActionHandler: launchToDocument() uri=content://com.android.externalstorage.documents/tree/primary%3ASupProd/document/primary%3ASupProd 10-14 11:07:33.191 20476 20476 D PickerActionHandler: Launched to initial uri. 10-14 11:07:33.196 20476 20476 E oid.documentsui: No package ID ff found for resource ID 0xffffffff. 10-14 11:07:33.201 20476 21601 D ProvidersAccess: Matched roots: [Root{userId=0, authority=com.termux.documents, rootId=/data/data/com.termux/files/home, title=Termux, isUsb=false, isSd=false, isMtp=false} @ content://com.termux.documents/root/%2Fdata%2Fdata%2Fcom.termux%2Ffiles%2Fhome, Root{userId=0, authority=org.nextcloud.documents, rootId=thea@cloud.xxx.xxx, title=Nextcloud, isUsb=false, isSd=false, isMtp=false} @ content://org.nextcloud.documents/root/thea%40cloud.xxx.xxx, Root{userId=0, authority=com.android.externalstorage.documents, rootId=primary, title=Málna, isUsb=false, isSd=false, isMtp=false} @ content://com.android.externalstorage.documents/root/primary] 10-14 11:07:33.207 20476 20476 E oid.documentsui: No package ID ff found for resource ID 0xffffffff. 10-14 11:07:33.212 20506 20521 E DatabaseUtils: Writing exception to parcel 10-14 11:07:33.212 20506 20521 E DatabaseUtils: android.os.ParcelableException: java.io.FileNotFoundException: Missing file for primary:SupProd at /storage/emulated/0/SupProd 10-14 11:07:33.212 20506 20521 E DatabaseUtils: at android.provider.DocumentsProvider.call(DocumentsProvider.java:1093) 10-14 11:07:33.212 20506 20521 E DatabaseUtils: at com.android.externalstorage.ExternalStorageProvider.call(ExternalStorageProvider.java:717) 10-14 11:07:33.212 20506 20521 E DatabaseUtils: at android.content.ContentProvider.call(ContentProvider.java:2704) 10-14 11:07:33.212 20506 20521 E DatabaseUtils: at android.content.ContentProvider$Transport.call(ContentProvider.java:633) 10-14 11:07:33.212 20506 20521 E DatabaseUtils: at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:307) 10-14 11:07:33.212 20506 20521 E DatabaseUtils: at android.os.Binder.execTransactInternal(Binder.java:1500) 10-14 11:07:33.212 20506 20521 E DatabaseUtils: at android.os.Binder.execTransact(Binder.java:1444) 10-14 11:07:33.212 20506 20521 E DatabaseUtils: Caused by: java.io.FileNotFoundException: Missing file for primary:SupProd at /storage/emulated/0/SupProd 10-14 11:07:33.212 20506 20521 E DatabaseUtils: at com.android.externalstorage.ExternalStorageProvider.buildFile(ExternalStorageProvider.java:518) 10-14 11:07:33.212 20506 20521 E DatabaseUtils: at com.android.externalstorage.ExternalStorageProvider.resolveDocId(ExternalStorageProvider.java:459) 10-14 11:07:33.212 20506 20521 E DatabaseUtils: at com.android.externalstorage.ExternalStorageProvider.findDocumentPath(ExternalStorageProvider.java:583) 10-14 11:07:33.212 20506 20521 E DatabaseUtils: at android.provider.DocumentsProvider.callUnchecked(DocumentsProvider.java:1270) 10-14 11:07:33.212 20506 20521 E DatabaseUtils: at android.provider.DocumentsProvider.call(DocumentsProvider.java:1091) 10-14 11:07:33.212 20506 20521 E DatabaseUtils: ... 6 more 10-14 11:07:33.212 1612 1652 D CoreBackPreview: Window{1d78a16 u0 com.android.documentsui/com.android.documentsui.picker.PickActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@c40f584, mPriority=0, mIsAnimationCallback=false} 10-14 11:07:33.213 20476 20526 W DocumentsContract: Failed to find path 10-14 11:07:33.213 20476 20526 W DocumentsContract: android.os.ParcelableException: java.io.FileNotFoundException: Missing file for primary:SupProd at /storage/emulated/0/SupProd 10-14 11:07:33.213 20476 20526 W DocumentsContract: at android.os.ParcelableException$1.createFromParcel(ParcelableException.java:82) 10-14 11:07:33.213 20476 20526 W DocumentsContract: at android.os.ParcelableException$1.createFromParcel(ParcelableException.java:79) 10-14 11:07:33.213 20476 20526 W DocumentsContract: at android.os.Parcel.readParcelableInternal(Parcel.java:5016) 10-14 11:07:33.213 20476 20526 W DocumentsContract: at android.os.Parcel.readParcelable(Parcel.java:4998) 10-14 11:07:33.213 20476 20526 W DocumentsContract: at android.os.Parcel.createExceptionOrNull(Parcel.java:3178) 10-14 11:07:33.213 20476 20526 W DocumentsContract: at android.os.Parcel.createException(Parcel.java:3167) 10-14 11:07:33.213 20476 20526 W DocumentsContract: at android.os.Parcel.readException(Parcel.java:3150) 10-14 11:07:33.213 20476 20526 W DocumentsContract: at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:202) 10-14 11:07:33.213 20476 20526 W DocumentsContract: at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:154) 10-14 11:07:33.213 20476 20526 W DocumentsContract: at android.content.ContentProviderProxy.call(ContentProviderNative.java:764) 10-14 11:07:33.213 20476 20526 W DocumentsContract: at android.content.ContentProviderClient.call(ContentProviderClient.java:601) 10-14 11:07:33.213 20476 20526 W DocumentsContract: at android.content.ContentResolver.call(ContentResolver.java:2456) 10-14 11:07:33.213 20476 20526 W DocumentsContract: at android.provider.DocumentsContract.findDocumentPath(DocumentsContract.java:1643) 10-14 11:07:33.213 20476 20526 W DocumentsContract: at com.android.documentsui.DocumentsAccess$RuntimeDocumentAccess.findDocumentPath(DocumentsAccess.java:147) 10-14 11:07:33.213 20476 20526 W DocumentsContract: at com.android.documentsui.LoadDocStackTask.run(LoadDocStackTask.java:80) 10-14 11:07:33.213 20476 20526 W DocumentsContract: at com.android.documentsui.LoadDocStackTask.run(LoadDocStackTask.java:45) 10-14 11:07:33.213 20476 20526 W DocumentsContract: at com.android.documentsui.base.CheckedTask.doInBackground(CheckedTask.java:65) 10-14 11:07:33.213 20476 20526 W DocumentsContract: at android.os.AsyncTask$3.call(AsyncTask.java:394) 10-14 11:07:33.213 20476 20526 W DocumentsContract: at java.util.concurrent.FutureTask.run(FutureTask.java:264) 10-14 11:07:33.213 20476 20526 W DocumentsContract: at com.android.documentsui.ProviderExecutor.run(ProviderExecutor.java:104) 10-14 11:07:33.213 20476 20526 W DocumentsContract: Caused by: java.io.FileNotFoundException: Missing file for primary:SupProd at /storage/emulated/0/SupProd 10-14 11:07:33.213 20476 20526 W DocumentsContract: at java.lang.reflect.Constructor.newInstance0(Native Method) 10-14 11:07:33.213 20476 20526 W DocumentsContract: at java.lang.reflect.Constructor.newInstance(Constructor.java:343) 10-14 11:07:33.213 20476 20526 W DocumentsContract: at android.os.ParcelableException.readFromParcel(ParcelableException.java:56) 10-14 11:07:33.213 20476 20526 W DocumentsContract: ... 20 more 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: Failed to build document stack for uri: content://com.android.externalstorage.documents/document/primary%3ASupProd 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: java.io.FileNotFoundException: Missing file for primary:SupProd at /storage/emulated/0/SupProd 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at java.lang.reflect.Constructor.newInstance0(Native Method) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at java.lang.reflect.Constructor.newInstance(Constructor.java:343) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at android.os.ParcelableException.readFromParcel(ParcelableException.java:56) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at android.os.ParcelableException$1.createFromParcel(ParcelableException.java:82) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at android.os.ParcelableException$1.createFromParcel(ParcelableException.java:79) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at android.os.Parcel.readParcelableInternal(Parcel.java:5016) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at android.os.Parcel.readParcelable(Parcel.java:4998) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at android.os.Parcel.createExceptionOrNull(Parcel.java:3178) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at android.os.Parcel.createException(Parcel.java:3167) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at android.os.Parcel.readException(Parcel.java:3150) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:202) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:154) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at android.content.ContentProviderProxy.call(ContentProviderNative.java:764) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at android.content.ContentProviderClient.call(ContentProviderClient.java:601) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at android.content.ContentResolver.call(ContentResolver.java:2456) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at android.provider.DocumentsContract.findDocumentPath(DocumentsContract.java:1643) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at com.android.documentsui.DocumentsAccess$RuntimeDocumentAccess.findDocumentPath(DocumentsAccess.java:147) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at com.android.documentsui.LoadDocStackTask.run(LoadDocStackTask.java:80) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at com.android.documentsui.LoadDocStackTask.run(LoadDocStackTask.java:45) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at com.android.documentsui.base.CheckedTask.doInBackground(CheckedTask.java:65) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at android.os.AsyncTask$3.call(AsyncTask.java:394) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at java.util.concurrent.FutureTask.run(FutureTask.java:264) 10-14 11:07:33.213 20476 20526 E LoadDocStackTask: at com.android.documentsui.ProviderExecutor.run(ProviderExecutor.java:104) 10-14 11:07:33.216 960 960 I Zygote : Process 19044 exited due to signal 9 (Killed) 10-14 11:07:33.216 20476 21608 I ProvidersCache: Provider returned no roots. Possibly naughty: at.bitfire.davdroid.webdav 10-14 11:07:33.219 1612 1759 I libprocessgroup: Removed cgroup /sys/fs/cgroup/uid_10166/pid_18332 10-14 11:07:33.219 1612 1759 I libprocessgroup: Removed cgroup /sys/fs/cgroup/uid_10157/pid_19044 10-14 11:07:33.219 960 960 I Zygote : Process 18332 exited due to signal 9 (Killed) 10-14 11:07:33.276 20031 20031 I chromium: [INFO:CONSOLE(418)] "sync(effect)..... I_PAUSE_APP", source: https://app.super-productivity.com/main-DUZ4F2RX.js (418) 10-14 11:07:33.291 20476 20476 E oid.documentsui: No package ID ff found for resource ID 0xffffffff. 10-14 11:07:33.297 20476 20476 D AbstractActionHandler: onLaunchStackLoaded() stack=null 10-14 11:07:33.297 20476 20476 W AbstractActionHandler: Failed to launch into the given uri. Launch to default location. 10-14 11:07:33.297 20476 20476 D PickerActionHandler: Attempting to load last used stack for calling package. 10-14 11:07:33.298 20476 21601 D ProvidersAccess: Matched roots: [Root{userId=0, authority=org.nextcloud.documents, rootId=thea@cloud.xxx.xxx, title=Nextcloud, isUsb=false, isSd=false, isMtp=false} @ content://org.nextcloud.documents/root/thea%40cloud.xxx.xxx, Root{userId=0, authority=com.termux.documents, rootId=/data/data/com.termux/files/home, title=Termux, isUsb=false, isSd=false, isMtp=false} @ content://com.termux.documents/root/%2Fdata%2Fdata%2Fcom.termux%2Ffiles%2Fhome, Root{userId=0, authority=com.android.externalstorage.documents, rootId=primary, title=Málna, isUsb=false, isSd=false, isMtp=false} @ content://com.android.externalstorage.documents/root/primary] 10-14 11:07:33.301 20476 20476 E oid.documentsui: No package ID ff found for resource ID 0xffffffff. 10-14 11:07:33.303 20476 20948 D ProvidersAccess: Matched roots: [Root{userId=0, authority=org.nextcloud.documents, rootId=thea@cloud.xxx.xxx, title=Nextcloud, isUsb=false, isSd=false, isMtp=false} @ content://org.nextcloud.documents/root/thea%40cloud.xxx.xxx, Root{userId=0, authority=com.termux.documents, rootId=/data/data/com.termux/files/home, title=Termux, isUsb=false, isSd=false, isMtp=false} @ content://com.termux.documents/root/%2Fdata%2Fdata%2Fcom.termux%2Ffiles%2Fhome, Root{userId=0, authority=com.android.externalstorage.documents, rootId=primary, title=Málna, isUsb=false, isSd=false, isMtp=false} @ content://com.android.externalstorage.documents/root/primary] 10-14 11:07:33.310 4993 7890 D DocumentsStorageProvider: queryDocument(), id=ce7bb7e07d7408712125e64ccbf9c308/1 10-14 11:07:33.311 1612 4400 W UserManagerService: Requested status bar icon for non-badged user 0 10-14 11:07:33.316 1612 2909 D ConnectivityService: requestNetwork for uid/pid:10114/2449 asUid: 10059 activeRequest: null callbackRequest: 42584 [NetworkRequest [ REQUEST id=42585, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10059 RequestorUid: 10114 RequestorPkg: com.android.systemui UnderlyingNetworks: Null] ]] callback flags: 0 order: 2147483647 10-14 11:07:33.318 1612 2347 D WifiNetworkFactory: got request NetworkRequest [ REQUEST id=42585, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10059 RequestorUid: 10114 RequestorPkg: com.android.systemui UnderlyingNetworks: Null] ] 10-14 11:07:33.318 1612 2357 D ConnectivityService: NetReassign [42585 : null → 672] [c 1] [a 0] [i 1] 10-14 11:07:33.318 1612 2347 D UntrustedWifiNetworkFactory: got request NetworkRequest [ REQUEST id=42585, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10059 RequestorUid: 10114 RequestorPkg: com.android.systemui UnderlyingNetworks: Null] ] 10-14 11:07:33.318 1612 2347 D OemPaidWifiNetworkFactory: got request NetworkRequest [ REQUEST id=42585, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10059 RequestorUid: 10114 RequestorPkg: com.android.systemui UnderlyingNetworks: Null] ] 10-14 11:07:33.318 1612 2347 D MultiInternetWifiNetworkFactory: got request NetworkRequest [ REQUEST id=42585, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10059 RequestorUid: 10114 RequestorPkg: com.android.systemui UnderlyingNetworks: Null] ] 10-14 11:07:33.321 1612 1693 I ActivityTaskManager: Displayed com.android.documentsui/.picker.PickActivity for user 0: +168ms 10-14 11:07:33.322 4993 21587 D DocumentsStorageProvider: queryDocument(), id=ce7bb7e07d7408712125e64ccbf9c308/2 10-14 11:07:33.323 4993 7890 D DocumentsStorageProvider: queryDocument(), id=ce7bb7e07d7408712125e64ccbf9c308/16 10-14 11:07:33.325 2449 2490 W Looper : Slow dispatch took 33ms wmshell.main h=android.os.Handler c=com.android.wm.shell.transition.Transitions$TransitionPlayerImpl$$ExternalSyntheticLambda0@2743646 m=0 10-14 11:07:33.326 4993 7890 D DocumentsStorageProvider: queryDocument(), id=ce7bb7e07d7408712125e64ccbf9c308/55 10-14 11:07:33.332 20476 20476 D DocumentStack: Resetting the whole darn stack to: DocumentStack{root=Root{userId=0, authority=org.nextcloud.documents, rootId=thea@cloud.xxx.xxx, title=Nextcloud, isUsb=false, isSd=false, isMtp=false} @ content://org.nextcloud.documents/root/thea%40cloud.xxx.xxx, docStack=[DocumentInfo{docId=ce7bb7e07d7408712125e64ccbf9c308/1, userId=0, name=/, mimeType=vnd.android.document/directory, isContainer=true, isDirectory=true, isArchive=false, isInArchive=false, isPartial=false, isVirtual=false, isDeleteSupported=true, isCreateSupported=true, isMoveSupported=true, isRenameSupported=true, isMetadataSupported=false, isBlockedFromTree=false} @ content://org.nextcloud.documents/document/ce7bb7e07d7408712125e64ccbf9c308%2F1, DocumentInfo{docId=ce7bb7e07d7408712125e64ccbf9c308/2, userId=0, name=Documents, mimeType=vnd.android.document/directory, isContainer=true, isDirectory=true, isArchive=false, isInArchive=false, isPartial=false, isVirtual=false, isDeleteSupported=true, isCreateSupported=true, isMoveSupported=true, isRenameSupported=true, isMetadataSupported=false, isBlockedFromTree=false} @ content://org.nextcloud.documents/document/ce7bb7e07d7408712125e64ccbf9c308%2F2, DocumentInfo{docId=ce7bb7e07d7408712125e64ccbf9c308/16, userId=0, name=Backup, mimeType=vnd.android.document/directory, isContainer=true, isDirectory=true, isArchive=false, isInArchive=false, isPartial=false, isVirtual=false, isDeleteSupported=true, isCreateSupported=true, isMoveSupported=true, isRenameSupported=true, isMetadataSupported=false, isBlockedFromTree=false} @ content://org.nextcloud.documents/document/ce7bb7e07d7408712125e64ccbf9c308%2F16, DocumentInfo{docId=ce7bb7e07d7408712125e64ccbf9c308/55, userId=0, name=superproductivity, mimeType=vnd.android.document/directory, isContainer=true, isDirectory=true, isArchive=false, isInArchive=false, isPartial=false, isVirtual=false, isDeleteSupported=true, isCreateSupported=true, isMoveSupported=true, isRenameSupported=true, isMetadataSupported=false, isBlockedFromTree=false} @ content://org.nextcloud.documents/document/ce7bb7e07d7408712125e64ccbf9c308%2F55], stackTouched=true} 10-14 11:07:33.332 20476 20476 E oid.documentsui: No package ID ff found for resource ID 0xffffffff. 10-14 11:07:33.332 20476 20476 D DocumentStack: Resetting the whole darn stack to: DocumentStack{root=Root{userId=0, authority=org.nextcloud.documents, rootId=thea@cloud.xxx.xxx, title=Nextcloud, isUsb=false, isSd=false, isMtp=false} @ content://org.nextcloud.documents/root/thea%40cloud.xxx.xxx, docStack=[DocumentInfo{docId=ce7bb7e07d7408712125e64ccbf9c308/1, userId=0, name=/, mimeType=vnd.android.document/directory, isContainer=true, isDirectory=true, isArchive=false, isInArchive=false, isPartial=false, isVirtual=false, isDeleteSupported=true, isCreateSupported=true, isMoveSupported=true, isRenameSupported=true, isMetadataSupported=false, isBlockedFromTree=false} @ content://org.nextcloud.documents/document/ce7bb7e07d7408712125e64ccbf9c308%2F1, DocumentInfo{docId=ce7bb7e07d7408712125e64ccbf9c308/2, userId=0, name=Documents, mimeType=vnd.android.document/directory, isContainer=true, isDirectory=true, isArchive=false, isInArchive=false, isPartial=false, isVirtual=false, isDeleteSupported=true, isCreateSupported=true, isMoveSupported=true, isRenameSupported=true, isMetadataSupported=false, isBlockedFromTree=false} @ content://org.nextcloud.documents/document/ce7bb7e07d7408712125e64ccbf9c308%2F2, DocumentInfo{docId=ce7bb7e07d7408712125e64ccbf9c308/16, userId=0, name=Backup, mimeType=vnd.android.document/directory, isContainer=true, isDirectory=true, isArchive=false, isInArchive=false, isPartial=false, isVirtual=false, isDeleteSupported=true, isCreateSupported=true, isMoveSupported=true, isRenameSupported=true, isMetadataSupported=false, isBlockedFromTree=false} @ content://org.nextcloud.documents/document/ce7bb7e07d7408712125e64ccbf9c308%2F16, DocumentInfo{docId=ce7bb7e07d7408712125e64ccbf9c308/55, userId=0, name=superproductivity, mimeType=vnd.android.document/directory, isContainer=true, isDirectory=true, isArchive=false, isInArchive=false, isPartial=false, isVirtual=false, isDeleteSupported=true, isCreateSupported=true, isMoveSupported=true, isRenameSupported=true, isMetadataSupported=false, isBlockedFromTree=false} @ content://org.nextcloud.documents/document/ce7bb7e07d7408712125e64ccbf9c308%2F55], stackTouched=true} 10-14 11:07:33.332 20476 20476 D DirectoryFragment: Showing directory: content://org.nextcloud.documents/document/ce7bb7e07d7408712125e64ccbf9c308%2F55 10-14 11:07:33.332 20476 20476 D DirectoryFragment: Creating new fragment for directory: content://org.nextcloud.documents/document/ce7bb7e07d7408712125e64ccbf9c308%2F55 10-14 11:07:33.333 20476 20476 W WindowOnBackDispatcher: OnBackInvokedCallback is not enabled for the application. 10-14 11:07:33.333 20476 20476 W WindowOnBackDispatcher: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest. 10-14 11:07:33.348 20476 20476 E oid.documentsui: No package ID ff found for resource ID 0xffffffff. 10-14 11:07:33.363 20476 20476 W SelectionTracker: Setting gestureTooltypes is likely to result in unexpected behavior. 10-14 11:07:33.364 20476 20476 D AbstractActionHandler: Creating new directory loader for: content://org.nextcloud.documents/document/ce7bb7e07d7408712125e64ccbf9c308%2F55 10-14 11:07:33.366 2782 2782 W FeatureConnection: getRegistrationTech: ImsRegistration is null 10-14 11:07:33.366 2782 2782 D PhoneSwitcherNetworkRequstListener: got request NetworkRequest [ REQUEST id=42585, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10059 RequestorUid: 10114 RequestorPkg: com.android.systemui UnderlyingNetworks: Null] ] 10-14 11:07:33.367 4993 21587 D DocumentsStorageProvider: queryChildDocuments(), id=ce7bb7e07d7408712125e64ccbf9c308/55 10-14 11:07:33.368 4993 21587 D FileDataStorageManager: getFolderContent - start 10-14 11:07:33.382 4993 21587 D FileDataStorageManager: getFolderContent - finished 10-14 11:07:33.394 4993 21613 D DocumentsStorageProvider: run ReloadFolderDocumentTask(), id=ce7bb7e07d7408712125e64ccbf9c308/55 10-14 11:07:33.398 20476 20476 D AbstractActionHandler: Loader has finished for: content://org.nextcloud.documents/document/ce7bb7e07d7408712125e64ccbf9c308%2F55 10-14 11:07:33.398 20476 20476 I Model : Updating model with new result set. 10-14 11:07:33.398 20476 20476 D DirectoryFragment: Received model update. Loading=true 10-14 11:07:33.398 20476 20476 D DefaultSelectionTracker: Ignoring onDataSetChange. No active selection. 10-14 11:07:33.400 4993 21613 D RefreshFolderOperation: Checking changes in thea@cloud.xxx.xxx/Documents/Backup/superproductivity/ 10-14 11:07:33.401 4993 21613 D OwnCloudClient #0: REQUEST PROPFIND /remote.php/dav/files/thea/Documents/Backup/superproductivity/ 10-14 11:07:33.417 2782 2782 W FeatureConnection: getRegistrationTech: ImsRegistration is null 10-14 11:07:33.438 20476 20476 D AbstractActionHandler: Creating new directory loader for: content://org.nextcloud.documents/document/ce7bb7e07d7408712125e64ccbf9c308%2F55 10-14 11:07:33.440 4993 7890 D DocumentsStorageProvider: queryChildDocuments(), id=ce7bb7e07d7408712125e64ccbf9c308/55 10-14 11:07:33.441 4993 7890 D FileDataStorageManager: getFolderContent - start 10-14 11:07:33.443 4993 7890 D FileDataStorageManager: getFolderContent - finished 10-14 11:07:33.453 4993 21614 D DocumentsStorageProvider: run ReloadFolderDocumentTask(), id=ce7bb7e07d7408712125e64ccbf9c308/55 10-14 11:07:33.453 1612 2276 I ImeTracker: com.android.documentsui:94856eec: onRequestHide at ORIGIN_SERVER reason HIDE_UNSPECIFIED_WINDOW fromUser false 10-14 11:07:33.453 1612 2276 I ImeTracker: com.android.documentsui:94856eec: onCancelled at PHASE_SERVER_SHOULD_HIDE 10-14 11:07:33.454 4993 21614 D RefreshFolderOperation: Checking changes in thea@cloud.xxx.xxx/Documents/Backup/superproductivity/ 10-14 11:07:33.456 20476 20476 D AbstractActionHandler: Loader has finished for: content://org.nextcloud.documents/document/ce7bb7e07d7408712125e64ccbf9c308%2F55 10-14 11:07:33.456 20476 20476 I Model : Updating model with new result set. 10-14 11:07:33.456 20476 20476 D DirectoryFragment: Received model update. Loading=true 10-14 11:07:33.456 20476 20476 D DefaultSelectionTracker: Ignoring onDataSetChange. No active selection. 10-14 11:07:33.456 4993 21614 D OwnCloudClient #0: REQUEST PROPFIND /remote.php/dav/files/thea/Documents/Backup/superproductivity/ 10-14 11:07:33.646 4993 21613 I RefreshFolderOperation: Checked thea@cloud.xxx.xxx/Documents/Backup/superproductivity/ : changed 10-14 11:07:33.647 4993 21614 I RefreshFolderOperation: Checked thea@cloud.xxx.xxx/Documents/Backup/superproductivity/ : changed 10-14 11:07:33.648 4993 21614 D OwnCloudClient #0: REQUEST PROPFIND /remote.php/dav/files/thea/Documents/Backup/superproductivity/ 10-14 11:07:33.648 4993 21613 D OwnCloudClient #0: REQUEST PROPFIND /remote.php/dav/files/thea/Documents/Backup/superproductivity/ 10-14 11:07:33.788 20031 20031 D VRI[FullscreenActivity]: visibilityChanged oldVisibility=true newVisibility=false 10-14 11:07:33.791 1612 2276 W UserManagerService: Requested status bar icon for non-badged user 0 10-14 11:07:33.792 1612 2276 W UserManagerService: Requested status bar icon for non-badged user 0 10-14 11:07:33.895 4993 21613 I ReadFolderRemoteOperation: Synchronized /Documents/Backup/superproductivity/: Operation finished with HTTP status code 207 (success) 10-14 11:07:33.895 4993 21613 D RefreshFolderOperation: Refresh folder thea@cloud.xxx.xxx/Documents/Backup/superproductivity/ 10-14 11:07:33.895 4993 21613 D RefreshFolderOperation: Refresh folder with remote id00518452ocmnh2pks8dp 10-14 11:07:33.896 4993 21613 D RefreshFolderOperation: Remote folder /Documents/Backup/superproductivity/ changed - starting update of local data 10-14 11:07:33.900 4993 21613 D FileDataStorageManager: getFolderContent - start 10-14 11:07:33.901 4993 21613 D FileDataStorageManager: getFolderContent - finished 10-14 11:07:33.902 4993 21613 E RefreshFolderOperation: DecryptedMetadata for file 343 not found! 10-14 11:07:33.903 4993 21613 E RefreshFolderOperation: DecryptedMetadata for file 344 not found! 10-14 11:07:33.904 4993 21613 E RefreshFolderOperation: DecryptedMetadata for file 76 not found! 10-14 11:07:33.904 4993 21613 E RefreshFolderOperation: DecryptedMetadata for file 55 not found! 10-14 11:07:33.904 4993 21613 D FileDataStorageManager: Saving folder /Documents/Backup/superproductivity/ with 3 children and 0 files to remove 10-14 11:07:33.906 4993 21613 D FileDataStorageManager: Sending 4 operations to FileContentProvider 10-14 11:07:33.906 4993 21613 D FileContentProvider: applying batch in provider com.owncloud.android.providers.FileContentProvider@8e3bc6d (temporary: false) 10-14 11:07:33.910 4993 21614 I ReadFolderRemoteOperation: Synchronized /Documents/Backup/superproductivity/: Operation finished with HTTP status code 207 (success) 10-14 11:07:33.911 4993 21614 D RefreshFolderOperation: Refresh folder thea@cloud.xxx.xxx/Documents/Backup/superproductivity/ 10-14 11:07:33.911 4993 21614 D RefreshFolderOperation: Refresh folder with remote id00518452ocmnh2pks8dp 10-14 11:07:33.912 4993 21614 D RefreshFolderOperation: Remote folder /Documents/Backup/superproductivity/ changed - starting update of local data 10-14 11:07:33.915 4993 21614 D FileDataStorageManager: getFolderContent - start 10-14 11:07:33.916 4993 21614 D FileDataStorageManager: getFolderContent - finished 10-14 11:07:33.918 4993 21614 E RefreshFolderOperation: DecryptedMetadata for file 343 not found! 10-14 11:07:33.919 4993 21614 E RefreshFolderOperation: DecryptedMetadata for file 344 not found! 10-14 11:07:33.919 4993 21613 D FileContentProvider: applied batch in provider com.owncloud.android.providers.FileContentProvider@8e3bc6d 10-14 11:07:33.920 4993 21614 E RefreshFolderOperation: DecryptedMetadata for file 76 not found! 10-14 11:07:33.920 4993 21614 E RefreshFolderOperation: DecryptedMetadata for file 55 not found! 10-14 11:07:33.920 4993 21614 D FileDataStorageManager: Saving folder /Documents/Backup/superproductivity/ with 3 children and 0 files to remove 10-14 11:07:33.922 4993 21614 D FileDataStorageManager: Sending 4 operations to FileContentProvider 10-14 11:07:33.922 4993 21614 D FileContentProvider: applying batch in provider com.owncloud.android.providers.FileContentProvider@8e3bc6d (temporary: false) 10-14 11:07:33.925 4993 21613 D RefreshFolderOperation: Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED 10-14 11:07:33.925 4993 21613 D RefreshFolderOperation: Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED 10-14 11:07:33.933 4993 21614 D FileContentProvider: applied batch in provider com.owncloud.android.providers.FileContentProvider@8e3bc6d 10-14 11:07:33.939 4993 21614 D RefreshFolderOperation: Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED 10-14 11:07:33.940 4993 21614 D RefreshFolderOperation: Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED 10-14 11:07:33.942 20476 20476 D Documents: Content updated. 10-14 11:07:33.942 20476 20476 D ContentLock: run when unlock, is locked : false 10-14 11:07:33.945 4993 7890 D DocumentsStorageProvider: queryChildDocuments(), id=ce7bb7e07d7408712125e64ccbf9c308/55 10-14 11:07:33.946 4993 7890 D FileDataStorageManager: getFolderContent - start 10-14 11:07:33.946 4993 7890 D FileDataStorageManager: getFolderContent - finished 10-14 11:07:33.950 20476 20476 D AbstractActionHandler: Loader has finished for: content://org.nextcloud.documents/document/ce7bb7e07d7408712125e64ccbf9c308%2F55 10-14 11:07:33.951 20476 20476 I Model : Updating model with new result set. 10-14 11:07:33.951 20476 20476 D DirectoryFragment: Received model update. Loading=false 10-14 11:07:33.951 20476 20476 D DefaultSelectionTracker: Ignoring onDataSetChange. No active selection. 10-14 11:07:34.336 20476 20476 W WindowOnBackDispatcher: OnBackInvokedCallback is not enabled for the application. 10-14 11:07:34.336 20476 20476 W WindowOnBackDispatcher: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest. 10-14 11:07:34.375 1612 1652 D CoreBackPreview: Window{ee4abfe u0 com.android.documentsui/com.android.documentsui.picker.PickActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@27e18f1, mPriority=0, mIsAnimationCallback=false} 10-14 11:07:35.333 20476 20476 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=falsecallback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@95e8362 10-14 11:07:35.333 1612 1652 D CoreBackPreview: Window{ee4abfe u0 com.android.documentsui/com.android.documentsui.picker.PickActivity}: Setting back callback null 10-14 11:07:35.335 20476 20507 D HWUI : endAllActiveAnimators on 0x72dcf83650 (RippleDrawable) with handle 0x732ced46e0 10-14 11:07:35.337 1612 2276 W InputManager-JNI: Input channel object 'ee4abfe com.android.documentsui/com.android.documentsui.picker.PickActivity (client)' was disposed without first being removed with the input manager! 10-14 11:07:35.346 20476 20476 D PickerActionHandler: onFinished() [content://org.nextcloud.documents/tree/ce7bb7e07d7408712125e64ccbf9c308%2F55] 10-14 11:07:35.351 20476 20476 W WindowOnBackDispatcher: OnBackInvokedCallback is not enabled for the application. 10-14 11:07:35.351 20476 20476 W WindowOnBackDispatcher: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest. 10-14 11:07:35.359 1612 1764 W libprocessgroup: SetCgroup::ExecuteForProcess: failed to open /dev/blkio//cgroup.procs: No such file or directory 10-14 11:07:35.360 1612 1764 W libprocessgroup: SetCgroup::ExecuteForProcess: failed to open /dev/blkio//cgroup.procs: No such file or directory 10-14 11:07:35.368 4993 7890 D DocumentsStorageProvider: queryDocument(), id=ce7bb7e07d7408712125e64ccbf9c308/55 10-14 11:07:35.375 4993 7890 D DocumentsStorageProvider: queryDocument(), id=ce7bb7e07d7408712125e64ccbf9c308/55 10-14 11:07:35.375 1612 2909 I ImeTracker: com.android.documentsui:dfdae6e: onRequestHide at ORIGIN_SERVER reason HIDE_SAME_WINDOW_FOCUSED_WITHOUT_EDITOR fromUser false 10-14 11:07:35.375 1612 2909 I ImeTracker: com.android.documentsui:dfdae6e: onCancelled at PHASE_SERVER_SHOULD_HIDE 10-14 11:07:35.378 4993 7890 D DocumentsStorageProvider: queryDocument(), id=ce7bb7e07d7408712125e64ccbf9c308/55 10-14 11:07:35.383 20031 20031 D SuperProductivity: Success Folder Pick! Now saving... 10-14 11:07:35.384 20031 20031 D SuperProductivity: onActivityResult 10-14 11:07:35.419 20031 20111 D SuperProductivity: isGrantedFilePermission grantedPaths: {} 10-14 11:07:35.421 20031 20031 I chromium: [INFO:CONSOLE(240)] "immediate sync trigger I_RESUME_APP", source: https://app.super-productivity.com/main-DUZ4F2RX.js (240) 10-14 11:07:35.422 1612 1697 I ActivityManager: Killing 20000:com.google.android.projection.gearhead:car/u0a150 (adj 965): empty #17 10-14 11:07:35.425 1612 2909 W UserManagerService: Requested status bar icon for non-badged user 0 10-14 11:07:35.428 1612 1652 D ConnectivityService: requestNetwork for uid/pid:10114/2449 asUid: 10289 activeRequest: null callbackRequest: 42586 [NetworkRequest [ REQUEST id=42587, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10289 RequestorUid: 10114 RequestorPkg: com.android.systemui UnderlyingNetworks: Null] ]] callback flags: 0 order: 2147483647 10-14 11:07:35.437 1612 2347 D WifiNetworkFactory: got request NetworkRequest [ REQUEST id=42587, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10289 RequestorUid: 10114 RequestorPkg: com.android.systemui UnderlyingNetworks: Null] ] 10-14 11:07:35.445 1612 2347 D UntrustedWifiNetworkFactory: got request NetworkRequest [ REQUEST id=42587, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10289 RequestorUid: 10114 RequestorPkg: com.android.systemui UnderlyingNetworks: Null] ] 10-14 11:07:35.445 1612 2347 D OemPaidWifiNetworkFactory: got request NetworkRequest [ REQUEST id=42587, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10289 RequestorUid: 10114 RequestorPkg: com.android.systemui UnderlyingNetworks: Null] ] 10-14 11:07:35.446 1612 2347 D MultiInternetWifiNetworkFactory: got request NetworkRequest [ REQUEST id=42587, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10289 RequestorUid: 10114 RequestorPkg: com.android.systemui UnderlyingNetworks: Null] ] 10-14 11:07:35.446 1612 2357 D ConnectivityService: NetReassign [42587 : null → 672] [c 1] [a 0] [i 15] 10-14 11:07:35.460 1612 2909 I ImeTracker: com.superproductivity.superproductivity:2bb4e42b: onRequestHide at ORIGIN_SERVER reason HIDE_UNSPECIFIED_WINDOW fromUser false 10-14 11:07:35.460 1612 2909 I ImeTracker: com.superproductivity.superproductivity:2bb4e42b: onCancelled at PHASE_SERVER_SHOULD_HIDE 10-14 11:07:35.473 2449 2490 W Looper : Slow dispatch took 52ms wmshell.main h=android.os.Handler c=com.android.wm.shell.transition.Transitions$TransitionPlayerImpl$$ExternalSyntheticLambda0@c198ac1 m=0 10-14 11:07:35.478 2782 2782 W FeatureConnection: getRegistrationTech: ImsRegistration is null 10-14 11:07:35.478 2782 2782 D PhoneSwitcherNetworkRequstListener: got request NetworkRequest [ REQUEST id=42587, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10289 RequestorUid: 10114 RequestorPkg: com.android.systemui UnderlyingNetworks: Null] ] 10-14 11:07:35.493 1612 1759 I libprocessgroup: Removed cgroup /sys/fs/cgroup/uid_10150/pid_20000 10-14 11:07:35.494 960 960 I Zygote : Process 20000 exited due to signal 9 (Killed) 10-14 11:07:35.495 1612 1694 D DisplayManagerService: Drop pending events for gone uid 10150 10-14 11:07:35.522 20031 20031 I chromium: [INFO:CONSOLE(418)] "sync(effect)..... I_RESUME_APP", source: https://app.super-productivity.com/main-DUZ4F2RX.js (418) 10-14 11:07:35.529 2782 2782 W FeatureConnection: getRegistrationTech: ImsRegistration is null 10-14 11:07:04.635 0 0 W : IRQ6 no longer affine to CPU6 10-14 11:07:35.685 1168 1168 I BpBinder: onLastStrongRef automatically unlinking death recipients: 10-14 11:07:35.942 20476 20476 D VRI[PickActivity]: visibilityChanged oldVisibility=true newVisibility=false 10-14 11:07:35.968 1612 1652 W UserManagerService: Requested status bar icon for non-badged user 0 10-14 11:07:35.970 1612 2276 W UserManagerService: Requested status bar icon for non-badged user 0 10-14 11:07:35.977 20476 20476 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=falsecallback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@945b0f1 10-14 11:07:35.977 1612 2276 D CoreBackPreview: Window{1d78a16 u0 com.android.documentsui/com.android.documentsui.picker.PickActivity}: Setting back callback null 10-14 11:07:35.985 1612 2276 W InputManager-JNI: Input channel object '1d78a16 com.android.documentsui/com.android.documentsui.picker.PickActivity (client)' was disposed without first being removed with the input manager! ```

If sync is disabled and I select an nextcloud folder I get this logs

10-14 11:46:39.765 20476 20476 D PickerActionHandler: onFinished() [content://org.nextcloud.documents/tree/ce7bb7e07d7408712125e64ccbf9c308%2F55]
10-14 11:46:39.771 20476 20476 W WindowOnBackDispatcher: OnBackInvokedCallback is not enabled for the application.
10-14 11:46:39.771 20476 20476 W WindowOnBackDispatcher: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
10-14 11:46:39.780  1612  1764 W libprocessgroup: SetCgroup::ExecuteForProcess: failed to open /dev/blkio//cgroup.procs: No such file or directory
10-14 11:46:39.780  1612  1764 W libprocessgroup: SetCgroup::ExecuteForProcess: failed to open /dev/blkio//cgroup.procs: No such file or directory
10-14 11:46:39.793  4993  7890 D DocumentsStorageProvider: queryDocument(), id=ce7bb7e07d7408712125e64ccbf9c308/55
10-14 11:46:39.799  4993  7890 D DocumentsStorageProvider: queryDocument(), id=ce7bb7e07d7408712125e64ccbf9c308/55
10-14 11:46:39.804  4993  7890 D DocumentsStorageProvider: queryDocument(), id=ce7bb7e07d7408712125e64ccbf9c308/55
10-14 11:46:39.810 20031 20031 D SuperProductivity: Success Folder Pick! Now saving...
10-14 11:46:39.810 20031 20031 D SuperProductivity: onActivityResult
10-14 11:46:39.837 20031 20111 D SuperProductivity: isGrantedFilePermission grantedPaths: {}
10-14 11:46:39.843 20031 20031 I chromium: [INFO:CONSOLE(368)] "Checking file access permission for android false", source: https://app.super-productivity.com/main-DUZ4F2RX.js (368)
10-14 11:46:39.849  1612  2658 W UserManagerService: Requested status bar icon for non-badged user 0
10-14 11:46:39.850 20031 20111 D SuperProductivity: isGrantedFilePermission grantedPaths: {}
10-14 11:46:39.853 20031 20031 I chromium: [INFO:CONSOLE(368)] "Granted file access permission for android", source: https://app.super-productivity.com/main-DUZ4F2RX.js (368)
10-14 11:46:39.853 20031 20111 D SuperProductivity: allowedFolderPath grantedPaths: {}
10-14 11:46:39.853 20031 20111 D SuperProductivity: allowedFolderPath filesyncFolder: /storage
10-14 11:46:39.853 20031 20111 D SuperProductivity: allowedFolderPath folderPath.isNotEmpty(): true pathGranted: false
10-14 11:46:39.855 20031 20111 D SuperProductivity: isGrantedFilePermission grantedPaths: {}
10-14 11:46:39.856 20031 20031 I chromium: [INFO:CONSOLE(368)] "Checking file access permission for android false", source: https://app.super-productivity.com/main-DUZ4F2RX.js (368)
10-14 11:46:39.856 20031 20111 D SuperProductivity: isGrantedFilePermission grantedPaths: {}
10-14 11:46:39.856  1612 11266 D ConnectivityService: requestNetwork for uid/pid:10114/2449 asUid: 10289 activeRequest: null callbackRequest: 42659 [NetworkRequest [ REQUEST id=42660, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10289 RequestorUid: 10114 RequestorPkg: com.android.systemui UnderlyingNetworks: Null] ]] callback flags: 0 order: 2147483647
10-14 11:46:39.867 20031 20111 D SuperProductivity: isGrantedFilePermission grantedPaths: {}
10-14 11:46:39.869 20031 20111 D SuperProductivity: allowedFolderPath grantedPaths: {}
10-14 11:46:39.870 20031 20111 D SuperProductivity: allowedFolderPath filesyncFolder: /storage
10-14 11:46:39.870 20031 20111 D SuperProductivity: allowedFolderPath folderPath.isNotEmpty(): true pathGranted: false
theatischbein commented 1 month ago

I get a prototype to work!

The problem ist that for sp.getString("filesyncFolder", "") an absolute file path is used and stored. This works for local files but not other mounted file systems.

My approach is to keep it at at the DocumentFile level:

                val fpath = root.uri.toString()
                // Open preferences to save folder to path
                val sp = activity.getPreferences(Context.MODE_PRIVATE)
                sp.edit().putString("filesyncFolder", fpath).apply()

When reading and writing a File I parse the URI from the preferences.

            val sp = activity.getPreferences(Context.MODE_PRIVATE)
            val folderPath = sp.getString("filesyncFolder", "") ?: ""
            val folder = DocumentFile.fromTreeUri(activity, Uri.parse(folderPath))
            var file = folder?.findFile(filePath)

It is not fully worked out, but if you @johannesjo I can try to prepare an pull request.

Let me if you are interessted :)

johannesjo commented 1 month ago

Hey there! Thank you very much for digging into this! So far I was not able to reproduce the behavior. Since you mentioned the problem being caused by mounted file systems I tried using the sd card as target, but all seems to work fine.

May I ask, what you mean by nextcloud folder? Is that something the nextcloud android app creates?

Nevertheless making mounted file systems work better sounds like something we should do :)

@jiongxuan do you agree? Would be great to have your input on this!

jiongxuan commented 1 month ago

Hey, @johannesjo and @theatischbein,

Thanks for looping me in!

First off, I should mention that I haven’t personally used Nextcloud, so my response here is more focused on general Android behavior.

That being said, there are a few things to consider. I’d like to ask which Android version you’re using, @johannesjo.

Starting from Android 10+, Google introduced Scoped Storage, which changed how apps access external storage and manage file permissions. Different Android versions may behave differently, especially when dealing with mounted file systems like Nextcloud.

In my experience, Android file paths generally work well for sandboxed directories, but for external applications (like Nextcloud), it’s best to use DocumentsProvider URIs instead of absolute file paths (even when accessed through DocumentFile). This approach helps avoid permission issues and is more robust across different Android versions.

As for the pull request, I’ve had a look and everything seems well-written. I’d recommend testing it thoroughly to make sure it works in all scenarios, and if everything checks out, we could aim to include this in the next version after the current Capacitor updates.

Feel free to reach out if you have any questions!

jiongxuan commented 1 month ago

BTW: @johannesjo @theatischbein

I’ve reviewed the PR, and overall it’s well-done! However, there’s one important point regarding file access permissions that needs attention, especially considering the changes introduced in Android 11 (API level 30) and beyond.

Starting from Android 11, WRITE_EXTERNAL_STORAGE has been deprecated, and apps can no longer request it. Even if the app already has READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE permissions, they are not enough to handle files accessed via DocumentsProvider, like the Nextcloud folder.

To properly handle access to external files, especially mounted file systems like Nextcloud, we need to request URI-based permissions using:

val takeFlags: Int = (Intent.FLAG_GRANT_READ_URI_PERMISSION
                      or Intent.FLAG_GRANT_WRITE_URI_PERMISSION)
contentResolver.takePersistableUriPermission(uri, takeFlags)

This ensures the app can retain access to the selected folder or file even after being restarted. Without this, the app will lose access to the files once it’s closed or the device is restarted, leading to potential permission issues in future file operations.

For Android versions prior to 11, you can still declare WRITE_EXTERNAL_STORAGE and READ_EXTERNAL_STORAGE as before.

Overall, the PR looks great! I’d recommend adding this persistable permission handling and thoroughly testing it on newer Android versions.

johannesjo commented 1 month ago

I’d like to ask which Android version you’re using, @johannesjo.

I've got a pixel 5 with android version 14.

Thank you very much for your input! @jiongxuan

@theatischbein could you make the adjustment that @jiongxuan suggested?

theatischbein commented 1 month ago

@johannesjo @jiongxuan yes I will create an PR this weekend with the changes!

Thanks for your feedback :)