Google Play Game Services - Leaderboard shows if APK but not when AAB

So i’ve implemented the Google Play Game Services in my game so I can use the leaderboards. I’ve used this plugin:

https://github.com/playgameservices/play-games-plugin-for-unity

If I generate an APK through build settings, then transfer the file to my phone, and install the game, the Login and the Leaderboard is showing as expected.

If I generate an APK through build settings, then transfer the file to a Internal Test Track, and install the game, nothing happens.

If instead of an APK generation I generate an AAB, and then add it to an Internal Testing Track and release it to testes → The login is shown, but the leaderboard is not being shown.

I’ve also tried generating an APK from the AAB using the bundletool: bundletool  |  Android Studio  |  Android Developers
And when I did this, the console informed me that It would be signing the APK with a debug key. I then knew for sure It wouldnt even login (I then tried and didnt login or showed leaderboard after making a direct APK transfer to my phone).

  1. Im really trying to understand why, by uploading an AAB file to Play Console (Intertal Test Track) it will only make a Login and not show Leaderboard. Is the Google Play Console Signing my apk’s with the wrong key with generating the APKS from the AAB that i’ve uploaded? How can I change this and set my own key?

  2. How can I obtain the Logs from an App that’s been published into the Internal Test Track? (I already tried uploading ReTrade mapping file and Native Debug Symbols) but not sure how I can read the logs so I can figure out what’s going on.

Thanks in Advance.

2 Likes

Fixed it:

In Google Play Console, if you go to your app, and then in Release Section → Setup → App Integrity.

There will be two sets of Keys. One is the ‘App signing key certificate’, which will be the key that Google Play uses to sign the Apk’s of your Android App Bundle, and The ‘Upload key certificate’, which is the key that you used to build your AAB through Unity Editor.

Now in order to use the play services, leaderboards, achievements etc… The credentials that you’ve set up in the section Grow → Play Game services → Configuration. (and consequently in the Google Cloud platform) MUST be configured to use the SHA1 from the ‘App signing key certificate’ and NOT the ‘Upload key certificate’ if you want to test your app via Internal/Closed/Open testing. But if you want to test locally (install directly to your phone after building apk from unity editor) Then you can leave that SHA1 to the Upload Key certificate’

8 Likes

You saved the day!!!

1 Like

Thank a lot man… you deserve a cookie… I have devoted more than 5 days to this issue…

Thanks a lot!!!