Unable to authenticate users with Firebase using email and password on Android

234 views
Skip to first unread message

ayan some

unread,
Jun 6, 2016, 1:31:18 PM6/6/16
to Firebase Google Group
While using Firebase Authentication on Android to create/login user using email address and password,I am getting the following error:

com.google.firebase.FirebaseException: An internal error has occured. [ Internal error. ]
 at com
.google.android.gms.internal.zzacq.zzbN(Unknown Source)
 at com
.google.android.gms.internal.zzacn$zzg.zza(Unknown Source)
 at com
.google.android.gms.internal.zzacy.zzbO(Unknown Source)
 at com
.google.android.gms.internal.zzacy$zza.onFailure(Unknown Source)
 at com
.google.android.gms.internal.zzact$zza.onTransact(Unknown Source)
 at android
.os.Binder.execTransact(Binder.java:412)
 at dalvik
.system.NativeStart.run(Native Method)

The same app runs well on other android devices without any such error,but gives above error while running on my HTC Desire 820Q dual sim phone.

The code that I am using to create an user is as follows:

mAuth.createUserWithEmailAndPassword(emailSignup, passwordSignup)
                               
.addOnCompleteListener(LogInSignUp.this, new OnCompleteListener<AuthResult>() {
                                   
@Override
                                   
public void onComplete(@NonNull Task<AuthResult> task)
                                   
{


                                       
Log.d(TAG, "createUserWithEmail:onComplete:" + task.isSuccessful());


                                       
// If sign in fails, display a message to the user. If sign in succeeds
                                       
// the auth state listener will be notified and logic to handle the
                                       
// signed in user can be handled in the listener.
                                       
if (!task.isSuccessful())
                                       
{
                                           
Toast.makeText(LogInSignUp.this, "Authentication failed.",Toast.LENGTH_SHORT).show();

                                            task
.getException().printStackTrace();                                                                                      
                                            dialogLoading
.cancel();
                                       
}
                                       
else
                                       
{
                                           
String clientUID=mAuth.getCurrentUser().getUid();

                                           
FirebaseDatabase database = FirebaseDatabase.getInstance();
                                           
DatabaseReference user = database.getReference("clients");
                                            user
.push();


                                           
ClientProfile c=new ClientProfile();
                                            c
.setEmail(emailSignup);
                                            c
.setName(nameSignup);
                                            c
.setPassword(passwordSignup);
                                            user
.child(clientUID).setValue(c);


                                       
}


                                   
}
                               
});


I am using compile 'com.google.firebase:firebase-auth:9.0.2' in my gradle file,and google play services vesion 9.0.82 in my phone,but the error persists.

Cordelia Link

unread,
Jun 16, 2016, 6:21:02 PM6/16/16
to Firebase Google Group
To clarify, this error happens when the email user tries to sign in? Or is it when you create a new user?

Also, can you give an example of devices where your code works?
Reply all
Reply to author
Forward
0 new messages