Reinstall - New gdrive - gcd token just won't work

I get this message when I try to add ‘My Drive’ google drive. This is a google workspace account.

Failed to retrieve the id of the root: googleapi: Error 404: File not found:

I am only using the Directory tab, not Shared Drive.

I tried re-generating the gcd token many times, it just doesn’t work.

I tried generating a token from another Google Workspace org and I get the same message.

Just for more info, this is the message I receive if I just want the Shared Drives listed:

Failed to list the shared drives: googleapi: Error 403: Request had insufficient authentication scopes. Details: [ { "@type": "type.googleapis.com/google.rpc.ErrorInfo", "domain": "googleapis.com", "metadata": { "method": "google.apps.drive.v3.DriveDrives.List", "service": "drive.googleapis.com" }, "reason": "ACCESS_TOKEN_SCOPE_INSUFFICIENT" } ] More details: Reason: insufficientPermissions, Message: Insufficient Permission

I am on the latest version, I am trying to setup the gdrive storage through the web gui.

I’m running into the same issue.

I have a personal google account.
the token suddenly stopped working, and delete duplicacy and reauth instead resulted in the insufficient scope issue.

Wonder if something introduced a breaking change.

This could be related

Right. It looks like Google Drive just revoked all tokens previously issued with the full access scope.

You can work around the issue with the following steps:

  1. Obtain a new, app-scoped token from Google Drive for Duplicacy. This new token can only be used to access files created by Duplicacy
  2. Create a new temporary Google Drive storage in Duplicacy. When selecting the storage directory, don’t click the directory browsing button. Instead, just enter the old storage directory name in the input box. Google Drive will create a new directory with the same name, but this one can be accessed by the new app-scoped token
  3. The storage should be created with the same password if the previous storage was encrypted
  4. In Google Drive, remove the config file under the storage directory, and then copy over chunks, snapshots, and config from the old storage directory
  5. Remove the old Google Drive storage in Duplicacy and create a new one with the same storage name using the new app-scoped token
  6. All backup and schedule jobs should now work as before
2 Likes

I’ve deleted my previous gDrive “Storage”

But I don’t remember if I have changed the following fields:

Is there any place I can look it up?

Thanks

  1. I used the same storage directory (My Drive/Backup/Duplicacy)

No new “Duplicacy” folder was created. The app instead “found” the existing folder. Performing a check shows 0 backup and 0 versions.

  1. If I instead use a new directory: (My Drive/Backup/Duplicacy_v2)

The storage will be created successfully in duplicacy webapp, but no Duplicacy_v2 is created at the place.

Can you try using My Drive/Duplicacy as the new directory? I did not test the case where the storage directory is under another directory.

Hello gchen,

This worked for me. I just started a fresh backup anyways, so step 1-2 was enough for me.

yes this worked.

backup recovered, thanks!

Meny thanks for this!

I think (Hope) i did it the right way.

My “prune” job is taking very long. Is that normal? I have about 1,3 TB on my google drive.

Okay it did finish but i still get

Running check command from /cache/localhost/all
Options: [-log check -storage dbhansdude -a -tabular]
2024-10-13 12:01:02.427 INFO STORAGE_SET Storage set to gcd://Duplicacy
2024-10-13 12:01:05.939 INFO SNAPSHOT_CHECK Listing all chunks
2024-10-13 12:02:37.955 ERROR LIST_FILES Failed to list the directory chunks/: googleapi: Error 400: Invalid Value, invalid
Failed to list the directory chunks/: googleapi: Error 400: Invalid Value, invalid

EDIT. Just tryed to delete the old “Duplicacy” trust in my google drive and make a new token.
But im still getting error with the “Check” :frowning:

@gchen any good ideas?

Regards Daniel

Just sharing my thanks. My weekly backups only failed this week and I was completely unaware of the token changes by google. The solution/fix in this thread worked first time, thank you :smiley:

Thank you from me as well. For some reason it didn’t work the first time, but the second time I followed these instructions my Google Drive storage got up and running again.
Glad to be ditching Google Drive soon, when my current plan ends. Too much nonsense like this.

Thank you, this worked! My token also stopped working this week.

Not sure if i did something wrong. But i removed my storage in Duplicacy, created a new token and choosed the new token.

In the “Shared Drive” field i entered Duplicacy manually (removed my previous Duplicacy folder in Gdrive and created a new one.)
But when i browse the “Directory” field i get:

"Failed to list the directory “: googleapi: Error 404: Shared drive not found: Duplicacy, notFound”

Can someone help? :grinning: