Authentication failed.com.google.firebase.FirebaseException: An internal error has occured. [ OPERATION_NOT_ALLOWED ]
<p>I keep getting this error while attempting to sign up on an emulator and on my device.</p>

<blockquote>
  <p>Authentication failed.com.google.firebase.FirebaseException: An internal error has occured. [ OPERATION_NOT_ALLOWED ]</p>
</blockquote>

<p>I have enabled email under authentication providers in the console as was suggested in a different question but I'm still having trouble. Any ideas?
I have the play services dependencies set to higher than 9.0.0 and both the emulator and my test device satisfy this requirement</p>

<p>Here's my <code>SignupActivity</code> code </p>

<pre><code>public class SignupActivity extends AppCompatActivity {

    private static final String TAG = "SignupActivity" ;
    private Button btnSignUp,btnLinkToLogIn;
    private ProgressBar progressBar;
    private FirebaseAuth auth;
    private EditText signupInputEmail, signupInputPassword;
    private TextInputLayout  signupInputLayoutEmail, signupInputLayoutPassword;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_signup);
    auth = FirebaseAuth.getInstance();

    signupInputLayoutEmail = (TextInputLayout) findViewById(R.id.signup_input_layout_email);
    signupInputLayoutPassword = (TextInputLayout) findViewById(R.id.signup_input_layout_password);
    progressBar = (ProgressBar) findViewById(R.id.progressBar);

    signupInputEmail = (EditText) findViewById(R.id.signup_input_email);
    signupInputPassword = (EditText) findViewById(R.id.signup_input_password);

    btnSignUp = (Button) findViewById(R.id.btn_signup);
    btnLinkToLogIn = (Button) findViewById(R.id.btn_link_login);


    btnSignUp.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            submitForm();

        }
    });

    btnLinkToLogIn.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            Intent intent = new Intent(SignupActivity.this, LoginActivity.class);
            startActivity(intent);
        }
    });
    }

    /**
     * Validating form
     */
    private void submitForm() {

    String email = signupInputEmail.getText().toString().trim();
    String password = signupInputPassword.getText().toString().trim();

    if(!checkEmail()) {
        return;
    }
    if(!checkPassword()) {
        return;
    }
    signupInputLayoutEmail.setErrorEnabled(false);
    signupInputLayoutPassword.setErrorEnabled(false);

    progressBar.setVisibility(View.VISIBLE);
    //create user
    auth.createUserWithEmailAndPassword(email, password)
            .addOnCompleteListener(SignupActivity.this, new OnCompleteListener&lt;AuthResult&gt;() {
                @Override
                public void onComplete(@NonNull Task&lt;AuthResult&gt; task) {
                    Log.d(TAG,"createUserWithEmail:onComplete:" + task.isSuccessful());
                    progressBar.setVisibility(View.GONE);

                    if (!task.isSuccessful()) {
                        Log.d(TAG,"Authentication failed." + task.getException());

                    } else {
                        startActivity(new Intent(SignupActivity.this, UserActivity.class));
                        finish();
                    }
                }
            });
    Toast.makeText(getApplicationContext(), "You are successfully Registered !!", Toast.LENGTH_SHORT).show();
    }

    private boolean checkEmail() {
    String email = signupInputEmail.getText().toString().trim();
    if (email.isEmpty() || !isEmailValid(email)) {

        signupInputLayoutEmail.setErrorEnabled(true);
        signupInputLayoutEmail.setError(getString(R.string.err_msg_email));
        signupInputEmail.setError(getString(R.string.err_msg_required));
        requestFocus(signupInputEmail);
        return false;
    }
    signupInputLayoutEmail.setErrorEnabled(false);
    return true;
    }

    private boolean checkPassword() {

    String password = signupInputPassword.getText().toString().trim();
    if (password.isEmpty() || !isPasswordValid(password)) {

        signupInputLayoutPassword.setError(getString(R.string.err_msg_password));
        signupInputPassword.setError(getString(R.string.err_msg_required));
        requestFocus(signupInputPassword);
        return false;
    }
    signupInputLayoutPassword.setErrorEnabled(false);
    return true;
    }

    private static boolean isEmailValid(String email) {
    return !TextUtils.isEmpty(email) &amp;&amp; android.util.Patterns.EMAIL_ADDRESS.matcher(email).matches();
    }

    private static boolean isPasswordValid(String password){
    return (password.length() &gt;= 6);
    }

    private void requestFocus(View view) {
    if (view.requestFocus()) {
        getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
    }
    }

    @Override
    protected void onResume() {
    super.onResume();
    progressBar.setVisibility(View.GONE);
    }
}
</code></pre>