Registration process fails
/label Type: Bug Status: Need triage
Steps to reproduce
- Try to register a new user
- Registration is turned off but there's an invitation code
- Submit
What happens?
Front end returns that 'An error has occured' and that 'Your avatar could not be created'. docker-compose output says:
api_1 | 2020-11-18 21:07:41,676 django.request ERROR Internal Server Error: /api/v1/auth/registration/
api_1 | Traceback (most recent call last):
api_1 | File "/venv/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
api_1 | response = get_response(request)
api_1 | File "/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
api_1 | response = self.process_exception_by_middleware(e, request)
api_1 | File "/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
api_1 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
api_1 | File "/usr/lib/python3.7/contextlib.py", line 74, in inner
api_1 | return func(*args, **kwds)
api_1 | File "/venv/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
api_1 | return view_func(*args, **kwargs)
api_1 | File "/venv/lib/python3.7/site-packages/django/views/generic/base.py", line 71, in view
api_1 | return self.dispatch(request, *args, **kwargs)
api_1 | File "/venv/lib/python3.7/site-packages/django/utils/decorators.py", line 43, in _wrapper
api_1 | return bound_method(*args, **kwargs)
api_1 | File "/venv/lib/python3.7/site-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper
api_1 | return view(request, *args, **kwargs)
api_1 | File "/venv/lib/python3.7/site-packages/rest_auth/registration/views.py", line 46, in dispatch
api_1 | return super(RegisterView, self).dispatch(*args, **kwargs)
api_1 | File "/venv/lib/python3.7/site-packages/rest_framework/views.py", line 505, in dispatch
api_1 | response = self.handle_exception(exc)
api_1 | File "/venv/lib/python3.7/site-packages/rest_framework/views.py", line 465, in handle_exception
api_1 | self.raise_uncaught_exception(exc)
api_1 | File "/venv/lib/python3.7/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception
api_1 | raise exc
api_1 | File "/venv/lib/python3.7/site-packages/rest_framework/views.py", line 502, in dispatch
api_1 | response = handler(request, *args, **kwargs)
api_1 | File "/venv/lib/python3.7/site-packages/rest_framework/generics.py", line 190, in post
api_1 | return self.create(request, *args, **kwargs)
api_1 | File "/app/funkwhale_api/users/views.py", line 33, in create
api_1 | return super().create(request, *args, **kwargs)
api_1 | File "/venv/lib/python3.7/site-packages/rest_auth/registration/views.py", line 65, in create
api_1 | user = self.perform_create(serializer)
api_1 | File "/app/funkwhale_api/users/views.py", line 42, in perform_create
api_1 | authentication.send_email_confirmation(self.request, user)
api_1 | File "/venv/lib/python3.7/site-packages/allauth/account/utils.py", line 323, in send_email_confirmation
api_1 | signup=signup)
api_1 | File "/venv/lib/python3.7/site-packages/allauth/account/models.py", line 58, in send_confirmation
api_1 | confirmation.send(request, signup=signup)
api_1 | File "/venv/lib/python3.7/site-packages/allauth/account/models.py", line 163, in send
api_1 | get_adapter(request).send_confirmation_mail(request, self, signup)
api_1 | File "/venv/lib/python3.7/site-packages/allauth/account/adapter.py", line 455, in send_confirmation_mail
api_1 | ctx)
api_1 | File "/app/funkwhale_api/users/adapters.py", line 24, in send_mail
api_1 | return super().send_mail(template_prefix, email, context)
api_1 | File "/venv/lib/python3.7/site-packages/allauth/account/adapter.py", line 137, in send_mail
api_1 | msg.send()
api_1 | File "/venv/lib/python3.7/site-packages/django/core/mail/message.py", line 284, in send
api_1 | return self.get_connection(fail_silently).send_messages([self])
api_1 | File "/venv/lib/python3.7/site-packages/django/core/mail/backends/smtp.py", line 102, in send_messages
api_1 | new_conn_created = self.open()
api_1 | File "/venv/lib/python3.7/site-packages/django/core/mail/backends/smtp.py", line 62, in open
api_1 | self.connection = self.connection_class(self.host, self.port, **connection_params)
api_1 | File "/usr/lib/python3.7/smtplib.py", line 251, in __init__
api_1 | (code, msg) = self.connect(host, port)
api_1 | File "/usr/lib/python3.7/smtplib.py", line 336, in connect
api_1 | self.sock = self._get_socket(host, port, self.timeout)
api_1 | File "/usr/lib/python3.7/smtplib.py", line 307, in _get_socket
api_1 | self.source_address)
api_1 | File "/usr/lib/python3.7/socket.py", line 728, in create_connection
api_1 | raise err
api_1 | File "/usr/lib/python3.7/socket.py", line 716, in create_connection
api_1 | sock.connect(sa)
api_1 | OSError: [Errno 113] Host is unreachable
What is expected?
I want to have a new user on the instance and the registration process should continue.
Context
It's funkwhale v1.0.1 running as a
- docker container on an
- odroid armhf single-board running
- debian10 with an
- apache2 reverse proxy.
I followed the the build instructions for armhf from the docs and also the multi-container version of the docker installation guide.
I'm very fresh with both docker and funkwhale so I might have neglected sth important.
I could upload and listen to music and add an avatar to my superuser profile. So I'm not sure, what breaks while the registration process. I hope the log helps to help me :-)
Funkwhale version(s) affected: 1.0.1