Google drive Token expired

What is the problem you are having with rclone?

It's showing me token expired. So when I try to run config again by clicking edit existing remote, after the window popped up, it shows "rclone wants access to your Google Account" I then click continue, then the rclone cmd line just closes.

2023/01/03 15:07:32 ERROR : IO error: couldn't list directory: Get "https://www.googleapis.com/drive/v3/files?alt=json&corpora=drive&driveId=0AGg5ZaLWa25qUk9PVA&fields=files(id%2Cname%2Csize%2Cmd5Checksum%2Ctrashed%2CexplicitlyTrashed%2CmodifiedTime%2CcreatedTime%2CmimeType%2Cparents%2CwebViewLink%2CshortcutDetails%2CexportLinks%2CresourceKey)%2CnextPageToken%2CincompleteSearch&includeItemsFromAllDrives=true&pageSize=1000&prettyPrint=false&q=trashed%3Dfalse+and+('0AGg5ZaLWa25qUk9PVA'+in+parents)&supportsAllDrives=true": couldn't fetch token - maybe it has expired? - refresh with "rclone config reconnect GDrive:": Post "https://oauth2.googleapis.com/token": dial tcp: lookup oauth2.googleapis.com: no such host

Run the command 'rclone version' and share the full output of the command.

rclone v1.61.1

  • os/version: Microsoft Windows 10 Pro 22H2 (64 bit)
  • os/kernel: 10.0.19045.2251 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.19.4
  • go/linking: static
  • go/tags: cmount

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)

I'm not sure, as I'm using rclone browser. But when trying to run the edit existing remote, after the gdrive window pops up, after clicking continue, the rclone window closes.

The rclone config contents with secrets removed.

[GDrive]
type = drive
scope = drive
token = {"access_token":"ya29.a0AX9GBdUUii7CeQSUksJPM8_DQYIP1oZUhsIhog4uZY-BixkgcYtexmTaQ7BBfYiVplKnawRJNgFtRAD9zlo52pCzNpPV_D6Tf9kE1Z9fcVUZ2PI8kDdPqZ122fiVTgTL1Mfo5jMXA2vQq6viURp5b6TC5FfqGk_SqgaCgYKAb8SAQASFQHUCsbCWAEFg83Iw2WFLbhns-dApQ0169","token_type":"Bearer","refresh_token":"1//0c75MXviGpEX2CgYIARAAGAwSNwF-L9IrErQz6X4pjU-2dbM-lYAsPXEEVPET8HwAUSekmyzJXAFkfc9gUHSd1ing4m1WJfQn6Vw","expiry":"2023-01-03T04:02:24.7972253+01:00"}
team_drive = 0AGg5ZaLWa25qUk9PVA
root_folder_id = 
client_id = xxx
client_secret = xxx
chunk_size = 1024m

[GDrive Encrypt]
type = crypt
remote = Z:\
password = xxx
chunk_size = 1024m

[GDrive 2]
type = drive
client_id = xxx
client_secret = xxx
scope = drive
token = {"access_token":"ya29.a0AX9GBdX0mpcaLm-UsH6oHV9Lhu-kMIzTEw3R7KpcnYZn9e6obocaw1vGd4PuiXsXYXBzXNT0_oAhLJMtCPbbIJBc__8GUSBKHZK1sARL5FU7jfj7zILRtW5JKdCcCYnRMYsZNGlcqEtpfw0QP_IeOvOKLfPyJwyLWAaCgYKAZoSAQASFQHUCsbCrZOeEl5hPo38UoE13moigQ0169","token_type":"Bearer","refresh_token":"1//0c9TbBm6xFJf9CgYIARAAGAwSNwF-L9IrsqyaZEdVsMg8kNDhAfI2Y9fx2WqYbBONB0gN94nEiBIAb5N_fCmYORtDijmh1gt9xc8","expiry":"2023-01-03T03:03:24.7577594+01:00"}
team_drive = 0AISZBKsgi0hnUk9PVA
root_folder_id = 
chunk_size = 1024m

[GDrive 2 Encrypt]
type = crypt
remote = R:\
password = xxx
chunk_size = 1024m

[Backups]
type = drive
scope = drive
token = {"access_token":"ya29.a0AX9GBdV8z0xjPWhgXm_I35JziCjLtsmq7ZEhRGV4hnofmB2mStbJqCMopqE5co2KOWvhnwuaSFDTb1T2hByq8VkbReiT3P5Qw1La2zapa3WTVmOvHCyskn9SU85fKzD2jpDk7MBJ17HftbR57ioq2uyzpIznBO2njAaCgYKAUMSAQASFQHUCsbCQ6tuEb13dUi7WeBXaL3FgQ0169","token_type":"Bearer","refresh_token":"1//0c0OfKxShbNfMCgYIARAAGAwSNwF-L9IrkHIzyKXrpp-iH4UQbXadoTutBCr2hZteMXd_sWPaMxQwBBcUKYPCZdOVuj_AyvunVF8","expiry":"2023-01-01T12:27:24.927206+01:00"}
team_drive = 0APm7nN88uJRWUk9PVA
root_folder_id = 
chunk_size = 1024m
stop_on_upload_limit = true
stop_on_download_limit = true

[Backups Encrypt]
type = crypt
remote = A:\
password = xxx
password2 = xxx
chunk_size = 1024m

[Backups 2]
type = drive
scope = drive
token = {"access_token":"ya29.a0AX9GBdXBgtWnkuKx38auAnLANBz7z-rVbL0Cy7TKBIcGQExMm0tWYjci_6vTiREA3Gy7eqe60z3gaHvk5QkJohNJ1c7-OP-wP3kbBDQDoYEWPirPSjnTxE5v9j4EYhqQdiu6BRxTfOzgGRcFXitUQtmBXNGACKKWKQaCgYKATcSAQASFQHUCsbCJPS8dLtbdCACOOuCiDyPVw0169","token_type":"Bearer","refresh_token":"1//0cMgpQ9h2p0nxCgYIARAAGAwSNwF-L9Ir0muTLOQHltibpMJpS3-vsLFiA8QrqfrCKEEqosnrRibtApU12AF1FjcwmpHkECimbgA","expiry":"2022-12-20T11:19:24.8935581+01:00"}
team_drive = 0ABbeesJ4iitEUk9PVA
root_folder_id = 
chunk_size = 1024m

[Backups 2 Encrypt]
type = crypt
remote = V:\
password = xxx
password2 = xxx
chunk_size = 1024m

[Backups 3]
type = drive
client_id = xxx
client_secret = xxx
scope = drive
token = {"access_token":"ya29.a0AX9GBdUGDxexy1eDgB78R9XDW4SAmRqKFvV5vHGsaSIW2chmhB5JnpGI5ywhKBiqq_QXtknveC8lsGyOyOX-SGdGC6tNL-wNF9U8kMjoyFxCYo00B05vJafFYK_ZiDZ80BBA-b0sEI3DLms24ZQwTvclJsSyCM6XaCgYKAfISAQASFQHUCsbCKGfrRX9BKFb6wC4VyAtaEw0167","token_type":"Bearer","refresh_token":"1//0cMz26jUi3VnKCgYIARAAGAwSNwF-L9Ir80tZb9AC5PfV8T9f4lpXDjRthRJ4tRELOPKXruGY74qyDjwR6hsbUzGb2MaDUh5vS-Y","expiry":"2023-01-03T04:02:37.3269496+01:00"}
team_drive = 0AIN7uOj2y6D5Uk9PVA
root_folder_id = 
chunk_size = 1024m
stop_on_upload_limit = true
stop_on_download_limit = true

[Backups 3 Encrypt]
type = crypt
remote = T:\
password = -xxx
password2 = xxx


A log from the command with the -vv flag

Honestly not sure how to run this command sorry

That's a local DNS issue/firewall/AV/something blocking your connection out.

1 Like

God damn, it was an improperly configured dns on my computer. Thank youu :smile:

1 Like

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