4

I am struggling a lot with google and Facebook sign-in in my android app. Everything works well with release build if preparing in APK format but not with.AAB format. I have followed all steps required for signing a build related to the SHA1 key.

  1. Setup the Firebase application
  2. Add the debug, release SHA1 key to the firebase
  3. Add the SHA1 signing key from the google play issue after uploading the app.
  4. Then download the google-service.json file and then prepare the bundle (.aab) but still, it's not working.
  5. For facebook sign in also works with release apk but not with .".aab" file
  6. App uploaded to google play and then download it but still, it's not working.
  7. I tried to debug the ".aab" and it throws the "result code 0", the debugging I have to perform on the ".aab" file through the AAB installer app.

I followed various articles on stack overflow and other sources but none of them worked. Seems problem only with Bundle (.AAB) file releases only.

Facebook login in my android app is working fine in release apk, but not working properly after publishing the same apk on play store google signIn not working in release mode apk android

enter image description here

OshiniRB
  • 578
  • 1
  • 7
  • 21

4 Answers4

4

the same thing happened to me and I solved the problem in the following way:

Unlike with .apk, when uploading an .aab (app bundle), google now forces you to sign the file and it does so by default. when google signs it, it does so with a SHA1 that you can only see by accessing your google play console account in the signature section: (if you dont see the link, search in google by "Google Play Console - Play App Signing")

https://www.googleadservices.com/pagead/aclk?sa=L&ai=DChcSEwiIn4b9j5PzAhVIndUKHfJEAuAYABAAGgJ3cw&ae=2&ohost=www.google.com&cid=CAESQOD2TOEC6QJViajlQLRKWuvyHeLErSwY_0eyjSXNXz3AzjyZhnMyB4frcnJdvfIXrAYvu5aNaGiEi2zTH_tFodY&sig=AOD64_2z6obL_QhyUwCO5ViGSBr7v6_mCQ&q&adurl&ved=2ahUKEwjElf78j5PzAhWCy4UKHUo2A5QQ0Qx6BAgCEAE

This is where you can see the SHA1 used by google: this SHA1 is the one that you must put in the firebase configuration (not the sha1 of your private signature in the aab file, but the sha1 of the google signature)

  • 3
    Hi, I did the same multiple times, I have added the SHA1 from google play console to Firebase console. Currently my Firebase console has 3 SHA1 keys (Development, Signed one, from google console ). 1. The signed apk worked well in .apk format. 2. Debug build working 3. only problem with .aab it failed to sign in from google and facebook both. Do I need to remove the signed SHA1 key from firebase and need to re prepare the build. – user1875422 Sep 25 '21 at 13:44
  • Worked for me! This is not obvious at all. Thanks! – sorold May 21 '22 at 13:00
3

If you are using .aab then simply logon to play console and follow the steps

  1. Select your app
  2. Under release navigate to Setup menu
  3. Click on App Integrity
  4. A screen will open, then click on App Signing
  5. Copy the SHA1 key and paste where you want to use.. :)

See this image for steps

0

I have spent around two days to fix this problem and finally I did it, it is just missing SHA certificate fingerprints.

For the APK file it is working fine and when I have used the AAB file and install it in device then Google Sign In didn't work.

You can find the SHA-1 certificate fingerprint from Google play console by following steps:

  1. Login to Google play console.
  2. Select your application.
  3. Go to Setup section from left side.
  4. Select Internal app sharing and click on it.

Here you can find the Internal test certificate and SHA-1 certificate fingerprint, please confirm it is missing in your Firebase project or not, if it is missing then just add it and it is working fine with AAB file too.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 29 '21 at 18:36
-1

This is unreasnable and painfaul.

After update firebase settings by Sha-1 from google play console and generate signed APK all worked fine but .aab worked only with me in internal testing not when upload it to third party like appcenter

ahmed khattab
  • 2,311
  • 3
  • 16
  • 30