Hello!
I have worked Sentry 9.1.0 example, that works with docker-compose. And authentication uses Google OAuth (via sentry-auth-google package)
Now, I want to setup Sentry 9.1.1.
I copied my docker-compose.yml to another dir, changed image tag in Dockerfile, (I use onbuild version, because I put config.yml and sentry.conf.py to image) Also, I disabled installation sentry-auth-google via pip during image building.
After init migrations, I logged in and saw warning, that GOOGLE_CLIENT_ID
and GOOGLE_CLIENT_SECRET
were deprecated.
So, I deleted them from sentry.conf.py and added to config.yml:
auth-google.client-id: ‘***’
auth-google.client-secret: ‘***’
Then, I reinstalled sentry, reran migrations, logged in and went to http://sentry.myhost.com/organizations/sentry/auth, I pressed to configure button in front of google icon, I was redirected to google login page. After successful logging in I got an standard error
Oops! Something went wrong..and so on
In web container I see next error:
web_1 | 11:57:37 [INFO] sentry.superuser: superuser.request (user_id=1 url=u'http://sentry.myhost.com/organizations/sentry/auth/configure/' ip_address=u'172.21.0.1' method=u'GET')
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/django/views/generic/base.py", line 69, in view
web_1 | return self.dispatch(request, *args, **kwargs)
web_1 | File "/usr/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 57, in wrapped_view
web_1 | return view_func(*args, **kwargs)
web_1 | File "/usr/local/lib/python2.7/site-packages/sentry/web/frontend/base.py", line 225, in dispatch
web_1 | return self.handle(request, *args, **kwargs)
web_1 | File "/usr/local/lib/python2.7/site-packages/django/db/transaction.py", line 371, in inner
web_1 | return func(*args, **kwargs)
web_1 | File "/usr/local/lib/python2.7/site-packages/sentry/web/frontend/organization_auth_settings.py", line 186, in handle
web_1 | auth_provider=auth_provider,
web_1 | File "/usr/local/lib/python2.7/site-packages/sentry/web/frontend/organization_auth_settings.py", line 138, in handle_existing_provider
web_1 | 'provider': provider,
web_1 | File "/usr/local/lib/python2.7/site-packages/sentry/plugins/base/response.py", line 37, in render
web_1 | return render_to_string(self.template, context, request)
web_1 | File "/usr/local/lib/python2.7/site-packages/sentry/web/helpers.py", line 115, in render_to_string
web_1 | return loader.render_to_string(template, context)
web_1 | File "/usr/local/lib/python2.7/site-packages/django/template/loader.py", line 162, in render_to_string
web_1 | t = get_template(template_name)
web_1 | File "/usr/local/lib/python2.7/site-packages/django/template/loader.py", line 138, in get_template
web_1 | template, origin = find_template(template_name)
web_1 | File "/usr/local/lib/python2.7/site-packages/django/template/loader.py", line 131, in find_template
web_1 | raise TemplateDoesNotExist(name)
web_1 | TemplateDoesNotExist: sentry_auth_google/configure.html
web_1 | 11:57:37 [ERROR] django.request: Internal Server Error: /organizations/sentry/auth/configure/ (status_code=500 request=<WSGIRequest: GET u'/organizations/sentry/auth/configure/'>)
web_1 | 172.21.0.1 - - [05/Jun/2019:11:57:37 +0000] "GET /organizations/sentry/auth/configure/ HTTP/1.1" 500 7349 "http://sentry.myhost.com/settings/sentry/auth/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
The root is TemplateDoesNotExist: sentry_auth_google/configure.html
Previously, this file was a part of sentry-auth-google package. But currently I cannot find this file at filesystem, but still see references to it here https://github.com/getsentry/sentry/blob/9.1.1/src/sentry/auth/providers/google/views.py#L75.
What I should do to make it work and configure my auth provider?
p.s.
oauth2 - 1.9.0.post1
oauthlib - 3.0.1