We found the answer ourselves. We messed up the configuration in the Google Play Developer console
and in the Google API console
.
Observations:
We noticed that our app had different OAuth2 Client IDs, e.g.:
Google Play Developer Console, Linked apps detail view
121212121212-4k97si3bnwertwertwet78oj571nl81ce3.apps.googleusercontent.com
Google API Console, Credentials, OAuth 2.0 client IDs
121212121212-h25jh8qrps8awertwetertwetweagp3n3t.apps.googleusercontent.com
We also saw that we had a lot of errors coming from the Google Play Games Services
when we looked in the Dashboard of the Google API console
.
At a closer look, we saw that nearly all of them were client errors (4xx), but we couldn't find out why.
Explanation:
I think at some point during development, we had problems with the SHA1 of our signing certificate and thought, we could create a new OAuth2.0
client manually in the Google API console
to update the SHA1.
This is bad according to this Google Developers video which says that an OAuth2.0
client should be created in the Google Play Developer console
, because it will automatically create the client ID and associate it with Achievements
and Leaderboards
. If it is created the other way around in the Google API console
, there will be no linkage and it will return a valid login, but doesn't know which Achievements
and Leaderboards
should be used and will return errors.
Solution:
As Linked Apps in the Google Play Developer console
can no longer be deleted after they were published, we renamed them so that they would be listed at the bottom of the linked apps (zz-mygame) and we deleted the OAuth 2.0
clients we created manually in the Google API console
as they were not working with the Google Play services
anyway.
We then created new linked apps in the Game services section of our game in the Google Play Developer Console
, added the correct SHA1 and this generated a new OAuth 2.0
client which is connected with the Play services
. We then checked this in the Google API console
in the Credentials section and saw that a new OAuth 2.0
client was added and that this client had the same ID (121212121212-34adfasdfsf34343422zzzz3433.apps.googleusercontent.com) as in the linked apps section of the Game services in the Google Play Developer console
.
After these changes, Achievements were working fine and already when were testing the game with dev builds and user who had testing access to the Google Play Game Services
, the Achievements would now show up in the Google Play Games App
and with an own tab listing all Achievements. Also the errors in the Google API console
didn't occur any longer.