Open ghost opened 2 years ago
Oh, I should add that this only happens on Android devices - on iOS I have not experienced this problem.
I finally was able to solve this: turns out that adding the SHA-1 fingerprint from my .keystore file to Firebase SDK setup and configuration was not enough - I also had to add the App signing key certificate SHA-1 fingerprint from Google Play Console. Then the failing stopped. I am not at all sure why it was required, and why the lack of it it caused occasional fails, though.
I had same problem as yours, so as you described I put following fingerprints to the Firebase project SDK setup on Android
and solved problem without any additional build!!
thank you for mentioning the tips!!
The same problem for me. It seems to start randomly. One day - all good, next day - SignInException from nowhere. Still can't fix. Adding all SHAs (App signing and keystore) doesn't help :(
I have a Unity app that uses GoogleSignIn package and Firebase Authentication. It SOMETIMES works, but problem is that it also SOMETIMES fails and I have not been able to get the reproduce steps for getting it to fail. It seems totally random when it fails and GoogleSignIn.DefaultInstance.SignIn() throws the Google.GoogleSignIn+SignInException.
I have also noticed that the sign in might fail on device A but pass on device B at the same time, which suggest that the problem is locally on device rather than on the backend. It does not seem to be related to the google account used to sign in or the amount of google accounts available on the device.
However, I have debugged this and verified that when fail occurs the GoogleSignInStatusCode is 6 (Developer Error). According to the sources this suggest that "The application is misconfigured" and "The developer should look at the logs after this to determine more actionable information". But what configuration is it referring to and how could it even be wrong if the sign in does work sometimes. Also, the Unity logs do not provide any further information.
I have done the following: 1) Set up the Google as authentication provider in Firebase console and added the web client id + secret 2) Set up the SHA-1 and SHA-256 certificate fingerprints for my android app in Firebase console 3) Checked that the package name in Firebase console matches the one in Unity
Here are the relevant parts of my Google sign in code
Setup: Unity 2021.3.4f1 Firebase Auth 9.0.0
To me this seems like a bug in the GoogleSignIn plugin as there is not much I can do differently in the code. Any help/hints/suggestions would be very welcome as I have been trying to solve this problem for days already!