-
Notifications
You must be signed in to change notification settings - Fork 305
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
Unhandled internal exception on signup: "Unexpected challengeName encountered in ConfirmSignIn: undefined" #5067
Comments
I should have mentioned that bypassing the official header with this code works, but is obviously not ideal:
|
@EricDAllen Will take a look. Can you provide the contents of your amplify configuration (sans any sensitive data) to aid with debugging? |
Very much appreciated! Here you go:
|
Thanks for raising the issue @EricDAllen. We've merged a fix (#5068) that will go out in the next release |
Wow - impressive turnaround time! Thanks for your help! |
Hey @EricDAllen the fix has been published, make sure to upgrade to the latest version, |
Tested locally - works like a champ! |
Before creating a new issue, please confirm:
On which framework/platform are you having an issue?
React
Which UI component?
Authenticator
How is your app built?
Create React App
What browsers are you seeing the problem on?
Chrome
Which region are you seeing the problem in?
No response
Please describe your bug.
Internal crash when looking up a string to render on the ConfirmSignIn dialog.
My
formFields
just defines one custom signup field, and myservices
only defines a validateCustomSignUp method. Otherwise, I'm using a completely out-of-the-box authenticator for sign in and sign up. The email field is used for the Cognito username.What's the expected behaviour?
I have a few expectations:
This unhandled exception stems from Amplify not being able to look up an informational string to put into the Header of the SMS confirmation screen (specifically the getChallengeText method of the ConfirmSignIn component). That shouldn't be fatal, here. The defaultTexts file defines the two specific options AND a generic option that looks like it'd be a good enough fallback to use:
CONFIRM_SMS: 'Confirm SMS Code',
CONFIRM_TOTP: 'Confirm TOTP Code',
CONFIRM: 'Confirm',
Maybe you could introduce another string that says 'Confirm Code', if you wanted to be even more specific, but I definitely don't need to be seeing a crash, just because you can't look up a specific string.
This crash only seems to be happening on the automatic sign in after a sign up. I don't know why the challengeName isn't getting set in the one flow and not the other, but that's ultimately the real underlying bug.
This code in ConfirmSignIn is obviously fragile. Perhaps in addition to item 1 above, if the challengeName is undefined, you could skip the call to getChallengeText and use some hard-coded default.
Help us reproduce the bug!
Hoping what I've given above is enough detail, but hit me up if you need more.
Code Snippet
// Put your code below this line.
Console log output
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: