Skip to content

General system exception - notifications (email) fail to send #12687

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

Closed
OmarWazzan opened this issue Jan 15, 2025 · 1 comment
Closed

General system exception - notifications (email) fail to send #12687

OmarWazzan opened this issue Jan 15, 2025 · 1 comment
Labels
status/stale This issue has not been updated recently

Comments

@OmarWazzan
Copy link

Describe the bug
(1) General system error appears in logs
(2) When trying to send an email notification, error ResponseError: Response returned an error code appears. No error appears on logs, but one does on terminal.

To Reproduce
Steps to reproduce the behavior:
General system error: No steps, just appears in logs
Notifications: Go to notification transport (email), test / Use email flow

Logs
General system exception:

Stacktrace from authentik
Traceback (most recent call last):
  File "/ak-root/venv/lib/python3.12/site-packages/celery/app/trace.py", line 545, in trace_task
    task_after_return(
  File "/authentik/events/system_tasks.py", line 86, in after_return
    DBSystemTask.objects.update_or_create(
  File "/ak-root/venv/lib/python3.12/site-packages/django/db/models/manager.py", line 87, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ak-root/venv/lib/python3.12/site-packages/django/db/models/query.py", line 986, in update_or_create
    obj, created = self.select_for_update().get_or_create(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ak-root/venv/lib/python3.12/site-packages/django/db/models/query.py", line 948, in get_or_create
    return self.get(**kwargs), False
           ^^^^^^^^^^^^^^^^^^
  File "/ak-root/venv/lib/python3.12/site-packages/django/db/models/query.py", line 652, in get
    raise self.model.MultipleObjectsReturned(
authentik.events.models.MultipleObjectsReturned: get() returned more than one SystemTask -- it returned 2!

Email test:
{"event": "Booting worker with pid: 35873", "level": "info", "logger": "gunicorn.error", "timestamp": 1736950968.107592}
{"event": "Internal Server Error: /api/v3/events/transports/1c1abc03-c569-4c46-908e-f2152509d11e/test/", "level": "error", "logger": "django.request", "timestamp": 1736974667.2981143}
2025-01-14 23:41:29 [info ] waiting to acquire database lock
2025-01-14 23:41:29 [info ] applying django migrations

Version and Deployment (please complete the following information):

  • authentik version: 2024.12.2
  • Deployment: [e.g. docker-compose, helm]

Additional context
Add any other context about the problem here.

@authentik-automation
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@authentik-automation authentik-automation bot added the status/stale This issue has not been updated recently label Mar 17, 2025
@authentik-automation authentik-automation bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/stale This issue has not been updated recently
Projects
None yet
Development

No branches or pull requests

1 participant