Rclone Copy Stopped Working after 1.59.1 release

I have a command line that I’ve used ever since using rclone to cooy and backup my server to Google drive. Since the update I have been unable to use the command and get "error": "invalid_grant", "error_description": "Token has been expired or revoked."

I was told to use Rclone to do this and used a YouTube command line that has worked for a couple years up until the last update via Homebrew

sudo rclone copy -P --verbose --transfers 5 --checkers 8 --contimeout 60s --timeout 300s --retries 3 --low-level-retries 10 --stats 1s --stats-file-name-length 0 /srv/MYSERVERFOLDER/NAME google-drive:

It now returns this

Failed to create file system for "google-drive:": couldn't find root directory ID: Get "https://www.googleapis.com/drive/v3/files/root?alt=json&fields=id&prettyPrint=false&supportsAllDrives=true": couldn't fetch token - maybe it has expired? - refresh with "rclone config reconnect google-drive:": oauth2: cannot fetch token: 400 Bad Request Response: { "error": "invalid_grant", "error_description": "Token has been expired or revoked." }

I was thinking of reverting back to the previous version if thats possible? Then seeing if the command line works. Or is this something to do with Google?

Is it also possible to run the same command through Rclone Browser?

This is where I got the command from on youtube

Im no expert just downloaded rclone and followed the video on YouTube and never had trouble till today
How do I fix this? Thanks in advance for any help

Run that and it should get a new token.

I have done and not worked. When I run the command line to backup again it doesnt work I get the same error msg

``Failed to create file system for "google-drive:": couldn't find root directory ID: Get "https://www.googleapis.com/drive/v3/files/root?alt=json&fields=id&prettyPrint=false&supportsAllDrives=true": couldn't fetch token - maybe it has expired? - refresh with "rclone config reconnect google-drive:": oauth2: cannot fetch token: 400 Bad Request
Response: {
"error": "invalid_grant",
"error_description": "Token has been expired or revoked."

I have refreshed the Token and the command still isnt working. Is there a way to maybe use Rclone Browser GUI to try and do it? I just dont want it to not pick up that there is 26Tb of data and want to upload everything on the server again

Can you please run:

rclone config reconnect google-drive: -vvv

and share the output.

This is what come out

2022/08/22 08:17:20 NOTICE: Config file "/home/FOLDER/.config/rclone/rclone.conf" not found - using defaults
Error: didn't find section in config file
Usage:
  rclone config reconnect remote: [flags]

Flags:
  -h, --help   help for reconnect

Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.

2022/08/22 08:17:20 Fatal error: didn't find section in config file```

That means the user you are running at isn't the same as before as it's telling you the rclone.conf isn't found.

You'd want to run it as the same user you've used before.

I got this in a newly opened terminal window


2022/08/22 16:30:58 DEBUG : rclone: Version "v1.59.1" starting with parameters ["rclone" "config" "reconnect" "google-drive:" "-vvv"]

2022/08/22 16:30:58 DEBUG : Using config file from "/Users/Biniaz_1/.config/rclone/rclone.conf"

2022/08/22 16:30:58 DEBUG : google-drive: config in: state="", result=""

2022/08/22 16:30:58 DEBUG : google-drive: config out: out=&{State:*oauth,teamdrive,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>

2022/08/22 16:30:58 DEBUG : google-drive: config in: state="*oauth,teamdrive,,", result=""

2022/08/22 16:30:58 DEBUG : google-drive: config out: out=&{State:*oauth-confirm,teamdrive,, Option:true OAuth:<nil> Error: Result:}, err=<nil>

2022/08/22 16:30:58 DEBUG : google-drive: config: reading config parameter "config_refresh_token"

Already have a token - refresh?

y) Yes (default)

n) No

y/n>```

Did you type y ?

2022/08/22 17:02:25 DEBUG : google-drive: config out: out=&{State:*oauth-islocal,teamdrive,, Option:true OAuth:<nil> Error: Result:}, err=<nil>
2022/08/22 17:02:25 DEBUG : google-drive: config: reading config parameter "config_is_local"
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> 

If that machine has a browser, you'd hit Y.

If it doesn't have a browser, you'd have to hit n and go through the remote setup.

Remote Setup (rclone.org)

I have access to a monitor so Y

Got browser showing

Success!


All done. Please go back to rclone.

Then this in terminal

`` 2022/08/22 17:09:09 DEBUG : google-drive: config in: state="*oauth-islocal,teamdrive,,", result="true"

2022/08/22 17:09:09 DEBUG : google-drive: config out: out=&{State:*oauth-do,teamdrive,, Option: OAuth: Error: Result:}, err=

2022/08/22 17:09:09 DEBUG : google-drive: config in: state="*oauth-do,teamdrive,,", result=""

2022/08/22 17:09:09 NOTICE: Make sure your Redirect URL is set to "http://127.0.0.1:53682/" in your custom config.

2022/08/22 17:09:09 DEBUG : Starting auth server on 127.0.0.1:53682

2022/08/22 17:09:09 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=J72je2mT2HQ21HKdOecOmA

2022/08/22 17:09:09 NOTICE: Log in and authorize rclone for access

2022/08/22 17:09:09 NOTICE: Waiting for code...

2022/08/22 17:09:09 DEBUG : Redirecting browser to: Sign in – Google accounts

2022/08/22 17:09:09 DEBUG : Received GET request on auth server to "/"

2022/08/22 17:09:09 NOTICE: Got code

2022/08/22 17:09:09 DEBUG : Closing auth server

2022/08/22 17:09:09 DEBUG : Closed auth server with error: accept tcp 127.0.0.1:53682: use of closed network connection

2022/08/22 17:09:10 DEBUG : Saving config "token" in section "google-drive" of the config file

2022/08/22 17:09:10 DEBUG : google-drive: Saved new token in config file

2022/08/22 17:09:10 DEBUG : google-drive: config out: out=&{State:*oauth-done,teamdrive,, Option: OAuth: Error: Result:}, err=

2022/08/22 17:09:10 DEBUG : google-drive: config in: state="*oauth-done,teamdrive,,", result=""

2022/08/22 17:09:10 DEBUG : google-drive: config out: out=&{State:teamdrive Option: OAuth: Error: Result:}, err=

2022/08/22 17:09:10 DEBUG : google-drive: config in: state="teamdrive", result=""

2022/08/22 17:09:10 DEBUG : google-drive: config out: out=&{State:teamdrive_ok Option:false OAuth: Error: Result:}, err=

2022/08/22 17:09:10 DEBUG : google-drive: config: reading config parameter "config_change_team_drive"

Configure this as a Shared Drive (Team Drive)?

y) Yes

n) No (default)

y/n>``

Are you asking me what to pick? Are you using a team drive? Just hit yes or no depending on what your setup is.

I dont think I am dont think I set it up that way. I have been through this and had it not work but will go through to see if I get the same result with someones help

So got this back

`` 2022/08/22 17:16:34 DEBUG : google-drive: config in: state="teamdrive_ok", result="false"

2022/08/22 17:16:34 DEBUG : Saving config "team_drive" in section "google-drive" of the config file

2022/08/22 17:16:34 DEBUG : google-drive: config out: out=, err=

2022/08/22 17:16:34 DEBUG : rclone: Version "v1.59.1" finishing with parameters ["rclone" "config" "reconnect" "google-drive:" "-vvv"]``

Running the command line I have always used I got this

2022/08/22 17:19:06 Failed to create file system for "google-drive:": couldn't find root directory ID: Get "https://www.googleapis.com/drive/v3/files/root?alt=json&fields=id&prettyPrint=false&supportsAllDrives=true": couldn't fetch token - maybe it has expired? - refresh with "rclone config reconnect google-drive:": oauth2: cannot fetch token: 400 Bad Request Response: { "error": "invalid_grant", "error_description": "Token has been expired or revoked."

Its not a regular 15GB drive its Unlimited but dont think its a team drive

That's just a Google question.

Are you using a regular Google Drive or a Team Drive?

Wud that make a difference to what errors Im getting bk and why wud this suddenly stop working when all I have ever used is the same command for 2 yrs straight without any problems?

Yes, you'd need to know if it is a regular drive or a team drive/shared drive so you can pick the right thing.

So sud I run it again and the last one do team drive and see if that works?

Why wud this suddenly change if I’ve done nothing to it?

I access my server and put the initial command line in after and see if that works for me

I configured it as a Team Drive and got the same error

2022/08/22 17:48:26 Failed to create file system for "google-drive:": couldn't find root directory ID: Get "https://www.googleapis.com/drive/v3/files/root?alt=json&fields=id&prettyPrint=false&supportsAllDrives=true": couldn't fetch token - maybe it has expired? - refresh with "rclone config reconnect google-drive:": oauth2: cannot fetch token: 400 Bad Request Response: { "error": "invalid_grant", "error_description": "Token has been expired or revoked."

Is this maybe a Google change or is it the latest update from Rclone? Someone mentioned it may be limits from Google but never exceeded limits.

What I did try is dragging and dropping folders straight to the drive in the web browser and it adds them no problem

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.