Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with the Saved Games API #336

Open
imixerpro opened this issue Aug 30, 2021 · 11 comments
Open

Issues with the Saved Games API #336

imixerpro opened this issue Aug 30, 2021 · 11 comments

Comments

@imixerpro
Copy link

Earlier this year we've bumped into the following issues: the built signed with the upload certificate started experiencing really long delays up to a few minutes before being logged in and getting save data from the Google cloud.

A few days ago we've bumped into the similar issues with the built downloaded from google play. Please, note that we got strange errors in the system log just before we get NOT AUTHORIZED error from GPG SDK: we see the error accessing google cloud URI which claimed something similar to "API call limit is reached".

Please, note that we are using c++ sdk which forces us to use older java SDK: c++ SDK doesn't wokr with the latest ones and support keeps silence.

Any chance you could help us to figure out what's going on and how to fix this?

@smile616
Copy link
Collaborator

Would it be possible to share logcats/bug reports with us? Preferably link to a Google Drive folder but, please, don't accept access request unless it from @google.com email addresses.

See https://developer.android.com/studio/debug/bug-report for the guid on capture and read bug reports.

@imixerpro
Copy link
Author

Thanks for jumping in.

This is the part of the log which looks suspicious to us.

09-01 12:48:53.142 12434 30237 E Volley  : [98461] cmv.b: Unexpected response code 403 for https://www.googleapis.com/drive/v2beta/apps/self?prettyPrint=false&fields=id
09-01 12:48:53.147 12434 13963 W NetworkResponseErrorDec: StatusCode:403 Reason:[rateLimitExceeded] Location:[]
09-01 12:48:53.156 13420 13420 V GamesNativeSDK: Play Games callback indicates connection failure.
09-01 12:48:53.157 13420 14261 I GamesNativeSDK: Error connecting to Google Play: code 8.
09-01 12:48:53.163 13420 13532 V WormsZone: GameServices: Sign in finished with a result of 'SIGN IN': -3 'ERROR_NOT_AUTHORIZED'

Here are the links to the bugreports for store version and the version signed with the upload certificate. Just to make sure.

https://drive.google.com/file/d/1qVV95Yj_Dku-KMPfxzerubnJ9vER1rse/view?usp=sharing
https://drive.google.com/file/d/1A8bTOKCwfTlfyus2KQSMqUnqeu8GFItn/view?usp=sharing

@smile616
Copy link
Collaborator

smile616 commented Sep 1, 2021

(internal issue # b/198415052)

@smile616
Copy link
Collaborator

smile616 commented Sep 1, 2021

@imixerpro, bug reports received. You could stop share those files.

At glance, StatusCode:403 Reason:[rateLimitExceeded] suggests that the account in use hitting the API rate limit. Could you try use a different account (that was not used for awhile) and see if you can reproduce the issue?

@imixerpro
Copy link
Author

imixerpro commented Sep 1, 2021

Hmm. It depends. It is a bit complicated but the full story is:

For most of our developers/testers running the debug build signed with upload certificate this is easily reproducible, however, we've never managed to do this with a version downloaded from Google Play. Our engineer managed to reproduce if for GP version recently. He says this is not easy to do:

  1. Open-close the application multiple times (this leads to logging in and storing/restoring profile)
  2. Remove the application from the device
  3. Install the application (using ADB or from GP)
  4. When application tries to login to GPG we get this error

Please, note that at some point application is still able to log in again. Usually it is less than a few hours, but we didn't try to figure out the reset period.

Please, note that we can't tell for sure that the following experiments are absolutely reproducible and/or that it matters what application or build is used.

When we've met this bug for the first time, using the account which didn't login for a few days led to the same response. Please, note that developer build had this issue while GP didn't.

We've got 2 applications. It is possible that one of applications refuse to login to GPG while the other is able to do this at the same time. The very same device with the very same account was used.

@imixerpro
Copy link
Author

imixerpro commented Sep 6, 2021

I've just noticed the following message in the log:
GamesNativeSDK: Exception in com/google/android/gms/games/snapshot/Snapshots.open: java.lang.IllegalStateException: Must include Drive.SCOPE_APPFOLDER to use snapshots!.

We've received notification e-mail about Google Dirve API changes but it doesn't look like we can change anything on our side. Any ideas what we can actually do about this?

@smile616
Copy link
Collaborator

smile616 commented Sep 6, 2021

@imixerpro
If you see Must include Drive.SCOPE_APPFOLDER to use snapshots!., you definitely need to add Drive.SCOPE_APPFOLDER.

For that you could either use Games#SCOPE_GAMES_SNAPSHOTS (see https://developers.google.com/android/reference/com/google/android/gms/games/Games#public-static-final-scope-scope_games_snapshots)
or Scope(Scopes.DRIVE_APPFOLDER)

@imixerpro
Copy link
Author

Ok. I see. The issue is that we are using GPG C++ SDK for this which is provided by Google. Could you please, clarify if we could get an updated GPG C++ SDK or if we could get GPG C++ SDK sources so that we can fix this on our own? Unfortunately nobody answers for GPG C++ SDK bug requests for more than a year, I believe.

@smile616
Copy link
Collaborator

smile616 commented Sep 6, 2021

when you are calling gpg::GameServices::Builder() do you call EnableSnapshots() on the returned value?
(See https://developers.google.com/games/services/cpp/savedgames#enabling_the_service)

@imixerpro
Copy link
Author

We do.

Just to make sure we are on the same page: We've added snapshot functionality in 2020. In 2021 we've started having issues getting saved games after clean install in our office. And today I've noticed the issue with the missing Drive.SCOPE_APPFOLDER permissin. We didn't change anything significat since the snapshot functionality was released for the first time for our users.

@imixerpro
Copy link
Author

Hi.

It seems that PGS team is going to keep C++ SDK in sync with the java SDK which is really great news for us. Any update on the schedule? I'm concerned we might get serious issues for our users due to the latest cloud API changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants