When using Firebase Authentication on Android using mobile data, I get the following error when launching my application:
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)
But it displays without errors , and authentication happens fine without any errors when I launch one application using wifi with the following message, and not with the error above:
Considering local module com.google.android.gms.firebase_database:2 and remote module com.google.android.gms.firebase_database:2 Selected remote version of com.google.android.gms.firebase_database, version >= 2
The code I use to authenticate / create the 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 use
source share