[GH-ISSUE #1111] Enabling 2FA fails with error 500 #771

Closed
opened 2026-02-25 23:43:31 +03:00 by kerem · 1 comment
Owner

Originally created by @twiesing on GitHub (Jan 3, 2025).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/1111

When trying to enable 2fa, I'm getting an error 500. Enabling the debug mode it says:

No SMTP configuration, see https://github.com/healthchecks/healthchecks#sending-emails

Request Method: | GET
-- | --
https://healthchecks.mydomain.org/accounts/two_factor/totp/
5.1.4
AssertionError
No SMTP configuration, see https://github.com/healthchecks/healthchecks#sending-emails
/app/healthchecks/hc/lib/emails.py, line 67, in send
hc.accounts.views.add_totp
/usr/sbin/uwsgi
3.12.8
['.',  '',  '/usr/lib/python312.zip',  '/usr/lib/python3.12',  '/usr/lib/python3.12/lib-dynload',  '/lsiopy/lib/python3.12/site-packages']
Fri, 03 Jan 2025 20:46:43 +0000

An error message (without enabling debug mode) would be helpful.

And: Why I can't enable totp without smtp? 🤔

Originally created by @twiesing on GitHub (Jan 3, 2025). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/1111 When trying to enable 2fa, I'm getting an error 500. Enabling the debug mode it says: ``` No SMTP configuration, see https://github.com/healthchecks/healthchecks#sending-emails Request Method: | GET -- | -- https://healthchecks.mydomain.org/accounts/two_factor/totp/ 5.1.4 AssertionError No SMTP configuration, see https://github.com/healthchecks/healthchecks#sending-emails /app/healthchecks/hc/lib/emails.py, line 67, in send hc.accounts.views.add_totp /usr/sbin/uwsgi 3.12.8 ['.', '', '/usr/lib/python312.zip', '/usr/lib/python3.12', '/usr/lib/python3.12/lib-dynload', '/lsiopy/lib/python3.12/site-packages'] Fri, 03 Jan 2025 20:46:43 +0000 ``` An error message (without enabling debug mode) would be helpful. And: Why I can't enable totp without smtp? 🤔
kerem closed this issue 2026-02-25 23:43:31 +03:00
Author
Owner

@cuu508 commented on GitHub (Jan 4, 2025):

An error message (without enabling debug mode) would be helpful.

On startup in the logs you should see even with DEBUG=False:

WARNINGS:
?: (hc.api.W002) settings.EMAIL_HOST is not set, cannot send email
	HINT: See https://github.com/healthchecks/healthchecks#sending-emails

And: Why I can't enable totp without smtp?

Healthchecks sends a verification code to your email address before sensitive actions – adding/removing 2FA, changing email, changing password.

<!-- gh-comment-id:2571256889 --> @cuu508 commented on GitHub (Jan 4, 2025): > An error message (without enabling debug mode) would be helpful. On startup in the logs you should see even with DEBUG=False: ``` WARNINGS: ?: (hc.api.W002) settings.EMAIL_HOST is not set, cannot send email HINT: See https://github.com/healthchecks/healthchecks#sending-emails ``` > And: Why I can't enable totp without smtp? Healthchecks sends a verification code to your email address before sensitive actions – adding/removing 2FA, changing email, changing password.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#771
No description provided.