Skip to content

Google OAuth2 - stopped working, now getting JSONDecodeError for token response #718

@trevoriancox

Description

@trevoriancox

This has been working for a long time, but on Aug 20 Google oauth2 stopped working (no change to our server).

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

stack trace:

  File "/home/appazur/.virtualenvs/ftserver/lib/python2.7/site-packages/social/backends/oauth.py", line 358, in request_access_token
    return self.get_json(*args, **kwargs)
  File "/home/appazur/.virtualenvs/ftserver/lib/python2.7/site-packages/social/backends/base.py", line 225, in get_json
    return self.request(url, *args, **kwargs).json()
  File "/home/appazur/.virtualenvs/ftserver/lib/python2.7/site-packages/requests/models.py", line 819, in json
    return json.loads(self.text, **kwargs)
  File "/home/appazur/.virtualenvs/ftserver/lib/python2.7/site-packages/simplejson/__init__.py", line 505, in loads
    return _default_decoder.decode(s)
  File "/home/appazur/.virtualenvs/ftserver/lib/python2.7/site-packages/simplejson/decoder.py", line 370, in decode

Parameters:

url 
'https://accounts.google.com/o/oauth2/token'
self    
<funtimes.user.backends.GoogleOAuth2 object at 0xa8a3a57ce10>
args    
()
kwargs  
{'data': {'client_id': u'....apps.googleusercontent.com',
          'client_secret': u'...',
          'code': u'4/f-iMWT8_jVrRTs7ew1wAsB7m5e9gfWRNI_Ih4w4w...',
          'grant_type': 'authorization_code',
          'redirect_uri': 'https://...appazur.com/social/complete/google-oauth2/'},
 'headers': {'Accept': 'application/json',
             'Content-Type': 'application/x-www-form-urlencoded'},
 'method': 'POST'}
/home/appazur/.virtualenvs/ftserver/lib/python2.7/site-packages/requests/models.py in json
                    return json.loads(self.text, **kwargs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions