I use FireBase authentication with a simple function that signs up a new user, it works great on the Unity Editor, but when I build it on my Android, it crashes the second it tries to read this line- FirebaseAuth auth = FirebaseAuth.DefaultInstance
This is the error I get before it crashes-
Java class com/google/firebase/auth/FirebaseAuthWebException not found. Please verify the AAR which contains the com/google/firebase/auth/FirebaseAuthWebException class is included in your app.
- Why do I even get the Firebase-AuthWeb-Exception ?
- Why can't it find that exception? (I tried to resolve jar files, and to re-import auth SDK but it didn't solve the issue
My app is simple- there's a SignUp button that calls this function-
public void SignUp()
{
FirebaseAuth auth = FirebaseAuth.DefaultInstance; //The error is after this line
auth.CreateUserWithEmailAndPasswordAsync(email.text, password.text).ContinueWith(task =>
{
if (task.IsCanceled)
{
Debug.LogError("CreateUserWithEmailAndPasswordAsync was canceled.");
return;
}
if (task.IsFaulted)
{
Debug.LogError("CreateUserWithEmailAndPasswordAsync encountered an error: " + task.Exception);
return;
}
// Firebase user has been created.
Firebase.Auth.FirebaseUser newUser = task.Result;
Debug.LogFormat("Firebase user created successfully: {0} ({1})",
newUser.DisplayName, newUser.UserId);
// SignInWithVerification();
});
}
- Unity- 2108.2.12f1
- Build system- Gradle
- Firebase unity sdk 5.4.0 dotnet3