-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[BUG]: Unable to Register on Oppia.org #19858
Comments
Closing this as a duplicate of #19837. Thanks! |
It might be related, but this doesn't seem like the same error exactly as #19837 (the other issue seems to have learner groups in the mix somewhere). So let's keep this open until we're sure. |
While troubleshooting this, I found that selecting "Do not send these emails" for Email Preferences allows me to register successfully. |
@nikitaevg Could this be related? https://github.com/oppia/oppia/pull/19534/files FYI it seems like the 500 error that is preventing signup-with-email only started appearning in the 3.3.5 release. The error is:
There is also another error which is still occurring but I'm not sure if it's related:
|
Actually, @nikitaevg, scratch that, I think this isn't related to your changes. It seems that the marketing team reconfigured the signup form and that's resulting in an error. I'm going to try and work with them to resolve this. |
For now, let's do the following fix:
|
It looks like we already have code designed to handle mailchimp failures. If signup fails, we show a message like this on the signup page: (To get this screenshot, I had to hard-code the signup URL and modify some checks in the backend because we don't normally show the email signup form or this error message when running locally.) Here's the relevant frontend code: oppia/core/templates/pages/signup-page/signup-page.component.html Lines 72 to 83 in 8a4fda4
And here's where we trigger the display of the error message in the controller layer: oppia/core/controllers/profile.py Lines 542 to 556 in 8a4fda4
We already have error-handling code in oppia/core/platform/bulk_email/mailchimp_bulk_email_services.py Lines 287 to 304 in 8a4fda4
I think we can solve this issue by expanding the error-handling code to also cover the |
@U8NWXD Yup this sounds fine, thanks! Let's just make sure a server error gets logged as well so that we can track whether this issue happens. One thought -- maybe we should cover all exceptions, not just the specific "Your merge fields were invalid"? Basically, we want the user to still be able to sign up regardless of whether Mailchimp works or not. |
I have a fix implemented in https://github.com/U8NWXD/oppia/tree/fix-19858. Here's the flow: flow.movDetails on how I got the above recording and further testing of my approachTo simulate mailchimp failing and get debugging information, I applied this diff: diff --git a/assets/constants.ts b/assets/constants.ts
index 8e3d5e8684..12824d08ff 100644
--- a/assets/constants.ts
+++ b/assets/constants.ts
@@ -6162,7 +6162,7 @@ export default {
"MIN_QUESTION_COUNT_FOR_A_DIAGNOSTIC_TEST_SKILL": 3,
- "BULK_EMAIL_SERVICE_SIGNUP_URL": "",
+ "BULK_EMAIL_SERVICE_SIGNUP_URL": "emailSignup.example.com",
// The default number of opportunities to show on the contributor dashboard
// page.
diff --git a/core/controllers/profile.py b/core/controllers/profile.py
index 7800cbc0bb..9ec8a673d6 100644
--- a/core/controllers/profile.py
+++ b/core/controllers/profile.py
@@ -530,6 +530,7 @@ class SignupHandler(
@acl_decorators.require_user_id_else_redirect_to_homepage
def post(self) -> None:
"""Handles POST requests."""
+ logging.error('[DEBUGGING] CAN_SEND_EMAILS=%s', feconf.CAN_SEND_EMAILS)
assert self.user_id is not None
assert self.normalized_payload is not None
username = self.normalized_payload['username']
@@ -545,10 +546,16 @@ class SignupHandler(
feconf.DEFAULT_FEEDBACK_MESSAGE_EMAIL_PREFERENCE,
feconf.DEFAULT_SUBSCRIPTION_EMAIL_PREFERENCE,
)
+ logging.error(
+ '[DEBUGGING] bulk_signup_failed=%s',
+ bulk_email_signup_message_should_be_shown)
# Only block registration if bulk email configuration failed and the
# user requested bulk emails.
bulk_email_signup_message_should_be_shown = (
can_receive_email_updates and config_bulk_email_failed)
+ logging.error(
+ '[DEBUGGING] bulk_email_signup_message_should_be_shown=%s',
+ bulk_email_signup_message_should_be_shown)
if bulk_email_signup_message_should_be_shown:
self.render_json({
'bulk_email_signup_message_should_be_shown': (
diff --git a/core/domain/user_services.py b/core/domain/user_services.py
index e1c01b39d5..d50c2b2cbd 100644
--- a/core/domain/user_services.py
+++ b/core/domain/user_services.py
@@ -1644,6 +1644,7 @@ def update_email_preferences(
Returns:
bool. Whether updating the user's bulk email preferences failed.
"""
+ logging.error('[DEBUGGING] update_email_preferences() called')
email_preferences_model = user_models.UserEmailPreferencesModel.get(
user_id, strict=False)
if email_preferences_model is None:
@@ -1664,6 +1665,9 @@ def update_email_preferences(
bulk_email_services.add_or_update_user_status(
email, {}, 'Account',
can_receive_email_updates=can_receive_email_updates))
+ logging.error(
+ '[DEBUGGING] user_creation_successful=%s',
+ user_creation_successful)
if not user_creation_successful:
email_preferences_model.site_updates = False
email_preferences_model.update_timestamps()
diff --git a/core/feconf.py b/core/feconf.py
index 87faad4ce1..65a214d198 100644
--- a/core/feconf.py
+++ b/core/feconf.py
@@ -587,7 +587,7 @@ NOREPLY_EMAIL_ADDRESS = 'noreply@example.com'
# correspond to owners of the app before setting this to True. If
# SYSTEM_EMAIL_ADDRESS is not that of an app owner, email messages from this
# address cannot be sent. If True then emails can be sent to any user.
-CAN_SEND_EMAILS = False
+CAN_SEND_EMAILS = True
# If you want to turn on this facility please check the email templates in the
# send_role_notification_email() function in email_manager.py and modify them
# accordingly.
diff --git a/core/platform/bulk_email/dev_mode_bulk_email_services.py b/core/platform/bulk_email/dev_mode_bulk_email_services.py
index 552e3f1e8b..3654a6605b 100644
--- a/core/platform/bulk_email/dev_mode_bulk_email_services.py
+++ b/core/platform/bulk_email/dev_mode_bulk_email_services.py
@@ -61,4 +61,5 @@ def add_or_update_user_status(
'Updated status of email ID %s\'s bulk email preference in the service '
'provider\'s db to %s. Cannot access API, since this is a dev '
'environment.' % (user_email, can_receive_email_updates))
- return True
+ logging.error('[DEBUGGING] Simulating mailchimp failure.')
+ return False The devserver logs confirm that the simulated failure was correctly interpreted by the backend code:
Note that there's a mistake in the debugging code. The value logged for I also tried with the browser console open: flow_console_error.movThe console errors also happen in develop: before_flow.movDoes this UX look good to you @seanlip? If so I'll write the tests and open a PR |
Thanks @U8NWXD, this looks great. Please go ahead with the PR. One note though: I would suggest treating that PR as a partial fix of this issue, we should still leave this open for the full fix (or perhaps file a new issue to track that). Thanks! |
#20143 failed to fix the problem. Here is the new error log:
Note that a number of strings were redacted and replaced with |
Solutions:
|
We confirmed that after making the first name and last name fields optional on Mailchimp, registration succeeded. Remaining TODOs:
|
Describe the bug
After signing in with Google and entering various types of Username I click on submit. But it does not proceed further.
The console log error is attached below.
Oppia Console Log error.log
I was able to replicate this issue on both Google Chrome and Microsoft Edge.
URL of the page where the issue is observed.
https://www.oppia.org/signup?return_url=%2F
Steps To Reproduce
Here is the video link to replicate this issue with Console Log open.
https://www.loom.com/share/7090d336c22a42f7aaca4f4838a368aa?sid=8fc0c40b-6982-4b04-8da7-49c3d1ef78a8
Expected Behavior
I expect to be directed to the next page and have either an error shown or successful registration.
Screenshots/Videos
https://www.loom.com/share/7090d336c22a42f7aaca4f4838a368aa?sid=8fc0c40b-6982-4b04-8da7-49c3d1ef78a8
What device are you using?
Desktop
Operating System
Windows
What browsers are you seeing the problem on?
Chrome
Browser version
122.0.6261.69 (Official Build) (64-bit)
Additional context
No response
Tips for developers
Before addressing the bug, please identify which PR caused the issue (you can follow the steps here). If you identify the PR, comment on the issue with a link to it. If not, mention the commit hash of the oldest commit you saw the bug on (and the month and year it was made in).
Also, if this is your first issue, please make sure to follow https://github.com/oppia/oppia/wiki/Contributing-code-to-Oppia#choosing-a-good-first-issue and https://github.com/oppia/oppia/wiki/Contributing-code-to-Oppia#setting-things-up before claiming it. Thanks!
The text was updated successfully, but these errors were encountered: