Android: Directory contents empty in app while web frontend shows file

Created on 13 Sep 2019  路  7Comments  路  Source: nextcloud/android

Actual behaviour

File list is empty in some folders on Android while there are files in the web frontend (same user).

Expected behaviour

Viewing contents of a directory in the Android app should always be consistent with that what the web frontend shows.

Steps to reproduce

  1. Make some directories.
  2. Upload files.
  3. Check contents, some folders might be empty, even you uploaded files there.

Environment data

Android version: 9

Device model:
OnePlus 6

Stock or customized system:
stock

Nextcloud app version:
3.8.0 RC5

Nextcloud server version:
16.0.4

Logs

Web server error log

192.168.0.36 - cinek [13/Sep/2019:18:23:26 +0000] "GET /cloud/ocs/v1.php/cloud/user?format=json HTTP/1.1" 200 603 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.8.0 RC5"
192.168.0.36 - cinek [13/Sep/2019:18:23:26 +0000] "PROPFIND /cloud/remote.php/webdav/Grafiken/Unterschriften/Martin/ HTTP/1.1" 207 845 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.8.0 RC5"
192.168.0.36 - cinek [13/Sep/2019:18:23:26 +0000] "PROPFIND /cloud/remote.php/webdav/Grafiken/Unterschriften/Martin/ HTTP/1.1" 207 2025 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.8.0 RC5"
192.168.0.36 - cinek [13/Sep/2019:18:23:26 +0000] "GET /cloud/ocs/v2.php/apps/files_sharing/api/v1/shares?path=%2FGrafiken%2FUnterschriften%2FMartin%2F&reshares=true&subfiles=true HTTP/1.1" 200 138 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.8.0 RC5"

Nextcloud app log accessing the directory

2019-09-13T20:45:52.782+0200;D;FileDataStorageManager;Sending 3 operations to FileContentProvider
2019-09-13T20:45:52.782+0200;D;FileContentProvider;applying batch in provider com.owncloud.android.providers.FileContentProvider@5511cbb (temporary: false)
2019-09-13T20:45:52.784+0200;D;FileContentProvider;applied batch in provider com.owncloud.android.providers.FileContentProvider@5511cbb
2019-09-13T20:45:52.791+0200;D;RefreshFolderOperation;Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
2019-09-13T20:45:52.791+0200;D;FileDisplayActivity;Received broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
2019-09-13T20:45:52.791+0200;D;OwnCloudClient #0;REQUEST GET /cloud/ocs/v2.php/apps/files_sharing/api/v1/shares
2019-09-13T20:45:52.827+0200;D;FileDisplayActivity;Setting progress visibility to true
2019-09-13T20:45:52.920+0200;D;GetSharesForFileRemoteOperation;Got 0 shares
2019-09-13T20:45:52.935+0200;D;FileDataStorageManager;Sending 2 operations to FileContentProvider
2019-09-13T20:45:52.935+0200;D;FileContentProvider;applying batch in provider com.owncloud.android.providers.FileContentProvider@5511cbb (temporary: false)
2019-09-13T20:45:52.938+0200;D;FileContentProvider;applied batch in provider com.owncloud.android.providers.FileContentProvider@5511cbb
2019-09-13T20:45:52.938+0200;D;RefreshFolderOperation;Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
2019-09-13T20:45:52.940+0200;D;FileDisplayActivity;Received broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
2019-09-13T20:45:52.985+0200;D;FileDisplayActivity;Setting progress visibility to false
2019-09-13T20:45:55.064+0200;D;RefreshFolderOperation;Checking changes in [email protected]/cloud/Grafiken/Unterschriften/Martin/
2019-09-13T20:45:55.067+0200;D;OwnCloudClient #0;REQUEST PROPFIND /cloud/remote.php/webdav/Grafiken/Unterschriften/Martin/
2019-09-13T20:45:55.184+0200;I;RefreshFolderOperation;Checked [email protected]/cloud/Grafiken/Unterschriften/Martin/ : changed
2019-09-13T20:45:55.186+0200;D;OwnCloudClient #0;REQUEST PROPFIND /cloud/remote.php/webdav/Grafiken/Unterschriften/Martin/
2019-09-13T20:45:55.290+0200;I;ReadFolderRemoteOperation;Synchronized /Grafiken/Unterschriften/Martin/: Operation finished with HTTP status code 207 (success)
2019-09-13T20:45:55.290+0200;D;RefreshFolderOperation;Synchronizing [email protected]/cloud/Grafiken/Unterschriften/Martin/
2019-09-13T20:45:55.300+0200;D;RefreshFolderOperation;Remote folder /Grafiken/Unterschriften/Martin/ changed - starting update of local data 
2019-09-13T20:45:55.326+0200;D;FileDataStorageManager;Saving folder /Grafiken/Unterschriften/Martin/ with 1 children and 0 files to remove
2019-09-13T20:45:55.330+0200;D;FileDataStorageManager;Sending 2 operations to FileContentProvider
2019-09-13T20:45:55.330+0200;D;FileContentProvider;applying batch in provider com.owncloud.android.providers.FileContentProvider@5511cbb (temporary: false)
2019-09-13T20:45:55.331+0200;D;FileContentProvider;applied batch in provider com.owncloud.android.providers.FileContentProvider@5511cbb
2019-09-13T20:45:55.338+0200;D;RefreshFolderOperation;Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
2019-09-13T20:45:55.339+0200;D;OwnCloudClient #0;REQUEST GET /cloud/ocs/v2.php/apps/files_sharing/api/v1/shares
2019-09-13T20:45:55.339+0200;D;FileDisplayActivity;Received broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
2019-09-13T20:45:55.375+0200;D;FileDisplayActivity;Setting progress visibility to true
2019-09-13T20:45:55.470+0200;D;GetSharesForFileRemoteOperation;Got 0 shares
2019-09-13T20:45:55.480+0200;D;RefreshFolderOperation;Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
2019-09-13T20:45:55.482+0200;D;FileDisplayActivity;Received broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
2019-09-13T20:45:55.552+0200;D;FileDisplayActivity;Setting progress visibility to false
2019-09-13T20:45:57.092+0200;V;FileDisplayActivity;onPause() start
2019-09-13T20:45:57.161+0200;D;FileDisplayActivity;onPause() ending
2019-09-13T20:45:57.161+0200;V;FileDisplayActivity;onPause() end
2019-09-13T20:45:57.177+0200;D;FileDisplayActivity;onStop() ending
2019-09-13T20:45:57.177+0200;V;FileDisplayActivity;onSaveInstanceState() start
2019-09-13T20:45:57.178+0200;D;FileDisplayActivity;onSaveInstanceState(Bundle) starting
2019-09-13T20:45:57.178+0200;D;ExtendedListFragment;onSaveInstanceState()
2019-09-13T20:45:57.178+0200;V;FileDisplayActivity;onSaveInstanceState() end
2019-09-13T20:45:59.504+0200;V;BaseActivity;onRestart() start
2019-09-13T20:45:59.504+0200;V;BaseActivity;onRestart() end
2019-09-13T20:45:59.506+0200;D;FileDisplayActivity;onStart() starting
2019-09-13T20:45:59.525+0200;D;OwnCloudClient #0;REQUEST GET /cloud/ocs/v1.php/cloud/user
2019-09-13T20:45:59.541+0200;D;FileDisplayActivity;Initializing Fragments in onAccountChanged..
2019-09-13T20:45:59.588+0200;V;FileDisplayActivity;onResume() start
2019-09-13T20:45:59.589+0200;D;FileDisplayActivity;onResume() starting
2019-09-13T20:45:59.593+0200;D;ExternalLinks;links disabled
2019-09-13T20:45:59.683+0200;V;FileDisplayActivity;onResume() end
2019-09-13T20:46:00.139+0200;D;RefreshFolderOperation;Checking changes in [email protected]/cloud/Grafiken/Unterschriften/Martin/
2019-09-13T20:46:00.140+0200;D;OwnCloudClient #0;REQUEST PROPFIND /cloud/remote.php/webdav/Grafiken/Unterschriften/Martin/
2019-09-13T20:46:00.240+0200;I;RefreshFolderOperation;Checked [email protected]/cloud/Grafiken/Unterschriften/Martin/ : changed
2019-09-13T20:46:00.240+0200;D;OwnCloudClient #0;REQUEST PROPFIND /cloud/remote.php/webdav/Grafiken/Unterschriften/Martin/
2019-09-13T20:46:00.326+0200;I;ReadFolderRemoteOperation;Synchronized /Grafiken/Unterschriften/Martin/: Operation finished with HTTP status code 207 (success)
2019-09-13T20:46:00.326+0200;D;RefreshFolderOperation;Synchronizing [email protected]/cloud/Grafiken/Unterschriften/Martin/
2019-09-13T20:46:00.329+0200;D;RefreshFolderOperation;Remote folder /Grafiken/Unterschriften/Martin/ changed - starting update of local data 
2019-09-13T20:46:00.337+0200;D;FileDataStorageManager;Saving folder /Grafiken/Unterschriften/Martin/ with 1 children and 0 files to remove
2019-09-13T20:46:00.341+0200;D;FileDataStorageManager;Sending 2 operations to FileContentProvider
2019-09-13T20:46:00.341+0200;D;FileContentProvider;applying batch in provider com.owncloud.android.providers.FileContentProvider@5511cbb (temporary: false)
2019-09-13T20:46:00.342+0200;D;FileContentProvider;applied batch in provider com.owncloud.android.providers.FileContentProvider@5511cbb
2019-09-13T20:46:00.348+0200;D;RefreshFolderOperation;Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
2019-09-13T20:46:00.348+0200;D;OwnCloudClient #0;REQUEST GET /cloud/ocs/v2.php/apps/files_sharing/api/v1/shares
2019-09-13T20:46:00.348+0200;D;FileDisplayActivity;Received broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
2019-09-13T20:46:00.378+0200;D;FileDisplayActivity;Setting progress visibility to true
2019-09-13T20:46:00.473+0200;D;GetSharesForFileRemoteOperation;Got 0 shares
2019-09-13T20:46:00.491+0200;D;RefreshFolderOperation;Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
2019-09-13T20:46:00.493+0200;D;FileDisplayActivity;Received broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
2019-09-13T20:46:00.536+0200;D;FileDisplayActivity;Setting progress visibility to false
2019-09-13T20:46:00.824+0200;V;ExtendedListFragment;Setting selection to position: 0; top: 0; index: 1
2019-09-13T20:46:01.247+0200;V;ExtendedListFragment;Setting selection to position: 0; top: 0; index: 5
approved bug pr exists

