I'm debugging the implementation of a Google Play Games leaderboard, and have found that some accounts get an opaque error when submitting a leaderboard score.
This game is currently in Google's "Internal Testing" category, and I've added all of our accounts to the Play Games Service's Testers list.
Some accounts are able to post fine, one tester reported their scores never seemed to appear. I have two accounts, one of which works, the other reliably spits this error when I post a score:
06-05 12:10:50.516 20042 24814 I PlayGamesServices[LeaderboardAgent]: Could not submit score right now. Try again later.
The wording suggests a security reason. But I can't work out what the difference between the working & non-working account might be, or how to debug it.
Does anyone know what this error means?
OK! I believe this error means "The leaderboard API has an unspecified problem with your app's signing certificate, and is going to ignore your request".
If you've been vague or disorganised with your Android signing keys and confused by this error, now is the time to fix it :)
I had *three* different signing keys in place: the Google Store key, my debug key and one other key that I clearly lost track of. Only one of them was present under the credentials in the Google Play Console.
I added the missing two keys under Grow Users → Play Games services → Setup and Management → Configuration → Credentials, one for each key:
If you've not created each key in your corresponding Google Cloud project, you'll need to find the Create OAuth Client from the Add Credential screen, and add a new OAuth client with the SHA1 key for each missing key.
Once I'd fixed this server-side, the game started recording scores correctly.
I don't yet understand why it was OK with one account posting scores and not another. But making sure the Play Games services credentials reference the right OAuth client fixed it.