-
Notifications
You must be signed in to change notification settings - Fork 105
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
🐛 [firebase auth ui] Error reported in console when verifying email address using web app #20
Comments
Hi @graemep-nz, I followed the steps you outlined above but I did not get any errors in my console (either chrome or IDE) when I hit go back after the sign up. I also attempted to login with the credentials and in my initial tests, I did not encounter the infinite loading you mentioned. In subsequent tests, firebase blocks the messages because I've been sending too many requests. Is there any additional information you can provide? It seems all is working just fine on my end. The recording below is for the first error that you reported (looking up a deactivated widget). recordingScreen.Recording.2023-05-08.at.10.17.46.mov |
I'll see if I can recover my ability to login to firebase by deleting a local cache or something, if I can't I'll try on a different machine. In the meantime, do you have any idea what causes this error message Also, what do you mean firebase blocks because you sent too many requests - what kind of requests were you sending and how many does it take for firebase to block? |
Unfortunately, I don't know what condition trigger this. How often do you see this?
It was the email invites. I might have tested with a few too many accounts & sent a few too many emails |
It might have been that firebase was blocking me like you said it was doing to you because tonight the app is usable again and I can log in and log out etc. I suspect the error message "Please verify the new email before changing email" comes from the remote firebase server as the error text does not appear in any of the local "localization" source files nor in any of the local firebase_auth source files. Did you notice I was using an outdated version of firebase_ui_auth. I've changed to this but the problem is still there
I can consistently reproduce the error Just in case you didn't could you please try it like this
now you should get the error message "unsafe...". I also got a new error tonight as below. I am testing with three different gmail email addresses. The system lets me register them all from the same PC/ app so I have been trying things like signing up then deleting the account and trying to sign in etc.
This is the function that is giving the "ancestor ... unsafe" error message. The error is with the "ofType" function call which occurs after the await has completed. The caller isn't doing an await - it can't - it's in a build method. Why is the signOut function doing a callback when the goBack button has already done a callback. A delayed callback using build context seems wrong. static Future<void> signOut({
BuildContext? context,
FirebaseAuth? auth,
}) async {
final resolvedAuth = auth ?? FirebaseAuth.instance;
await OAuthProviders.signOut(resolvedAuth);
await resolvedAuth.signOut();
if (context != null) {
final action = FirebaseUIAction.ofType<SignedOutAction>(context);
action?.callback(context);
}
} The caller isn't doing an await '/verify-email': (context) {
return EmailVerificationScreen(
headerBuilder: headerIcon(Icons.verified),
sideBuilder: sideIcon(Icons.verified),
actionCodeSettings: actionCodeSettings,
actions: [
EmailVerifiedAction(() {
Navigator.pushReplacementNamed(context, '/profile');
}),
AuthCancelledAction((context) {
FirebaseUIAuth.signOut(context: context);
Navigator.pushReplacementNamed(context, '/');
}),
],
);
}, UniversalButton(
variant: ButtonVariant.text,
text: l.goBackButtonLabel,
onPressed: () {
FirebaseUIAction.ofType<AuthCancelledAction>(context)
?.callback(context);
},
) |
I still cannot seem to reproduce the issue and I keep running to firebase blocking the email so the buttons are never shown. I'll be labeling this for further insight & investigation from the team recordingScreen.Recording.2023-05-11.at.10.14.29.mov |
Just tell Andreii Lesnitsky that the callback in the signOut function causes a problem for the example app |
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require attention?
Thank you for your contributions. |
Bug report
Using google chrome and a web app, register a new email address and wait for the verify email to be sent. Without clicking on the link in the verify email, click "continue" or "go back" on the verify email screen. An error is reported in the android studio console
Error: Looking up a deactivated widget's ancestor is unsafe.
After the above error, if you then attempt to sign in, it accepts the sign in but goes to the verify email screen (as it should) and it shows the large spinning circle indefinitely but fails to send a new verify email so it is now not possible to verify the email address, nor is it possible to delete the new account. If you click "forgot password" you can reset the password and verify the email address at the same time - however when I clicked "continue" the app died completely with no error message in the console and a blank browser window.
After restarting the app, now try to sign in with a second email address that is previously registered and the screen shows a red error message
"An internal auth error has occurred"
Steps to reproduce
As above.
Expected behavior
The console should not report an error and the system should not prevent someone from repeating the verify operation.
Also, when the continue button is clicked, if the email address has not been verified it should say that verification has not been done and stay on the same screen. The go back button can be used to go back to the sign in screen.
Eventually the system got into a state where it was not possible to register a new email address, the "forgot password" mechanism stopped working and registering a new email address gets an error on the screen in red "Please verify the new email before changing email". i.e. the system is completely useless - I can't sign in nor can I register a new email address.
Sample project
Use the example app in the git repo of firebase auth UI which uses the "flutterfire-e2e-tests" project on firebase
Additional context
Add any other context about the problem here.
Flutter doctor
Run
flutter doctor
and paste the output below:Click To Expand
Flutter dependencies
Run
flutter pub deps -- --style=compact
and paste the output below:Click To Expand
The text was updated successfully, but these errors were encountered: