Google Drive error reading source directory: couldn't list directory: googleapi: Error 401

I've been trying to download all my content from my Google Drive onto my new NAS I have. I download rclone, config google drive (client, secret etc) and get to downloading. It works for about an hour then everything stops and gives me the error couldn't find root directory ID: googleapi: Error 401: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.

Now when I try to access anything on that drive config it gives me the 401 error. That includes mounting, copying files, everything.

rclone v1.63.1

  • os/version: debian 11.5 (64 bit)
  • os/kernel: 5.15.107+truenas (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.20.6
  • go/linking: static
  • go/tags: none

Storage Type: Google Drive

./rclone copy -v gdrive:Videos /mnt/TANK/matt/yes
[gdrive]
type = drive
client_id = [redacted]
client_secret = [redacted]
scope = drive
token = {"access_token":"[redacted]","token_type":"Beare>
team_drive =
matt@truenas:~/rc$ ./rclone copy -vv gdrive:Videos /mnt/TANK/matt/yes
2023/08/10 17:04:14 DEBUG : rclone: Version "v1.63.1" starting with parameters ["./rclone" "copy" "-vv" "gdrive:Videos" "/mnt/TANK/matt/yes"]
2023/08/10 17:04:14 DEBUG : Creating backend with remote "gdrive:Videos"
2023/08/10 17:04:14 DEBUG : Using config file from "/mnt/TANK/matt/.config/rclone/rclone.conf"
2023/08/10 17:04:14 NOTICE: Time may be set wrong - time from "www.googleapis.com" is -21h0m10.747935414s different from this computer
2023/08/10 17:04:14 Failed to create file system for "gdrive:Videos": couldn't find root directory ID: googleapi: Error 401: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
More details:
Reason: authError, Message: Invalid Credentials

I've never had this happen before and I'm very confused.

Followed the guide Here and it fixed all my issues. As soon as I corrected the local time the 401 Errors went away :slight_smile:

1 Like

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