Skip to content

JSONDecodeError at /complete/facebook #592

@troygrosfield

Description

@troygrosfield

I'm using python 3.4, django 1.8 and when I try and connect via facebook I receive the following error (this was previously working for me until doing one of the recent upgrades):

File "/python3.4/site-packages/django/core/handlers/base.py" in get_response
  132.         response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/python3.4/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  57.         response = view_func(request, *args, **kwargs)
File "/python3.4/site-packages/django/views/decorators/csrf.py" in wrapped_view
  58.         return view_func(*args, **kwargs)
File "/python3.4/site-packages/social/apps/django_app/utils.py" in wrapper
  52.         return func(request, backend, *args, **kwargs)
File "/python3.4/site-packages/social/apps/django_app/views.py" in complete
  28.         redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs)
File "/python3.4/site-packages/social/actions.py" in do_complete
  40.         user = backend.complete(user=user, *args, **kwargs)
File "/python3.4/site-packages/social/backends/base.py" in complete
  40.         return self.auth_complete(*args, **kwargs)
File "/python3.4/site-packages/social/utils.py" in wrapper
  202.         return func(*args, **kwargs)
File "/python3.4/site-packages/social/backends/facebook.py" in auth_complete
  78.          'code': self.data['code']
File "/python3.4/site-packages/social/backends/base.py" in get_json
  229.         return self.request(url, *args, **kwargs).json()
File "/python3.4/site-packages/requests/models.py" in json
  802.         return json.loads(self.text, **kwargs)
File "/python3.4/site-packages/simplejson/__init__.py" in loads
  505.         return _default_decoder.decode(s)
File "/python3.4/site-packages/simplejson/decoder.py" in decode
  370.         obj, end = self.raw_decode(s)
File "/python3.4/site-packages/simplejson/decoder.py" in raw_decode
  400.         return self.scan_once(s, idx=_w(s, idx).end())

Exception Type: JSONDecodeError at /complete/facebook
Exception Value: Expecting value: line 1 column 1 (char 0)

Facebook correctly sends back the access token and expires time:

access_token=some_correct_access_token&expires=5125437

However, once it hits the complete url, the error above appears. I can't get beyond the following line in the auth_complete method:

Thoughts?

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