I'm trying to send a password reset email with firebase but it doesn't work. It doesn't throw any exceptions either. It just never completes, and I see no errors in the console. I tried debugging it and I saw that the parameter action code is null, is it supposed to be? All guides covering this don't add any action codesettings. I've tried signing out the user first but that doesn't seem to work. What to do?
This await firebaseAuth.sendPasswordResetEmail(email: currentEmail);
is nested in a try-catch block that's all.
Console output:
W/System ( 757): Ignoring header X-Firebase-Locale because its value was null.
I/System.out( 757): isEmailSend:POST
I/System.out( 757): port:443
D/GraphicBuffer( 757): register, handle(0x8240d540) (w:720 h:1504 s:720 f:0x1 u:f02)
I/System.out( 757): Check isMmsSendPdu
I/System.out( 757): [OkHttp] sendRequest<<
This is all I see. The future just never completes.
CodePudding user response:
Firstly i was stuck too in this while doing my first attempt.I realized i didn't activated resetpassword method on firebase console authetication. After this i got same result because while trying with email doesn't exist on firebase console user panel that mail adress. My suggestion check turn on password reset method on console and try it with exist email user. and be sure you don't try with null in email all of that if doesn't work maybe it can be about the port settings. And one more try change this
firebaseAuth.sendPasswordResetEmail(email: currentEmail)
to
firebaseAuth.sendPasswordResetEmail(currentEmail)
CodePudding user response:
Please check if your emulator is connected to the internet. Sometimes the wifi is on but does not connected to the internet.
and also make sure you email/password sign-in method on firebase is enabled
and if that doesn't work then add this line: android:usesCleartextTraffic="true"
to your android > app > src > main > AndroidMaifest.xml