All 7 comments

I see a similar behaviour, yet noticed it only with images. The images shown in the photo view are not visible in the file view.

I can confirm that it happens with images in file view exclusively. And also I've found partially shown directories. E.g. 2 of 12 images are shown.

I also confirm this bug.

Can you create us a test account, test if the problem occurs also there and if so send the credentials to tobias at nextcloud dot com with a reference to this issue?

I can do that. Give me a day to set it up and test it, as I'm busy at the moment.

I think this is fixed via https://github.com/nextcloud/android/pull/4470

So for some reason the files were uploaded, but stored with a wrong upload path, which does not affect storing it on server, but they got stored wrong in our internal database.

On a clean installation all files are found, so it is not a problem with sync, but how they got stored initially.

I try to reproduce it, so I do not need any test account.

It seems like this

  • auto upload images, move them to NC folder
  • see them in folder, within our app
  • open photos view
  • see downloaded photos
  • go back to auto upload folder
  • images are not there anymore
Was this page helpful?
0 / 5 - 0 ratings

Related issues

AndyScherzinger picture AndyScherzinger  路  3Comments

ezaquarii picture ezaquarii  路  3Comments

JSoko picture JSoko  路  3Comments

JSoko picture JSoko  路  3Comments

tobiasKaminsky picture tobiasKaminsky  路  3Comments