Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recovery flow failing in email stage #7352

Closed
mmierke opened this issue Oct 27, 2023 · 1 comment
Closed

Recovery flow failing in email stage #7352

mmierke opened this issue Oct 27, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@mmierke
Copy link

mmierke commented Oct 27, 2023

Describe the bug
I'm new to Authentik and tried to setup the recovery flow as described in the video of cooptainian.
However the flow is failing in the recovery email stage.

To Reproduce
Steps to reproduce the behavior:

  1. Logout
  2. Hit the "Forgot username or password" link
  3. Fill in your correct email address or password
  4. Press the continue button

Another way to reproduce it is to run the flow with the flow inspector

Expected behavior
A clear and concise description of what you expected to happen.
I would expect to receive an email to reset my password and to continue.

Screenshots
If applicable, add screenshots to help explain your problem.
grafik

Logs
Output from the events log after using the inspector
Context
{
"geo": {
"lat": 51.7174,
"city": "Paderborn",
"long": 8.7411,
"country": "DE",
"continent": "EU"
},
"message": "Traceback (most recent call last):\n File "/authentik/flows/views/executor.py", line 287, in get\n stage_response = self.current_stage_view.dispatch(request)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/ak-root/venv/lib/python3.11/site-packages/django/views/generic/base.py", line 143, in dispatch\n return handler(request, *args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/authentik/stages/email/stage.py", line 142, in get\n self.send_email()\n File "/authentik/stages/email/stage.py", line 121, in send_email\n send_mails(current_stage, message)\n File "/authentik/stages/email/tasks.py", line 26, in send_mails\n promise = lazy_group()\n ^^^^^^^^^^^^\n File "/ak-root/venv/lib/python3.11/site-packages/celery/canvas.py", line 1568, in call\n return self.apply_async(partial_args, **options)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/ak-root/venv/lib/python3.11/site-packages/celery/canvas.py", line 1598, in apply_async\n results = list(self._apply_tasks(tasks, producer, app, p,\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/ak-root/venv/lib/python3.11/site-packages/celery/canvas.py", line 1775, in _apply_tasks\n sig.apply_async(producer=producer, add_to_parent=False,\n File "/ak-root/venv/lib/python3.11/site-packages/celery/canvas.py", line 400, in apply_async\n return _apply(args, kwargs, **options)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/ak-root/venv/lib/python3.11/site-packages/sentry_sdk/integrations/celery.py", line 202, in apply_async\n return f(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^\n File "/ak-root/venv/lib/python3.11/site-packages/celery/app/task.py", line 594, in apply_async\n return app.send_task(\n ^^^^^^^^^^^^^^\n File "/ak-root/venv/lib/python3.11/site-packages/celery/app/base.py", line 798, in send_task\n amqp.send_task_message(P, name, message, **options)\n File "/ak-root/venv/lib/python3.11/site-packages/celery/app/amqp.py", line 517, in send_task_message\n ret = producer.publish(\n ^^^^^^^^^^^^^^^^^\n File "/ak-root/venv/lib/python3.11/site-packages/kombu/messaging.py", line 175, in publish\n body, content_type, content_encoding = self._prepare(\n ^^^^^^^^^^^^^^\n File "/ak-root/venv/lib/python3.11/site-packages/kombu/messaging.py", line 268, in _prepare\n body) = dumps(body, serializer=serializer)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/ak-root/venv/lib/python3.11/site-packages/kombu/serialization.py", line 219, in dumps\n with _reraise_errors(EncodeError):\n File "/usr/local/lib/python3.11/contextlib.py", line 155, in exit\n self.gen.throw(typ, value, traceback)\n File "/ak-root/venv/lib/python3.11/site-packages/kombu/serialization.py", line 45, in _reraise_errors\n reraise(wrapper, wrapper(exc), sys.exc_info()[2])\n File "/ak-root/venv/lib/python3.11/site-packages/kombu/exceptions.py", line 34, in reraise\n raise value.with_traceback(tb)\n File "/ak-root/venv/lib/python3.11/site-packages/kombu/serialization.py", line 41, in _reraise_errors\n yield\n File "/ak-root/venv/lib/python3.11/site-packages/kombu/serialization.py", line 220, in dumps\n payload = encoder(data)\n ^^^^^^^^^^^^^\n File "/ak-root/venv/lib/python3.11/site-packages/kombu/utils/json.py", line 57, in dumps\n return _dumps(s, cls=cls, **dict(default_kwargs, **kwargs))\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/usr/local/lib/python3.11/json/init.py", line 238, in dumps\n **kw).encode(obj)\n ^^^^^^^^^^^\n File "/usr/local/lib/python3.11/json/encoder.py", line 200, in encode\n chunks = self.iterencode(o, _one_shot=True)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/usr/local/lib/python3.11/json/encoder.py", line 258, in iterencode\n return _iterencode(o, 0)\n ^^^^^^^^^^^^^^^^^\n File "/ak-root/venv/lib/python3.11/site-packages/kombu/utils/json.py", line 45, in default\n return super().default(o)\n ^^^^^^^^^^^^^^^^^^\n File "/usr/local/lib/python3.11/json/encoder.py", line 180, in default\n raise TypeError(f'Object of type {o.class.name} '\nkombu.exceptions.EncodeError: Object of type MIMEImage is not JSON serializable",
"http_request": {
"args": {
"next": "/"
},
"path": "/api/v3/flows/executor/recovery/",
"method": "GET"
}
}
User
{
"pk": 1,
"email": "",
"username": "AnonymousUser"
}
Version and Deployment (please complete the following information):

  • authentik version: 2023.10.1
  • Deployment: docker-compose

Additional context
I tested my email setup as described in the troubleshooting section. Everything worked fine. Test Mail received

@mmierke mmierke added the bug Something isn't working label Oct 27, 2023
@igor47
Copy link

igor47 commented Oct 27, 2023

duplicate of #7322

@BeryJu BeryJu closed this as not planned Won't fix, can't repro, duplicate, stale Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants