I am trying to implement firebase authentication into my app but I keeping getting an error about a Recaptcha Action failing
The code of the function for this, which is connected to a button through an onClick function is
public void createAccount(View v)
{
mAuth.createUserWithEmailAndPassword("[email protected]", "password123#")
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()) {
// Sign in success, update UI with the signed-in user's information
Log.d("hi", "createUserWithEmail:success");
Toast.makeText(MainActivity.this, "Account Successful.",
Toast.LENGTH_SHORT).show();
FirebaseUser user = mAuth.getCurrentUser();
updateUI(user);
} else {
// If sign in fails, display a message to the user.
Log.w("hi", "createUserWithEmail:failure", task.getException());
Toast.makeText(MainActivity.this, "Authentication failed.",
Toast.LENGTH_SHORT).show();
updateUI(null);
}
}
});
}
and when I click the button, it calls the function and tells me the authentication fails and in my log cat, I get an error saying
nitial task failed for action RecaptchaAction(action=signUpPassword)with exception - An internal error has occurred. [ socket failed:EPERM (Operation not permitted) ]
followed by a warning saying
createUserWithEmail:failure com.google.firebase.FirebaseException: An internal error has occurred. [ socket failed:EPERM (Operation not permitted) ]
and I have tried redownloading my google services json file but that hasn’t fixed anything and I can’t find any solutions online so I’m hoping someone can help me
Chewietheshiba is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.