I'm trying to create a new user in Firebase but onError is constantly being called by my ValueResultHandler:
public void onSignUpComplete(String email, String password) {
Firebase ref = new Firebase(Constants.FIREBASE_URL); // this is "https://subdomain.firebaseio.com/"
ref.createUser(email, password, new SignUpResultHandler());
}
class SignUpResultHandler implements Firebase.ValueResultHandler<Map<String, Object>> {
@Override
public void onSuccess(Map<String, Object> StringObjectMap) {
Toast.makeText(getApplicationContext(), "Created User!", Toast.LENGTH_SHORT().show();
}
@Override
public void onError(FirebaseError firebaseError) {
Toast.makeText(getApplicationContext(), "Failed to create user! " +
firebaseError.getDetails(), Toast.LENGTH_SHORT).show();
}
}
I always get the toast "Failed to create user!" and an empty return from getDetails().
Some extra information: Email and password authentication is enabled in Firebase and my manifest has a uses-permission for "android.permission.INTERNET". I have firebase-auth:9.4.0, firebase-core:9.4.0, firebase-database:9.4.0 and firebase-client-android:2.5.2 as dependencies (and play services). I have my google-services.json file in the app folder and the plugin applied in gradle. I'm running the app in a connected device but this also fails on an emulator.