Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Drive Polling not working for non encrypted remote #3240

Closed
Animosity022 opened this issue May 31, 2019 · 7 comments
Closed

Google Drive Polling not working for non encrypted remote #3240

Animosity022 opened this issue May 31, 2019 · 7 comments

Comments

@Animosity022
Copy link
Collaborator

What is the problem you are having with rclone?

Polling changes are not invalidating the directory cache on a non encrypted remote.

What is your rclone version (output from rclone version)

1.47

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

Linux/ArchLinux

Which cloud storage system are you using? (eg Google Drive)

Google Drive

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

Copy a file via rclone copy/web interface and check the mount logs.

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

https://forum.rclone.org/t/plex-with-google-drive-not-updating/10225/28 has the logs for the dump bodies and you can see the cache does not invalidate for some reason.

@ncw
Copy link
Member

ncw commented Jun 6, 2019

Here is my attempt to reproduce

rclone mount -vv drive:test /mnt/tmp/ --poll-interval 10s

Then in another window

ls /mnt/tmp/src
date | rclone rcat drive:test/src/`date -Is`.txt

This made this log

2019/06/06 15:41:54 DEBUG : Google drive root 'test': Checking for changes on remote
2019/06/06 15:41:55 DEBUG : src: invalidating directory cache

And then I did

ls /mnt/tmp/src

to check the file appeared.

If you do the same as the above does it work for you? Is there something I should be doing differently to reproduce?

@goyo99
Copy link

goyo99 commented Jun 6, 2019

After seeing the error, I have updated to an encrypted remote and I am in the process of re-uploading my library. So far, no issues with the encrypted setup.

@Animosity022
Copy link
Collaborator Author

I did my test in my root of my Google Drive.

2019/06/06 15:53:37 DEBUG : media/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2019/06/06 15:53:37 DEBUG : /: Lookup: name="media"
2019/06/06 15:53:37 DEBUG : /: >Lookup: node=media/, err=<nil>
2019/06/06 15:53:37 DEBUG : media/: Attr:
2019/06/06 15:53:37 DEBUG : media/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2019/06/06 15:53:42 DEBUG : /: Attr:
2019/06/06 15:53:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2019/06/06 15:53:42 DEBUG : /: ReadDirAll:
2019/06/06 15:53:42 DEBUG : /: >ReadDirAll: item=1, err=<nil>
2019/06/06 15:53:42 DEBUG : /: Lookup: name="media"
2019/06/06 15:53:42 DEBUG : /: >Lookup: node=media/, err=<nil>
2019/06/06 15:53:42 DEBUG : media/: Attr:
2019/06/06 15:53:42 DEBUG : media/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2019/06/06 15:53:42 DEBUG : /: Lookup: name="media"
2019/06/06 15:53:42 DEBUG : /: >Lookup: node=media/, err=<nil>
2019/06/06 15:53:42 DEBUG : media/: Attr:
2019/06/06 15:53:42 DEBUG : media/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2019/06/06 15:53:44 DEBUG : Google drive root '': Checking for changes on remote

and

[felix@gemini Test]$ date
Thu 06 Jun 2019 03:53:26 PM EDT
[felix@gemini Test]$ rclone copy /etc/hosts GD:
[felix@gemini Test]$ ls
media
[felix@gemini Test]$ rclone lsf GD:
hosts
media/
[felix@gemini Test]$ ls
media
[felix@gemini Test]$

still hasn't shown up.

@ncw
Copy link
Member

ncw commented Jun 9, 2019

I managed to replicate that mounting the root of my drive.

I updated the file, the change came in, but rclone ignored it.

2019/06/09 11:50:08 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2019/06/09 11:50:18 DEBUG : Google drive root '': Checking for changes on remote
2019/06/09 11:50:18 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2019/06/09 11:50:18 DEBUG : HTTP REQUEST (req 0xc0004d2500)
2019/06/09 11:50:18 DEBUG : GET /drive/v3/changes?alt=json&fields=nextPageToken%2CnewStartPageToken%2Cchanges%28fileId%2Cfile%28name%2Cparents%2CmimeType%29%29&pageSize=1000&pageToken=1392618&prettyPrint=false HTTP/1.1
Host: www.googleapis.com
User-Agent: rclone/v1.47.0-108-g43e2f95b-fix-3232-update-beta
Authorization: XXXX
Accept-Encoding: gzip

2019/06/09 11:50:18 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2019/06/09 11:50:18 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2019/06/09 11:50:18 DEBUG : HTTP RESPONSE (req 0xc0004d2500)
2019/06/09 11:50:18 DEBUG : HTTP/1.1 200 OK
Transfer-Encoding: chunked
Alt-Svc: quic=":443"; ma=2592000; v="46,44,43,39"
Cache-Control: private, max-age=0, must-revalidate, no-transform
Content-Type: application/json; charset=UTF-8
Date: Sun, 09 Jun 2019 10:50:18 GMT
Expires: Sun, 09 Jun 2019 10:50:18 GMT
Server: GSE
Vary: Origin
Vary: X-Origin
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block

b8
{"newStartPageToken":"1392621","changes":[{"fileId":"1qnEl462lu0j7WzS8","file":{"name":"justaddedfile.txt","mimeType":"text/plain","parents":["0ADSw5cyz"]}}]}
0

The problem is that we used the root id of "root" so that is what we have in the directory cache, but google drive returned an actual ID. So we need to lookup the actual ID of the root drive and get that in the directory cache.

So that is a bug but that only applied to things in the root of the drive - have you seen this problem elsewhere?

@ncw ncw added this to the v1.49 milestone Jun 9, 2019
@Animosity022
Copy link
Collaborator Author

I hadn't seen in anywhere before. The OP on the forum was seeing it not in a root folder.

@ncw ncw modified the milestones: v1.49, v1.50 Aug 27, 2019
@qazero
Copy link

qazero commented Sep 8, 2019

I am experiencing similar issues. Any updates on this bug? Thanks

@ncw
Copy link
Member

ncw commented Oct 26, 2019

This is now fixed in v1.50

@ncw ncw closed this as completed Oct 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants