5

I recently updated my GAE SDK and soon after the update, it has started acting up. I am using Google Cloud SQL in backend with Django 1.4.3. On my local dev server, it gives the following error :

No valid OAuth 2.0 credentials. Before using the Google SQL Service backend on dev_appserver, you must first run "manage.py syncdb" and proceed through the given instructions to fetch an OAuth 2.0 token.

I have tried removing cacert.txt as well as removing google sql authentication from my home directory to re-obtain authentication via running python manage.py syncdb, but it does not help.

The same question has been raise here with a "patch" provided:

http://code.google.com/p/googleappengine/issues/detail?id=9006

I tried changing my server.py as per the patch. But no effect.

Any help ?

1

1 Answer 1

1

I had the same problem, and this solved it for me:

  1. copy the refresh_token from the google oauth .dat json file
  2. added in app.yaml:

env_variables: GOOGLE_SQL_OAUTH2_REFRESH_TOKEN: "here the copied token"

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.