Hello everyone!
I’m in a bit of a pickle here. I am making making a unity 2D game and recently decided to add Firebase Authentication as a feature of the game. I’ve added the Email SignIn and Facebook SignIn buttons which both work.
I then enabled the Google SignIn method in Firebase Console, followed all of the documentation steps and managed to get it work briefly.
After about 15 minutes of working each new sign in gives the following error:
Got Error: DeveloperError Exception of type ‘Google.GoogleSignIn+SignInException’ was thrown.
GoogleLogin:OnAuthenticationFinished(Task`1)
System.Threading.ThreadPoolWorkQueue:Dispatch()
I haven’t managed to find any relevant help online, even reverting to the previous version via Github doesn’t seem to solve anything.
If anyone could help me in correcting this, that would be great.
Thanks in advance.
You have Error like: “got error developer error exception of type ‘google.googlesignin+signin exception’ was thrown”?
Problem solved.
I wrote everywhere I can about the solution.
APK and AAB file have different SHA1 and SHA256.
In Firebase, it’s best to add SHA for both applications.
You can check the SHA from the AAB file in Google Play Console → Your application → Configuration → Application integrity → Application signing.
I added these SHA keys to Firebase and the problem was gone.
If any of you are facing any issues with the integration, please check the following (checked on MacOS):
In code replace
GoogleSignIn.DefaultInstance.SignIn().ContinueWith(OnAuthenticationFinished);
with GoogleSignIn.DefaultInstance.SignIn().ContinueWithOnMainThread(OnAuthenticationFinished);
If getting “Cannot convert google-services.json to XML” error, check python installation on your system. If on Mac, run the following on terminal to fix
xcode-select --install
Disable Minify for both Release/Debug (Build Settings > Android)
In “Assets/Plugins/Android/settingsTemplate.gradle” file, ensure that the maven path for Google Signin SDK is exactly
One last irrelevant but helpful thing, while you’re making non release builds, use MONO instead of IL2CPP. Your builds will be created faster. Though ensure that you switch back to IL2CPP for release builds, otherwise players will get a “Not Compatible with Latest Android” warning on first launch.
We got this for Unity app with Firebase - Google authentication Error:
Google Sign-In Error: One or more errors occurred. (There was an error while trying to get your package certificate hash.) (There was an error while trying to get your package certificate hash.)
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
System.AggregateException: One or more errors occurred. (Exception of type ‘Google.GoogleSignIn+SignInException’ was thrown.) —> Google.GoogleSignIn+SignInException: Exception of type ‘Google.GoogleSignIn+SignInException’ was thrown.
Debug TokenPendingResult Calling onResult for callback. result: Status: Status{statusCode=DEVELOPER_ERROR, resolution=null} ALL OF THESE POINTED THE SAME(For different google sign-in approaches we tried)