Authentication error with google drive [$10]

Bug #1747646 reported by Sam on 2018-02-06
This bug affects 19 people
Affects Status Importance Assigned to Milestone
Déjà Dup

Bug Description


I'm having an issue using deja-dup to back up my laptop to my google drive.

When backing only a small folder (eg: ~/Documents) every thing works fine.
However when trying to backup my whole home folder (/home/myusername) I get an "Invalid credentials" error after 5-10 min.

The back up seems to start normally and my destination folder starts filling with "duplicity-full...difftar.gz" files, but eventually I get the Invalid Credentials error.

lsb_release -d
Fedora release 27 (Twenty Seven)

rpm -q deja-dup duplicity

deja-dup.log attached.
I cannot attach deja-dup.gsettings since i can only join 1 file. Will send if needed.

Sam (scaum) wrote :
Sam (scaum) wrote :

I tried today using duplicity (followed this guide and everything went fine.

For some reason the issue seems linked to deja-dup

Michael Terry (mterry) wrote :

Ah that blog post is using a different duplicity backend than deja-dup is using. Can you try something for me?

Instead of running "duplicity .... gdocs://<email address hidden>/backup" can you do "duplicity .... gio+google-drive://<email address hidden>/backup"? You'll need to do that inside your desktop session (i.e. not from cron).

Let me know if that hits the same bug you're seeing with deja-dup.

Changed in deja-dup:
status: New → Incomplete
Sam (scaum) wrote :


Thank you for your answer. Using your command gives me another error (not same as with deja-dup).

export GOOGLE_DRIVE_SETTINGS=~/.duplicity/credentials
duplicity --exclude-filelist ~/.duplicity/ignore ~/ gio+google-drive://myemail/test
Traceback (innermost last):
  File "/usr/bin/duplicity", line 1559, in <module>
  File "/usr/bin/duplicity", line 1545, in with_tempdir
  File "/usr/bin/duplicity", line 1381, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/lib64/python2.7/site-packages/duplicity/", line 1140, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/usr/lib64/python2.7/site-packages/duplicity/", line 1015, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/usr/lib64/python2.7/site-packages/duplicity/", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/usr/lib64/python2.7/site-packages/duplicity/", line 209, in get_backend_object
    return factory(pu)
  File "/usr/lib64/python2.7/site-packages/duplicity/backends/", line 97, in __init__
 Error: g-io-error-quark: Operation unsupported (15)

The "test" folder was already created in my drive account at "root" level (next to the backup folder I am using with the other command).

Vej (vej) on 2018-02-13
Changed in deja-dup:
status: Incomplete → New
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
Jacob Marciniec (foxyjacob) wrote :

Bumping this... I will gladly pitch in $10 to whoever fixes this. This bug affects me and I really would love to see it solved. I can help with any diagnostics.

summary: - Authentication error with google drive
+ Authentication error with google drive [$10]
tags: added: bounty
Johannes Choo (jhanschoo) wrote :

I noticed that I encounter this error when I am connecting via a VPN service, and do not encounter this error when I am not. If the reason is that Google rejects authenticating from suspicious IPs with the kind of authentication deja-dup and GNOME's online accounts use, I don't know if the team can do anything about it.

If this is indeed the case, I think a workaround by connecting from a non-blacklisted IP may work.

Johannes Choo (jhanschoo) wrote :

I would like to retract my report: my backups appear to not have completed.

Usul_ (usul-) wrote :

This happens to me to. I am not using a personal google account but a corporate one.
After 5 or 10 minutes I get an authentication error.
I am on ubuntu 18.04 using deja-dup 37-1 and duplicity 0.7.17

Cody Hodges (cody35367) wrote :

Perhaps the OAuth token is expiring during long backup jobs and needs to be renewed? Not sure what it is based on because our times vary widely.

This happens to me after first-time backup running for about 45 minutes. Then it fails with (same as OP's log):
Giving up after 5 attempts. Error: gdata-service-error-quark: Authentication required: {
 "error": {
  "errors": [
    "domain": "global",
    "reason": "authError",
    "message": "Invalid Credentials",
    "locationType": "header",
    "location": "Authorization"
  "code": 401,
  "message": "Invalid Credentials"

Ubuntu 18.04.01 using:
deja-dup 37.1-2fakesync1
duplicity 0.7.17-0ubuntu1

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments