Desktop Client Not keeping In Sync with Google Drive External Storage

Syncing / refreshing file list for Google Drive external storage only works with files added via OwnCloud. When files are uploaded to GoogleDrive OwnCloud Desktop Client ignores them. The iOS mobile app client DOES update to show files added via Google Drive.

Expected behaviour

Files added to Google Drive (via Google Drive UI) should be downloaded by Google Drive added as external storage in OwnCloud account.

Actual behaviour

Files added to Google Drive (via Google Drive UI) do not get synced to Google Drive added to OwnCLoud as external storage.

Steps to reproduce

1.Set up Google Drive and external storage as described here https://doc.owncloud.org/server/8.2/admin_manual/configuration_files/external_storage/google.html
2. Log-in to Gmail account - go to Google Drive and upload or delete a file.
3. OwnCloud desktop client does not update to reflect these changes

Server configuration

Operating system: CENTOS 7.5

Web server: LiteSpeed 5.2.3

Database: MariaDB

PHP version: 7.0.1

ownCloud version: 10.0.8 (stable)

Storage backend (external storage): VPS SSD + Google Drive

Client configuration

Client version: Version 2.4.1 (build 9270)

Operating system: Windows 7

OS language: English

Installation path of client: C:\Program Files (x86)\ownCloud\owncloud.exe

Nothing in logs

Yes. The WebUI will work as well. Web and iOS will issue a listing of the folder when you browse into it. The desktop client works differently, for performance reasons.
You will need to do a file scan periodically in order to have the files show up. You can adjust this based on the performance you watch.
We did look for a customer and couldn’t identify a notify service in the API. Thats how we solved it for large companies for WND and also OneDrive. There we have a notification service running which automatically fetches the changes and puts them into the ownCloud database every 2 minutes, so the desktop client can sync.

1 Like

Thanks for confirming this limitation. I have tried quitting and relaunching the client - it scans, but still does not find files added directly through Google Drive. I have activated ‘Force sync now’ from the drop down menu on the top right of the client window - it scans, but still does not find files added directly through Google Drive.

How can I achieve this ?

Thanks

I’ve stumbled over the following documentation in the past which seems to be exactly what you’re looking for:

https://doc.owncloud.org/server/latest/admin_manual/configuration/files/external_storage_configuration_gui.html#detecting-files-added-to-external-storages

Thanks tom42

I did see that documentation and it looked like it was addressing my exact issue - but because the issue is only with the client (not the web UI and iOS app) - I don’t think it is.

But the difference between WebGUI and iOS (where you don’t see this problem) and the Client was explained by @hodyroff above.

Ah - OK, so I just need to create a CENTOS compatible cron job to run sudo -u www-data php occ files:scan --all ?

I struggle to get cron jobs to work under CENTOS as the required syntax always seems to be different, but I will give it a try.

Thanks

Yes. There is nothing you can do from the client side. After the first sync the client checks against the filecache database of the server, otherwise it would take too long. And as long as you don’t browse in the mobile or web clients into the folder or do a file scan on the server side you will not see any changes.
Actually you could put a new file into the folder you like to see changes in and then it would also see the changes, I think - but please try, not 100% sure on this one.

1 Like

I finally managed to get cron to execute the command. I could only get it to work on my CENTOS setup by specifying the full path to php (instead of just having ‘php’). It appears I didn’t need to use sudo.

/usr/local/bin/ea-php70 /path-to-owncloud/occ files:scan --all

I’m now seeing Google Drive on OwnCloud updating and syncing as I had hoped.

Thanks very much @hodyroff and @tom42

1 Like

Perfect, thank you so much for the feedback!