Google Drive backend cannot refresh the token after a few times: it will work a few times (maybe a week or more), successfully refreshing the access token every time, until one day when it suddenly cannot refresh the token anymore. I have to refresh it manually, be re-allowing the application.
What is your rclone version (output from rclone version)
rclone v1.54.0-DEV
- os/arch: linux/amd64
- go version: go1.13.8
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Xubuntu 20.04
Which cloud storage system are you using? (eg Google Drive)
Googke Drive
The command you were trying to run (eg rclone copy /tmp remote:tmp)
I tried with the latest master version and with the 1.54.0.beta.5077.14c0d8a93 provided by Ubuntu. I'll try with the latest stable version.
Here is the output of rclone config reconnect PersonalGDrive: -vv
2021/02/02 09:18:20 DEBUG : rclone: Version "v1.54.0-DEV" starting with parameters ["rclone" "config" "reconnect" "PersonalGDrive:" "-vv"]
2021/02/02 09:18:20 DEBUG : Using config file from "/home/laloge_h/.config/rclone/rclone.conf"
Already have a token - refresh?
y) Yes (default)
n) No
y/n> y
Use auto config?
* Say Y if not sure
* Say N if you are working on a remote or headless machine
y) Yes (default)
n) No
y/n> n
Please go to the following link: https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=foobar1234.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&state=abcdef
Log in and authorize rclone for access
Enter verification code> 4/56789abcdef-g
2021/02/02 09:18:45 DEBUG : PersonalGDrive: Saved new token in config file
Configure this as a team drive?
y) Yes
n) No (default)
y/n> n
2021/02/02 09:18:48 DEBUG : rclone: Version "v1.54.0-DEV" finishing with parameters ["rclone" "config" "reconnect" "PersonalGDrive:" "-vv"]
thanks, usually packages from big distros official repos as fedora (or ubuntu as per Hugal31) are trustworthy but i will follow your advice and install official rclone rpm from download link. i will report back, it will take some times to se if this happends again (i mainly use rclone for some personal project few times a week, does this matter at all?)
Are you running rclone simultaneously? So more than one rclone running at once? I'm just wondering if this is a problem with the config file getting overwritten.
I'm almost sure no. I have multiple scripts running with run-parts using cron, so my rclone invocations are not parallel.
Besides, even if they do overwrite the configuration, the refresh token is not renewed between calls. Worst case scenario, a valid access_token is overwritten with another valid access_token.
no, i work on laptop few days, rclone sync local to gdrive then move to desktop rclone symc gdrive to local and so on.. <50mb sync.. really light usage..
on other note i already disconnected and reconnected rclone from google account to test previously and as far as i know i have 0 problems with time sync (i also have other apps that are time sensitive).
could this be the culprit? i do have my consent screen in testing, maybe other users in this thread can report about this?
sorry for bad link, remove space, new user cannot post links.
edit: just an update my desktop failed to refresh token today after my last message here 4d ago
2021/02/08 08:22:20 DEBUG : 4 go routines active
2021/02/08 08:22:20 Failed to lsd with 2 errors: last error was: couldn't list directory: Get "https://www.googleapis.com/drive/v3/files?alt=json&fields=files%28id%2Cname%2Csize%2Cmd5Checksum%2Ctrashed%2CexplicitlyTrashed%2CmodifiedTime%2CcreatedTime%2CmimeType%2Cparents%2CwebViewLink%2CshortcutDetails%2CexportLinks%29%2CnextPageToken%2CincompleteSearch&includeItemsFromAllDrives=true&pageSize=1000&prettyPrint=false&q=trashed%3Dfalse+and+%28%270AGZ4xiMeA7saUk9PVA%27+in+parents%29&supportsAllDrives=true": couldn't fetch token - maybe it has expired? - refresh with "rclone config reconnect gdrive:": oauth2: cannot fetch token: 400 Bad Request
Response: {
"error": "invalid_grant",
"error_description": "Token has been expired or revoked."
}
A Google Cloud Platform project with an OAuth consent screen configured for an external user type and a publishing status of "Testing" is issued a refresh token expiring in 7 days.
We should probably make a note of that in the drive setup.
A Google Cloud Platform project with an OAuth consent screen configured for an external user type and a publishing status of "Testing" is issued a refresh token expiring in 7 days.
AH! That's look like an answer. We should indeed update the drive page. Should I mark your answer as the solution?