Remote changes aren't picked up

While evaluating rclone I've noticed remote changes aren't picked up from Google Drive when using rclone mount on an remote configured with the scope drive.appfolder.

Okt 24 12:39:40 hostname rclone[16569]: 2019/10/24 12:39:40 DEBUG : Google drive root '': Checking for changes on remote
Okt 24 12:39:40 hostname rclone[16569]: 2019/10/24 12:39:40 INFO  : Google drive root '': Change notify listener failure: googleapi: Error 403: The granted scopes do not give access to all of the requested spaces., insufficientScopes

The frequency of these log messages seem to be related to --poll-interval. After sending SIGHUP remote changes are visible on the mount.

What is your rclone version (output from rclone version)

rclone v1.49.5-245-g0f0079ff-beta

  • os/arch: linux/amd64
  • go version: go1.13.3

Which OS you are using and how many bits (eg Windows 7, 64 bit)

4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20)

The command you were trying to run (eg rclone copy /tmp remote:tmp)

$ rclone mount media: /mnt/media-gdrive

/etc/rclone/rclone.conf:

[gdrive]
type = drive
client_id = <snip>
client_secret = <snip>
scope = drive.appfolder
root_folder_id = appDataFolder
token = <snip>

[media]
type = crypt
remote = gdrive:
password = <snip>
password2 = <snip>

environment variables:

RCLONE_CONFIG=/etc/rclone/rclone.conf
RCLONE_ALLOW_OTHER=true
RCLONE_LOG_LEVEL=DEBUG
RCLONE_USER_AGENT=<snip>

RCLONE_UMASK=0002
RCLONE_GID=112

RCLONE_VFS_CACHE_MODE=writes
RCLONE_ATTR_TIMEOUT=1000h
RCLONE_DIR_CACHE_TIME=1000h
RCLONE_BUFFER_SIZE=128M
RCLONE_POLL_INTERVAL=15s
RCLONE_TIMEOUT=1h

Hmm, I see the problem - try this:

https://beta.rclone.org/branch/v1.49.5-246-ga3a58578-fix-drive-appdata-beta/ (uploaded in 15-30 mins)

If it doesn't work can you run with -vv --dump bodies and capture the HTTP request and response which causes that message?

I suspect this is going to cause a problem noticing changes in the root folder, so when testing try the root and sub directories.

It does work. Thanks, Nick. I appreciate your help.

Changes in the root directory are still not picked up. I guess that's a limitation of Google Drive?

I've tried the new web gui for the changes while testing by the way. Love it :ok_hand:

Great! I've merged this to master now which means it will be in the latest beta in 15-30 mins and released in v1.50

It is due to a mis-feature of google drive... When you are using appData you refer to the root folder as appDataFolder but when google sends back changes it uses the underlying ID of the folder which rclone doesn't know.

Rclone could find this out with an extra call but rclone uses the fact that the ID is appDataFolder internally so the change isn't trivial.

If you'd like to see this can you please make a new issue on github and I'll take a look at it for 1.51