-
Notifications
You must be signed in to change notification settings - Fork 30
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
Register New User form shows error after successfully creating account #6715
Comments
Testing NotesHere's an ongoing note of all my tests. All tests are done with macOS + Chrome 113 incognito, unless otherwise noted.
These tests indicate that the issue is consistent across browsers, and across production/staging.
Localhost tests 1 & 2 indicate that problem can't be replicated on Follow up:
|
Investigation NotesExamining the ![]() This looks pretty familiar: File:
Hang on, I see something here... RegisterFormContainer always assumes the onSignIn argument/function exists, and doesn't provide any fallback. So in theory, if a parent component forgets to provide onSignIn, it'll cause "this ain't a function" error. 🤔 Hypohesis: app-project's RegisterFormContainer is providing the onSignIn argument. However, app-root's(???) RegisterFromContainer forgot to set onSignIn. Follow up:
|
Testing NotesProduction tests 2:
Localhost tests 3:
Gotcha! ![]() |
Might date back to this? |
Investigation NotesSearching for every instance of app-project's `PageHeader.js` DOES provide onSignIn to `AuthModal` ✔️
app-root's `PageHeader.js` DOESN'T provide onSignIn to `AuthModal` ❌
lib-content's `Introduction.js` DOESN'T provide onSignIn to `AuthModal` ❌
lib-react-component's `AuthModal.stories.js` DOESN'T provide onSignIn to `AuthModal` ❌
lib-user's `dev/App.js` doesn't provide onSignIn to AuthModal, but it's a dev thing, so no worries 🤷
Key Takeaways
StatusCause of the issue has been identified. Now to determine the solution:
|
Looks like you're right! That PR introduces Thanks Jim, this helps confirm that the issue goes back to... 15 Dec 2023, wait what, 2023?? EDIT: Wait, no, it was introduced on 15 Dec 2023, but wouldn't affect actual users until the new home page officially switched over for them. |
The new code doesn’t store the signed-in user anywhere, so I think Adding a test to catch this bug seems like it would be straightforward too. Maybe a test in the root app that registers a new user? |
NB. the reason that The original design of the project app assumed a stateless client, with the assumption that auth state is the responsibility of the app, not the API client. |
You could also change the code to: onSignIn?.() Just in case someone overrides the default with null? Seems unlikely though. |
|
lol I actually did have |
You see, that’s where TypeScript can really be useful. Come to think of it, TypeScript would have caught this and stopped it from building. |
UI Error
Package: probably
lib-react-components
's AuthModal (unconfirmed)When a user attempts to register a new Zooniverse user account via the Register New User form, the account will be successfully created - HOWEVER, the form will display an error and refuse to close.
Process basically looks like this:
n is not a function
❗ This appears to affect all users currently, meaning our Register New User pipeline is borked.
Screenshot: after clicking "Register" (submit), the Register New User form displays the "n is not a function" error.

Notes:
See Slack: thread 1, thread 2
Replication
any FEM pagethe FEM home page,e.g.i.e. the Zooniverse home page https://www.zooniverse.org/Confirmed with macOS + Chrome 133 (Incognito), Firefox 135 (Privacy), on Zooniverse homepage, on production.
Update: you won't see this issue if you attempt to register a new user from an FEM project page.
Status
High priority issue, as this affects the new user registration process.
Aiming to get a fix done by this week.
Update 1:
RegisterFromContainer.js
will crash on a successful submit action, ifonSignIn
argument isn't defined.<AuthModal>
(which uses RegisterFormContainer) is missingonSignIn
argument.The text was updated successfully, but these errors were encountered: