Android Question Firebase Authex - SignInWithEmailAndPassword- log error

gregorio_adrian_gimenez

Active Member
Licensed User
Hi, does anyone know how to use the message that is shown in the log?
Show in log : com.google.firebase.auth.FirebaseAuthInvalidCredentialsException: The email address is badly formatted.

this code
B4X:
Log($"Authex_SignedIn(${success},${info})"$)
, return this result: Authex_SignedIn(false,Login Unsuccessful) but i need this log com.google.firebase.auth.FirebaseAuthInvalidCredentialsException: The email address is badly formatted.


B4X:
Starter.authex.SignInWithEmailAndPassword(EditText_mail.Text,EditText_password.Text)
        
        wait for authex_SignedIn (success As Boolean, User As FirebaseAuthUser, info As String)

        Log($"Authex_SignedIn(${success},${info})"$)
    If success Then
        If User = Null Then
            Log("nulluser SignedIn: ")
        Else
            Log("SignedIn: " & User.Uid)
            Log("User: " & User.DisplayName)
            Log("eMail: " & User.Email)
            Log("Anonimo: " & User.Anonymous)
            Log("mail verificado: " & User.EmailVerified)
            If User.EmailVerified = False Then
            
            User.sendEmailVerification
            End If

        End If
        Log("SignedIn: " & User.DisplayName)
    Else
        ToastMessageShow("intente nuevamente,no pudo loguearse",True)
        Log(info)
    End If
        StartActivity("cuenta_mail")' controlar que no exista creada la cuenta con anterioridad
    End If
log result.

SignedIn: MlNCOrTUfEUUh0ELA28VKyVBL9p2
User:
eMail: ggimenez@correo.com
Anonymously: false
Email verified: false
SignedIn:
** Activity (main) Pause, UserClosed = false **
** Activity (login) Create, isFirst = true **
~w:1004,login,33
** Activity (login) Resume **
signInWithEmail:eek:nComplete: false
TaskIncomplete
Result received
onFailure: Exception raised
com.google.firebase.auth.FirebaseAuthInvalidCredentialsException: The email address is badly formatted.
Authex_SignedIn(false,Login Unsuccessful)
Login Unsuccessful
** Activity (login) Pause, UserClosed = false **
** Activity (cuenta_mail) Create, isFirst = true **
~w:1004,cuenta_mail,27
** Activity (cuenta_mail) Resume **
** Activity (cuenta_mail) Pause, UserClosed = false **
Regards
 

gregorio_adrian_gimenez

Active Member
Licensed User
Hello! Yes, because I try to login with an incorrectly formatted email. But my question is if I can see that error in the code and not just in the registry (log). How can I catch him? with try Catch does not work regards
 

gregorio_adrian_gimenez

Active Member
Licensed User
If there were a way to get this record up, without change the library, it would be perfect for me. even in a not very elegant way. because I can avoid the errors when creating a user. I was studying the validations that firebase does and I can avoid them before executing the user created command.
 
Top