Make This Tech Work (Archive)

New PC? Android app fails Google sign-in with Firebase authentication in Android Studio emulator (error 12500)

2019-12-28 10:46:25

Google sign-in with Firebase authentication fails in the Android Studio emulator

Are you an Android developer that just got a new PC or loaded your developer environment including Android Studio on a different system?  Do you use Google sign-in with Firebase authentication in your Android app?  You might notice once you to move to the new PC, that's your app's Google sign-in with Firebase authentication fails in the Android Studio emulator when debugging your app.  Mine was failing at the getSignedInAccountFromIntent() call. The error I received was 12500 but I couldn't find much more information about what was really going wrong other than the error number.

Need new debug SHA1 key in your Firebase console

The problem I found was simply that on a new system you will have a new auto-generated debug SHA1 key from Android studio that needs to be entered in your Firebase console in the general settings page.  To do this,

keytool -exportcert -list -v -alias androiddebugkey -keystore c:\users\<username>/.android/debug.keystore

[caption id="attachment_8986" align="aligncenter" width="300"]sha1keyexample sha1keyexample[/caption]   [caption id="attachment_8988" align="aligncenter" width="300"]Command Prompt mark copy menu Command Prompt mark copy menu[/caption] [caption id="attachment_8987" align="aligncenter" width="300"]Firebase console settings Firebase console settings[/caption] [caption id="attachment_8989" align="aligncenter" width="300"]Firebase SHA Certificate Fingerprint Firebase SHA Certificate Fingerprint[/caption] Read other Android related posts and links Samsung One Hand Operation + Android app has really come along with new useful features View class variables while Debugging in Android Studio with minifyEnabled true Stock Search Android app version 3.2 now available Install Android Studio | Android Developers Authenticate Using Google Sign-In on Android | Firebase