Reputation: 2836
If I have this email like [email protected] and sign into Firebase and create an Android app, I set up authentication and databas and download the google-services.json file. The app works when I build an APK.
Can I now have an account [email protected] and sign into Google play developer and release that app? What will happen?
I actually did this and then I could not sign into Firebase using a Google account on the two devices that I tested on. I got the error "Google Sign In error 12500".
Signing in to Firebase using e-mail worked so I guess it´s not a Firebase issue. Signing in using Google credentials works on the debug build and the APK release build, so it's only when building for the Google Play app bundle (.aab) that Google credentials signing gives "Google Sign In error 12500". I have no flavor build only different build types
Any ideas?
Does proguard minifyEnabled work different when build for Google Play (.aab) files? Maybe it removed some files
Upvotes: 1
Views: 113
Reputation: 2836
Miraculously i found the answer at Thanks to @HadrienPierart
quoite @HadrienPierart writing:
I got stuck on this one for several days until I figured how what was wrong. I relay with most of the situation described above :
Works fine in debug/local If I build the release package and install it through adb install it works fine If I check the SHA1 of the package/keystore, everything is in order and matches the config in Firebase and the google-services.json And then, once deployed in beta or released on the store : the google signin fails miserably... And I noticed that in the App signing part of the Google Play account : screenshot from 2018-10-26 12-18-57
I checked the play account (important thing to mention at this point : I did not configure the play account) : And sure enough, my package was being RE-SIGNED by google play certificate...
When you go to the Release Management > App Signing, you will see the SHA1 of the keystore being used by Google after yours. Pick it, paste it in Firebase, update your google-services.json file, redeploy and VOILA !
I really hope this help others to avoid all the hair pulling I've been doing these last few days :D
Upvotes: 2