-
Notifications
You must be signed in to change notification settings - Fork 46
[Question] Phone Authentication on Android causes an error: "VerifyPhoneNumber: builder faild to create PhoneAuhtOptions" #764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for bringing this to our attention, @Hasan-OG. I was also able to encounter this error message as well using our quickstart project. That said, I'll be relaying my observations to the team. For now, you may downgrade to an SDK version lower than 11.0.0 and utilize something like this:
|
I was able to reproduce this issue as well. In the meantime the best workaround is probably as paulinon suggests, which is to use version 10.7.0 or previous of the Unity SDK. Edit: Closing the issue for now. The fix will be in the next release (11.3.0) when it goes out in a few weeks or so. |
@AlmostMatt I am also receiving same problem. I have created this forum. As per your request. i have downgrade to 10.7.0. . I have received the following error. Kindly quote which version i should work ( unity + firebase version )... Did Firebase SMS is working or not? |
Uh oh!
There was an error while loading. Please reload this page.
Hi, I have a question regarding Phone Authentication on Android.
We have 5 Android games, each one has its own Firebase application configured in Firebase Console.
In each game, we imported the google-services.json file. We use Firebase Analytics, Crashlytics, RemoteConfig, Database, and Storage services by Firebase.FirebaseApp.DefaultInstance (which is configured via the google-services.json file).
Everything related to these services mentioned above works as expected.
Regarding the authentication, we created a 6th Firebase application in Firebase Console that will be used by all 5 games. This is because we want the authentication to be cross-apps (users can log in to the same account in all the games).
To use this FirebaseApp in Unity, we create a FirebaseApp like this: Firebase.FirebaseApp.Create(AppOptions, "OurAuthApp").
This worked fine with the email verification. But there is a problem with the phone authentication.
Here is the code that causes the error:
` Firebase.Auth.PhoneAuthOptions phoneOptions = new Firebase.Auth.PhoneAuthOptions {
PhoneNumber = phoneNumber,
TimeoutInMilliseconds = 1000 * 60 * 3,
ForceResendingToken = null
};
`
This is the "human readable" error we get (it calls verificationFailed):
VerifyPhoneNumber: builder faild to create PhoneAuhtOptions <>c__DisplayClass37_0:<PhoneSignUp>b__1(String) Firebase.Auth.VerificationFailed:Invoke(String) Firebase.Auth.<>c__DisplayClass12_0:<VerificationFailedHandler>b__0() System.Action:Invoke() Firebase.ExceptionAggregator:Wrap(Action) Firebase.AppUtilPINVOKE:PollCallbacks() Firebase.AppUtil:PollCallbacks() Firebase.Platform.FirebaseHandler:Update()
By the way, on iOS everything works fine (including the phone authentication so the problem is only on Android).
How can I see more useful and detailed logs, the "human readable" error above isn't enough to understand what is missing.
Any ideas or potential solutions?
Thanks!
The text was updated successfully, but these errors were encountered: