Backup to Google Drive - auth issue

I have 2 backup jobs which upload files to Google Drive storage. One of them is working fine, but the second one can’t authorize with the same AutiID token as first one. Even when I try ti get another AuthID token for that second job - it show the same error:

Failed to connect: Failed to authorize using the OAuth service: Error: TrustFailure (One or more errors occurred.). If the problem persists, try generating a new authid token from: Duplicati OAuth Handler

Who OS(es) are the jobs running on?

If they’re on different boxes is it possible your SSL certificates are out of date on one of them?

Sorry, forgot to mention that. OS is Ubuntu 16.04 and both jobs are running on the same machine under the same Duplicaty installation.

your SSL certificates are out of date

what do you mean “your”? I have no SSL certificates at all…

Most (all?) operating systems, web browsers, etc. can have their own SSL certificate caches. Since Duplicati runs under mono, it uses the mono certificates for it’s secure communications.

Generally you (at user) doesn’t need to do anything with these certificates - the system takes care of keep them up to date. But on some versions of LInux, mono installs with an empty or VERY stale set of certificates so there’s nothing to updated, or what is updated is so old that they don’t include newer certificate providers.


However, since on a single machine one connection works and the other doesn’t we know that’s not the issue.

I’m assuming your passwords are correct so am going to call out to @kenkendk (and maybe @Pectojin) to see if there’s any other way they can think of that a single machine can have both working and failing OAUTH connections.

This sounds very strange… I’m not sure what this could be so I’m going to put forward my best guesses and questions and we’ll see where we can go :slight_smile:

What happens when you hit “Test connection” after generating the new OAuth token?

Do you have any Advanced Options on the Destination page, e.g. oauth-url or authid?

Has the destination folder been created on Google Drive? Does this happen if you use a different destination path?

Since it’s two jobs within the same Duplicati server it really has to be something within that job config or at least something related to where it’s targeting it’s backup.

a few weeks earlier it worked from time to time, but now it always says about failed OAuth authorization, no matter if I’m using newly generated token or a token from the first job that works fine

nope

yes

yes, I’ve tried to rename the destination folder and even put the path to other folder - always the same issue

Hmm, I’m pretty stumped here…

The best I can think of is trying to export the config and re-import it or creating a new job from scratch to test that. If it’s only happening to that job then it must be some kind of configuration in the DB… that’s not showing up in the UI?

Just tried to make a job from scratch. Created another folder on Google Drive. But not with the OAuth token from working job, nor with new one I couldn’t manage to establish even test connection: the same auth error everytime.
May I help somehow? Maybe I can provide some log info or configs or whatever…

I can see from the logs on the OAuth server that Google sometimes has “fits” and denies all requests in a period. I can also see some that appear to be repeatedly denied with the message “Invalid request”. Sadly, there is no more information about what part is invalid, and for anonymity/security reasons, I cannot see who is making the request, making it a bit harder to debug exactly what the problem is.

If you PM me with your IP, I can grab the logs from that IP and maybe that will help debug the issue.

One more question: should I use/generate different OAuthID for every backup job or may I use the same one for them?