Folder sync on android not including subfolders

My issue

I want to automatically sync certain folders including subfolders and all files within from my server to my android client.

Unfortunately only files directly included in this folder will appear on my android device.
Any files in subfolders are not included.

If I sync those folders to my windows PC, all child files and folders are synced just as expected.

My setup

I’m running my own nextcloud AIO server in version 28.0.2 on a linux server.

On my android device i run the offical play store client in the current version 3.28.0.
I also have reinstalled the client recently in order to be sure that my issues are not any legacy issues.

The example is from an external storage folder, but I have exactly the same issues with normal folders.

I’ve run a occ scan, cleanup and repair-tree in order to be sure that this is not the reason.

The logs

This shows my logs (via adb’s logcat) while i initiated a new sync on the folder /BOOKS/EBOOKS

03-10 11:55:13.020  9974  9974 D OplusSystemUINavigationGesture: [GESTURE_BUTTON] swipe from 1
03-10 11:55:13.020  9974  9974 D OplusSystemUINavigationGesture: [GESTURE_BUTTON] Hit Gesture Region !
03-10 11:55:13.104  9974  9974 W OnBackInvokedCallback: OnBackInvokedCallback is not enabled for the application.
03-10 11:55:13.104  9974  9974 W OnBackInvokedCallback: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
03-10 11:55:13.130  9974  9974 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-10 11:55:13.130  9974  9974 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-10 11:55:13.130  9974  9974 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-10 11:55:13.151  9974  9974 D WindowManager: Add to mViews: DecorView@5b31d89[FileDisplayActivity],pkg= com.nextcloud.client
03-10 11:55:13.155  9974 10225 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/EBOOKS/
03-10 11:55:13.173  9974 10225 D FileDataStorageManager: getFolderContent - start
03-10 11:55:13.178  9974  9974 D InputEventReceiver: Input log is disabled
03-10 11:55:13.180  9974  9974 I Quality : Skipped: false 1 cost 19.072596 refreshRate 11180600 bit true processName com.nextcloud.client
03-10 11:55:13.181  9974  9974 W OnBackInvokedCallback: OnBackInvokedCallback is not enabled for the application.
03-10 11:55:13.181  9974  9974 W OnBackInvokedCallback: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
03-10 11:55:13.199  9974  9974 D BufferQueueConsumer: [](id:26f60000000e,api:0,p:-1,c:9974) connect: controlledByApp=false
03-10 11:55:13.200  9974  9974 V ZoomWindowDecorView: setLastReportedMergedConfiguration mZoomDisplayHeight: 2400 getDecorView.95624585
03-10 11:55:13.204  9974  9974 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-10 11:55:13.204  9974  9974 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-10 11:55:13.204  9974  9974 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-10 11:55:13.210  9974  9974 D VRI[FileDisplayActivity]: registerCallbacksForSync syncBuffer=false
03-10 11:55:13.229  9974  9904 D BLASTBufferQueue: [VRI[FileDisplayActivity]#14](f:0,a:1) acquireNextBufferLocked size=1272x2592 mFrameNumber=1 applyTransaction=true mTimestamp=122633569096154(auto) mPendingTransactions.size=0 graphicBufferId=42838003810373 transform=0
03-10 11:55:13.230  9974  9904 D VRI[FileDisplayActivity]: Received frameCommittedCallback lastAttemptedDrawFrameNum=1 didProduceBuffer=true syncBuffer=false
03-10 11:55:13.232  9974  9904 W Parcel  : Expecting binder but got null!
03-10 11:55:13.233  9974  9974 D VRI[FileDisplayActivity]: draw finished.
03-10 11:55:13.233  9974  9974 D VRI[FileDisplayActivity]: onFocusEvent false
03-10 11:55:13.234  9974  9974 I Quality : Skipped: false 4 cost 50.36988 refreshRate 11191195 bit true processName com.nextcloud.client
03-10 11:55:13.242  9974  9974 D VRI[FileDisplayActivity]: registerCallbacksForSync syncBuffer=false
03-10 11:55:13.252  9974  9904 D VRI[FileDisplayActivity]: Received frameCommittedCallback lastAttemptedDrawFrameNum=3 didProduceBuffer=true syncBuffer=false
03-10 11:55:13.252  9974  9974 D VRI[FileDisplayActivity]: draw finished.
03-10 11:55:13.290  9974  9974 D VRI[FileDisplayActivity]: onFocusEvent true
03-10 11:55:13.340  9974 10225 D FileDataStorageManager: getFolderContent - finished
03-10 11:55:13.349  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/EBOOKS available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:13.366  9974  9974 I Quality : Skipped: false 1 cost 14.551449 refreshRate 11184221 bit true processName com.nextcloud.client
03-10 11:55:20.264  9974  9974 V AutofillManager: requestHideFillUi(null): anchor = null
03-10 11:55:20.436  9974  9974 D OplusScrollToTopManager: unregisterGuidePopupDismissReceiverInSystemUI
03-10 11:55:20.436  9974  9974 D OplusScrollToTopManager: Receiver not registered: android.view.OplusScrollToTopManager$1@3e3e9d9
03-10 11:55:20.437  9974  9974 D OplusScrollToTopManager: unregisterSystemUIBroadcastReceiver 
03-10 11:55:20.437  9974  9974 D OplusScrollToTopManager: java.lang.IllegalArgumentException: Receiver not registered: android.view.OplusScrollToTopManager$2@20df9e
03-10 11:55:20.444  9974  9974 V ZoomWindowDecorView: removeZoomView
03-10 11:55:20.447  9974  9904 D OpenGLRenderer: endAllActiveAnimators on 0xb400007b64c70a00 (RippleDrawable) with handle 0xb400007b4606d720
03-10 11:55:20.469  9974  9974 W OnBackInvokedCallback: OnBackInvokedCallback is not enabled for the application.
03-10 11:55:20.469  9974  9974 W OnBackInvokedCallback: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
03-10 11:55:20.469  9974  9974 I Quality : Skipped: true 4 cost 45.458393 refreshRate 11183774 bit true processName com.nextcloud.client
03-10 11:55:20.470  9974  9974 D OperationsService: Starting command with id 4
03-10 11:55:20.474  9974 15000 D BLASTBufferQueue: [VRI[FileDisplayActivity]#14](f:0,a:1) destructor()
03-10 11:55:20.474  9974 15000 D BufferQueueConsumer: [VRI[FileDisplayActivity]#14(BLAST Consumer)14](id:26f60000000e,api:0,p:-1,c:9974) disconnect
03-10 11:55:20.477  9974  9986 D SynchronizeFolderOperation: Checking changes in jenoe@storage.stenitzer.org/BOOKS/EBOOKS/
03-10 11:55:20.480  9974  9974 D FileDataStorageManager: getFolderContent - start
03-10 11:55:20.485  9974  9974 D FileDataStorageManager: getFolderContent - finished
03-10 11:55:20.490  9974  9986 D OwnCloudClient #0: REQUEST PROPFIND /remote.php/dav/files/jenoe/BOOKS/EBOOKS/
03-10 11:55:20.499  9974  9974 D VRI[FileDisplayActivity]: onFocusEvent true
03-10 11:55:20.499  9974  9974 I Quality : Skipped: false 1 cost 18.875364 refreshRate 11193535 bit true processName com.nextcloud.client
03-10 11:55:20.505  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/AUDIOBOOK available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:20.516  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/AUDIOBOOK/
03-10 11:55:20.521  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/AUDIOBOOK-NON-FICTION available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:20.531  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/AUDIOBOOK-NON-FICTION/
03-10 11:55:20.537  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/EBOOKS available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:20.548  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/EBOOKS-COOKING available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:20.559  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/EBOOKS-COOKING/
03-10 11:55:20.565  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/EBOOKS-NON-FICTION available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:20.581  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/EBOOKS-NON-FICTION/
03-10 11:55:20.586  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/EBOOKS-TRAVEL available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:20.596  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/EBOOKS-TRAVEL/
03-10 11:55:20.602  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/KIDS available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:20.616  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/KIDS/
03-10 11:55:21.512  9974  9986 I SynchronizeFolderOperation: Checked jenoe@storage.stenitzer.org/BOOKS/EBOOKS/ : not changed
03-10 11:55:21.512  9974  9986 D FileDataStorageManager: getFolderContent - start
03-10 11:55:21.641  9974  9986 D FileDataStorageManager: getFolderContent - finished
03-10 11:55:21.642  9974  9986 V SynchronizeFolderOperation: Starting content synchronization... 
03-10 11:55:21.642  9974  9986 D OperationsService: Called 1 listeners
03-10 11:55:21.642  9974  9986 D SyncFolderHandler: Stopping after command with id 4
03-10 11:55:21.645  9974  9974 D FileDataStorageManager: getFolderContent - start
03-10 11:55:21.657  9974  9974 D FileDataStorageManager: getFolderContent - finished
03-10 11:55:21.681  9974  9974 D FileActivity: Received result of operation in FileActivity - common behaviour for all the FileActivities 
03-10 11:55:21.695  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/AUDIOBOOK available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:21.721  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/AUDIOBOOK/
03-10 11:55:21.732  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/AUDIOBOOK-NON-FICTION available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:21.752  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/AUDIOBOOK-NON-FICTION/
03-10 11:55:21.759  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/EBOOKS available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:21.784  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/EBOOKS-COOKING available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:21.802  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/EBOOKS-COOKING/
03-10 11:55:21.808  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/EBOOKS-NON-FICTION available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:21.825  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/EBOOKS-NON-FICTION/
03-10 11:55:21.832  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/EBOOKS-TRAVEL available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:21.850  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/EBOOKS-TRAVEL/
03-10 11:55:21.857  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/KIDS available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:21.873  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/KIDS/
03-10 11:55:21.891  9974 15002 E FileDownloadWorker: FilesDownloadWorker started for 22
03-10 11:55:21.902  9974 15002 D FileDataStorageManager: getFolderContent - start
03-10 11:55:22.029  9974 15002 D FileDataStorageManager: getFolderContent - finished
03-10 11:55:22.029  9974 15002 D FileDataStorageManager: getFolderContent - start
03-10 11:55:22.030  9974 15002 D FileDataStorageManager: getFolderContent - finished
03-10 11:55:22.030  9974 15002 D FileDataStorageManager: getFolderContent - start
03-10 11:55:22.030  9974 15002 D FileDataStorageManager: getFolderContent - finis

skipped hundreds of similar lines …
and now the only file directly in this folder HEADER.md gets downloaded, and all subfolders with hundreds of files get ignored.

03-10 11:55:22.073  9974 15002 D FileDataStorageManager: getFolderContent - finished
03-10 11:55:22.073  9974 15002 D FileDataStorageManager: getFolderContent - start
03-10 11:55:22.073  9974 15002 D FileDataStorageManager: getFolderContent - finished
03-10 11:55:22.076  9974 15002 D OpenGLRenderer: --- Failed to create image decoder with message 'unimplemented'
03-10 11:55:22.077  9974 15002 E FileDownloadWorker: FilesDownloadWorker downloading: jenoe@storage.stenitzer.org/BOOKS/EBOOKS/HEADER.md
03-10 11:55:22.077  9974  9974 D FileDataStorageManager: getFolderContent - start
03-10 11:55:22.078  9974 10103 I WM-Processor: Moving WorkSpec (90025f2c-81cf-4709-9aac-fdd1dcbc8932) to the foreground
03-10 11:55:22.082  9974  9974 D FileDataStorageManager: getFolderContent - finished
03-10 11:55:22.094  9974 15002 D OwnCloudClient #0: REQUEST GET /remote.php/dav/files/jenoe/BOOKS/EBOOKS/HEADER.md
03-10 11:55:22.099  9974  9974 D FileDisplayActivity: Download worker started
03-10 11:55:22.107  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/AUDIOBOOK available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:22.121  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/AUDIOBOOK/
03-10 11:55:22.128  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/AUDIOBOOK-NON-FICTION available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:22.144  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/AUDIOBOOK-NON-FICTION/
03-10 11:55:22.152  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/EBOOKS available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:22.166  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/EBOOKS-COOKING available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:22.183  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/EBOOKS-COOKING/
03-10 11:55:22.190  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/EBOOKS-NON-FICTION available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:22.207  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/EBOOKS-NON-FICTION/
03-10 11:55:22.214  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/EBOOKS-TRAVEL available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:22.231  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/EBOOKS-TRAVEL/
03-10 11:55:22.238  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/KIDS available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:22.255  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/KIDS/
03-10 11:55:22.267  9974  9974 I WM-SystemFgDispatcher: Started foreground service Intent { act=ACTION_START_FOREGROUND cmp=com.nextcloud.client/androidx.work.impl.foreground.SystemForegroundService (has extras) }
03-10 11:55:23.480  9974 15002 I DownloadFileRemoteOperation: Download of /BOOKS/EBOOKS/HEADER.md to /storage/emulated/0/Android/media/com.nextcloud.client/nextcloud/tmp/jenoe@storage.stenitzer.org/BOOKS/EBOOKS/HEADER.md: Operation finished with HTTP status code 200 (success)
03-10 11:55:23.537  9974 15002 I DownloadFileOperation: Download of /BOOKS/EBOOKS/HEADER.md to /storage/emulated/0/Android/media/com.nextcloud.client/nextcloud/jenoe@storage.stenitzer.org/BOOKS/EBOOKS/HEADER.md: Operation finished with HTTP status code 200 (success)
03-10 11:55:23.553  9974 15002 D FileDataStorageManager: Number of files updated with CONFLICT: 1
03-10 11:55:23.553  9974 15002 D FileDataStorageManager: checking parents to remove conflict; STARTING with /BOOKS/EBOOKS/
03-10 11:55:23.557  9974 15002 D FileDataStorageManager: NO MORE conflicts in /BOOKS/EBOOKS/
03-10 11:55:23.561  9974 15002 D FileDataStorageManager: checking parents to remove conflict; NEXT /BOOKS/
03-10 11:55:23.564  9974 15002 D FileDataStorageManager: NO MORE conflicts in /BOOKS/
03-10 11:55:23.570  9974 15002 D FileDataStorageManager: checking parents to remove conflict; NEXT /
03-10 11:55:23.573  9974 15002 D FileDataStorageManager: NO MORE conflicts in /
03-10 11:55:23.580  9974 15002 D FileDataStorageManager: checking parents to remove conflict; NEXT 
03-10 11:55:23.582  9974 15002 E FileDownloadWorker: FilesDownloadWorker successfully completed
03-10 11:55:23.583  9974 10095 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=90025f2c-81cf-4709-9aac-fdd1dcbc8932, tags={ com.nextcloud.client.files.downloader.FileDownloadWorker, *, name:files_download jenoe@storage.stenitzer.org, timestamp:1710068121642, class:FileDownloadWorker, user:jenoe@storage.stenitzer.org, folder_downloadjenoe@storage.stenitzer.org22 } ]
03-10 11:55:23.583  9974  9974 D FileDataStorageManager: getFolderContent - start
03-10 11:55:23.591  9974  9974 D FileDataStorageManager: getFolderContent - finished
03-10 11:55:23.603  9974  9974 I WM-SystemFgDispatcher: Stopping foreground service
03-10 11:55:23.618  9974  9974 I Quality : Skipped: false 1 cost 21.801764 refreshRate 11111111 bit true processName com.nextcloud.client
03-10 11:55:23.623  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/AUDIOBOOK available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:23.630  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/AUDIOBOOK/
03-10 11:55:23.634  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/AUDIOBOOK-NON-FICTION available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:23.644  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/AUDIOBOOK-NON-FICTION/
03-10 11:55:23.647  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/EBOOKS available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:23.654  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/EBOOKS/
03-10 11:55:23.658  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/EBOOKS-COOKING available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:23.663  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/EBOOKS-COOKING/
03-10 11:55:23.666  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/EBOOKS-NON-FICTION available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:23.672  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/EBOOKS-NON-FICTION/
03-10 11:55:23.675  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/EBOOKS-TRAVEL available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:23.683  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/EBOOKS-TRAVEL/
03-10 11:55:23.688  9974  9974 E SyncedFolderProvider: 0 items for remote path = /BOOKS/KIDS available in sync folder db. Expected 1 or greater than 1. Failed to update sync folder db.
03-10 11:55:23.697  9974  9974 D UploadsStorageManager: Retrieve job null for remote path /BOOKS/KIDS/

Note: I’m not sure if I have cut the log files correctly as I have difficulities understanding them properly.

Hi,

I’m hâve the same issue without error alerte (the sincing seems to have been done… But only the file in the parent directory are sinced not those in subfolder).

Cheers

i’ve added a comment in a ticket: Nested folder download not working when folders not loaded before · Issue #12358 · nextcloud/android · GitHub