5
votes

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
Is there a file ~/.googlesql_oauth2.dat as described in Django Support (developers.google.com/appengine/docs/python/cloud-sql/django) - Lee

1 Answers

1
votes

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"