Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Auth Internal Error on login attempt

We are an app that uses firebase to create and sign in users. The sign in worked fine before, but recently it started giving an "Internal Error" (in the picture below) whenever we try to sign in with an email and password

I checked to make sure that the sign in method (email and password) was enabled on firebase

FIRAuth.auth()?.signIn(withEmail: signInEmail.text!, password: signInPassword.text!, completion: { (user, error) in
    if(error == nil) {
        print("SUCCESS: User authenticated with firebase")
        if let user = user {
            KeychainWrapper.standard.set(user.uid, forKey: KEY_UID)
            print("SUCCESS: Data saved to keychain")
        }
    } else {
        print(error?.localizedDescription)
        print("Debug Description")
        print(error.debugDescription)
    }
}

This is the debug Description that comes up

Optional(Error Domain=FIRAuthErrorDomain Code=17999 "An internal error has occurred, print and inspect the error details for more information." UserInfo={error_name=ERROR_INTERNAL_ERROR, NSLocalizedDescription=An internal error has occurred, print and inspect the error details for more information., NSUnderlyingError=0x2835ccbd0 {Error Domain=FIRAuthInternalErrorDomain Code=4 "(null)" UserInfo={FIRAuthErrorUserInfoDeserializedResponseKey={
    displayName = "";
    email = "[email protected]";
    expiresIn = 3600;
    idToken ="eyJhbGciOiJSUzI1NiIsImtpZCI6IjU0OGYzZjk4N2IxNzMxOWZlZDhjZDc2ODNmNTIyNWEyOTY0YzY5OWQiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vbXJwYXJ0eS05MTNkMiIsImF1ZCI6Im1ycGFydHktOTEzZDIiLCJhdXRoX3RpbWUiOjE1NjA2NDc2MzcsInVzZXJfaWQiOiJ3aDlDQkdCYk1uY2Rvd044aUdXRVN0bXVlMk0yIiwic3ViIjoid2g5Q0JHQmJNbmNkb3dOOGlHV0VTdG11ZTJNMiIsImlhdCI6MTU2MDY0NzYzNywiZXhwIjoxNTYwNjUxMjM3LCJlbWFpbCI6ImxpbGh1Z2hlczEyQGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwiZmlyZWJhc2UiOnsiaWRlbnRpdGllcyI6eyJlbWFpbCI6WyJsaWxodWdoZXMxMkBnbWFpbC5jb20iXX0sInNpZ25faW5fcHJvdmlkZXIiOiJwYXNzd29yZCJ9fQ.i2qRZuZPPnxpKVN-4mWVwG8dZuTMvc10QV3MxzB_La_FBNqpBrErTPjGF9PiUSOtV60YpSFKtLTFdcS5GixvN3DCvVs8OxpGBykPyoS6c4ronm9Q0hU0nK8Mc_8Ahpkq9FZkfTGdTrVyUOM9j3gs8fhFOqa5mw-1u4mNNF_lQitt1xL2FuQeXhFNMYJm14HVxlKQh0Bxb_b7ogdjOzw1BcHsTsz0zLwWx-BTqOc6jyArCSZdTBJ4x-bgSl1m-JxinOUiTMATUdB9hnXRMZEUfd1s6hL6EvpZsT95Yxfgnu8sx1yOTbApRmNYR6TGDZjXDTjpY0mUqP-_YWD7V1yY4g";
    kind = "identitytoolkit#SignInWithPasswordResponse";
    localId = wh9CBGBbMncdowN8iGWEStmue2M2;
    refreshToken = "AEu4IL0vI7r7MpOLHLKNYUP8EH1i85KB8NUUA4PXSkYBa8Gmf7HhW77tqAU1aL3_zlPRdcIqrQR023l-X7mCoZe8MYgabwBXb9q9z23j7UtPAwk4QMNByOg97xqaNLejucqAXEDS2LkrvL1Ql58E1fDme4DdY4767kKj3ITrunym9HlbgVjBY4xJMZZyAS8tCFeMI8DQoEkJaNw5s_Wjs7bAejLfTjxjHw";
    registered = 1;
    }}}})
like image 947
Richard Hughes Avatar asked Mar 04 '23 20:03

Richard Hughes


1 Answers

Based on the limited code you provided, it looks like you are using Firebase version 3.11.0 and FirebaseAuth version 3.1.1. As of the most recent update to Firebase, the Sign In With Email function is no longer functional. In order to resolve this issue, you are going to have to update Firebase and FirebaseAuth to their latest versions (6.2.0 and 6.1.1 respectively).

In order to update your pods, go to your project folder in terminal and type pod update. This process may take a few minutes (depending on your computer and connectivity). After your pods have been updated, resolve all the compilation errors and you should be all set!

Hope this helps!

like image 117
Mitch Kelly Avatar answered Apr 02 '23 20:04

Mitch Kelly