Sentry: WrongBackend/account/settings/social/associate/{backend}/ when attempting to link bitbucket repo

Created on 26 Jul 2018  路  8Comments  路  Source: getsentry/sentry

  • The version of Sentry you're using

9.0.0

  • Whether you're using Docker or another installation method

Official self hosted docker

  • Include a stacktrace or other logs when relevant
WrongBackend: Incorrect authentication service "bitbucket"
  File "django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "social_auth/decorators.py", line 27, in wrapper
    raise WrongBackend(backend)

This issue happens when I try and link a (private) bitbucket repo.
After I enter the bitbucket ownership/repo_name, I get informed that I need to associate an account with this. The system crashes when I continue.

Refer to this cast of issue in action:

https://drive.google.com/file/d/1WtSI87tTRVSt4__nYfy_yakgoJUefcI2/view

Integrations

Most helpful comment

@ProxiBlue You should create OAuth consumer key and secret on https://bitbucket.org/account/user/YOUR_USERNAME/api and then put

BITBUCKET_CONSUMER_KEY = '<Key>'
BITBUCKET_CONSUMER_SECRET = '<Secret>'

into sentry.conf.py

All 8 comments

I'm also seeing this, trying to associate a GitHub identity:

web_1        | Traceback (most recent call last):
web_1        |   File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 112, in get_response
web_1        |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
web_1        |   File "/usr/local/lib/python2.7/site-packages/social_auth/decorators.py", line 27, in wrapper
web_1        |     raise WrongBackend(backend)
web_1        | WrongBackend
web_1        | 10:01:11 [ERROR] django.request: Internal Server Error: /account/settings/social/associate/github/ (status_code=500 request=<WSGIRequest: GET u'/account/settings/social/associate/github/?next=%2Fsettings%2Faava%2Frepos%2F'>)

I fixed this by configuring the environment variables for GitHub oAuth integration. It wasn鈥檛 clear from the docs that is required.

@wolverian could you share the process you followed in order to fix this issue please?
Thanks

Hi.

Please remember the bug is for bitbucket repo issue only. If you have issue, note if it pertains to bitbucket, or GitHub.

If any fix corrects the bitbucket issue, make sure to say so.

Just concerned that original message of ticket, related to bitbucket gets muddled.

I can connect fine to GitHub. My issue, as noted, is with bitbucket.

@GWillmann I configured the GitHub plugin as per https://github.com/getsentry/sentry-plugins#github. I found no documentation on this in the official docs.

@ProxiBlue Sorry, you're right! I won't comment on this anymore.

@ProxiBlue You should create OAuth consumer key and secret on https://bitbucket.org/account/user/YOUR_USERNAME/api and then put

BITBUCKET_CONSUMER_KEY = '<Key>'
BITBUCKET_CONSUMER_SECRET = '<Secret>'

into sentry.conf.py

@barszczmm

Thank you for the info. as soon as I can will give that a try.

It rings a bell, might have tried it. Spent some effort to solve before I raised the bug.

@barszczmm - worked a charm - Thank you

Was this page helpful?
0 / 5 - 0 ratings