android-basic-samples icon indicating copy to clipboard operation
android-basic-samples copied to clipboard

App signs in successfully but crashes when it tries to use the API if the user deletes their data from the Play Games app

Open lbenedetto opened this issue 6 years ago • 0 comments

Actual:

  1. The user signs in to Play Games in my app
  2. The user deletes all their game data through the Play Games app
  3. The user opens my app again
  4. My app attempts a silent sign in
  5. The silent sign in succeeds
  6. I use the provided GoogleSignInAccount to initialize an AchievementsClient
  7. I attempt use the AchievementsClient to get all the users achievements
  8. The app crashes with ApiException: 26504: The user must be signed in to make this API call.

Expected: The silent sign in should fail, or at the very least I should get CLIENT_RECONNECT_REQUIRED.

Rarely, it does actually give CLIENT_RECONNECT_REQUIRED, but almost every time, it gives the first error I mentioned.

Clearing the apps data and cache after deleting data in Play Games causes the initial silent sign in to fail (as it should), which triggers the interactive sign in, which completes successfully. It is unclear to me as to why clearing the apps cache fixes the silent sign in allowing it to fail as expected, since I am not intentionally saving any data about the users signed in state.

lbenedetto avatar Jun 27 '18 19:06 lbenedetto