Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems when trying to connect to Google oauth2 endpoint #276

Closed
gonzofy opened this issue Dec 4, 2016 · 6 comments
Closed

Problems when trying to connect to Google oauth2 endpoint #276

gonzofy opened this issue Dec 4, 2016 · 6 comments
Assignees
Labels

Comments

@gonzofy
Copy link

gonzofy commented Dec 4, 2016

Thanks for writing gmvault! I've been using it successfully for a long time.

I'm getting 400 errors from Google now.

I'm using v1.9.1. I have been using it successfully since it was launched and have changed nothing about the installation, so I assume Google changed something. For example, Google might have changed the API for its oauth endpoint. Yesterday and today I've had issues with gmvault authenticating with Google.

Here's what I see:

Authentication performed with Gmail OAuth2 access token.

Get OAuth2 credential from ...

Error: Problems when trying to connect to Google oauth2 endpoint: https://accounts.google.com/o/oauth2/token.

Error: HTTP Error 400: Bad Request.

=== Exception traceback ===
Traceback (most recent call last):
  File "/Users/gaubert/Dev/projects/gmvault-1.8.2/build/gmvault/out00-PYZ.pyz/gmv.gmv_cmd", line 743, in run
  File "/Users/gaubert/Dev/projects/gmvault-1.8.2/build/gmvault/out00-PYZ.pyz/gmv.credential_utils", line 235, in get_credential
  File "/Users/gaubert/Dev/projects/gmvault-1.8.2/build/gmvault/out00-PYZ.pyz/gmv.credential_utils", line 411, in get_oauth2_credential
  File "/Users/gaubert/Dev/projects/gmvault-1.8.2/build/gmvault/out00-PYZ.pyz/gmv.credential_utils", line 267, in _get_oauth2_acc_tok_from_ref_tok
HTTPError: HTTP Error 400: Bad Request

=== End of Exception traceback ===```

One minor thing: as you see above, the message in the Exception traceback appears to be a hard-coded path to `/Users/gaubert/Dev/projects/gmvault-1.8.2/` which is (a) not my laptop! and (b) not even the right version (1.8.2 exists nowhere on my computer).
@gaubert
Copy link
Owner

gaubert commented Jan 3, 2017

@gonzofy I had the same issue on an old account for testing and I had to renew the oauth2 token and now it works.
Please try to do the same and let me know

@gaubert gaubert self-assigned this Jan 3, 2017
@gaubert gaubert added the done label Jan 3, 2017
@gaubert gaubert closed this as completed Jan 4, 2017
@DavidBerdik
Copy link

@gonzofy I had the same issue on an old account for testing and I had to renew the oauth2 token and now it works.
Please try to do the same and let me know

Did you have to renew it multiple times? It seems that I need to renew it about once a week which is exceptionally annoying since I am trying to use gmvault to take automated backups.

@bleistift2
Copy link

@gonzofy I had the same issue on an old account for testing and I had to renew the oauth2 token and now it works.
Please try to do the same and let me know

Did you have to renew it multiple times? It seems that I need to renew it about once a week which is exceptionally annoying since I am trying to use gmvault to take automated backups.

I have to renew it about every week as well, makes the whole backup strategy unreliable.
Is the Password option still possible and why is it not recommended?

@DavidBerdik
Copy link

@bleistift2 To fix the weekly expiration, follow the instructions in these two posts:

@bleistift2
Copy link

@bleistift2 To fix the weekly expiration, follow the instructions in these two posts:

Thank you for your answer, I have already created the project.
Unfortunately I don't understand your recommended procedure:
"if you submit the app for verification but don't fill out the necessary forms to actually be formally verified, your project gets put in a state in which it is only available to users that are specified as test users, but since you are also not in test mode anymore, the 7-day expiration no longer happens."

How do I submit the app to verification?
Someone else called it "publish the app", I can't find either in my Google cloud platform control center.

@DavidBerdik
Copy link

How do I submit the app to verification?
Someone else called it "publish the app", I can't find either in my Google cloud platform control center.

Check the "Publishing status" section of https://console.developers.google.com/apis/credentials/consent.

This is how mine looks. Yours should look like this too if you have it set up properly:
image

If it doesn't look like this, you will want to click the button under the "publishing status" section. I forget what exactly the button says if you haven't pressed it. I believe it says "publish" or "release" or something like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants