Closed Bug 1331651 Opened 7 years ago Closed 5 years ago

An ISE occurs when an anonymous user connects a GitHub account

Categories

(developer.mozilla.org Graveyard :: Profiles, enhancement, P3)

All
Other
enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jwhitlock, Unassigned)

Details

(Keywords: in-triage, Whiteboard: [specification][type:bug])

What did you do?
================
I am reporting from a traceback, so I am unsure how to reproduce the issue.

GitHub is returning a user with AuthProcess.CONNECT, but the user is not authenticated

What happened?
==============
django_allauth attempts to redirect them to the view "socialaccount_connections", which will require a login first.  This named view does not exist, so an ISE is raised.

What should have happened?
==========================
The user should be redirected to login

Is there anything else we should know?
======================================
The view was removed in PR 4014, when we transitioned to one GitHub account:

https://github.com/mozilla/kuma/pull/4014/files#diff-09883a31c21c5d0c55cd66222ff8b598L22

The view could be re-added as a stub page with login required.

Tracked in Sentry:

https://sentry.prod.mozaws.net/operations/mdn-prod/issues/378147/

Traceback:

NoReverseMatch: Reverse for 'socialaccount_connections' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
  File "django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "newrelic/hooks/framework_django.py", line 499, in wrapper
    return wrapped(*args, **kwargs)
  File "allauth/socialaccount/providers/oauth2/views.py", line 55, in view
    return self.dispatch(request, *args, **kwargs)
  File "allauth/socialaccount/providers/oauth2/views.py", line 125, in dispatch
    return complete_social_login(request, login)
  File "allauth/socialaccount/helpers.py", line 140, in complete_social_login
    return _add_social_account(request, sociallogin)
  File "allauth/socialaccount/helpers.py", line 93, in _add_social_account
    return HttpResponseRedirect(reverse('socialaccount_connections'))
  File "newrelic/hooks/framework_django.py", line 593, in wrapper
    return execute(*args, **kwargs)
  File "newrelic/hooks/framework_django.py", line 592, in execute
    return wrapped(viewname, *args, **kwargs)
  File "django/core/urlresolvers.py", line 578, in reverse
    return force_text(iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs)))
  File "django/core/urlresolvers.py", line 495, in _reverse_with_prefix
    (lookup_view_s, args, kwargs, len(patterns), patterns))
Severity: normal → enhancement
Keywords: in-triage
Priority: -- → P3

Sentry is clearing issues older than 3 months, and none are recorded.

I don't think we'll revisit this until and unless we add a second login method, at which point we can resurrect the account connections page.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.