Adam Varhegyi
Adam Varhegyi

Reputation: 9894

Caused by: Must include Drive.SCOPE_APPFOLDER to use snapshots

I have a game app in Google Play store. It implements Google's Saved Games feature.

I haven't updated the app in months, and from one day to another, users massively started to report the same error:

Caused by: Must include Drive.SCOPE_APPFOLDER to use snapshots!

They cannot save their games.

My first idea was Google must have messed up something because I didn't update the app at all, and it was working very fine, and from one day to another this issue popped up massively.


The error message is incomprehensible for me, because I do have this scope included in my Google login as it follows:


   GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN)
                .requestId()
                .requestScopes(new Scope(Scopes.DRIVE_APPFOLDER))
                .requestServerAuthCode(getString(R.string.default_web_client_id))
                .build();

Of course I have it, otherwise it wouldn't work.

It was working perfectly, more over, it was working for almost a year now without any modification on my part.

So the next thing I was thinking alright, let's test it at least. So I downloaded my own app from Playstore and tried a login and a save ...and for my greatest suprisement, it does work for me.

I cannot reproduce the error at all. I tried with several Google accounts, tried with several uninstall-reinstall, tried with Google Play Games, also tried without it. I'm absolutely clueless.

The whole situation is a pain in the a. because:

  1. I did not changed the application code, only the server side (Google's) code could change
  2. I cannot reproduce the error, because with the very same application the feature works for me

I'm literally thinking about implementing my own Saved Games feature with server side code and everything because this is incomprehensible and hilarious. Users are writing to me and I cannot see a thing, cannot change a thing. Absolutely no way to start from this error.

Any response is greatly appreciated, thanks in advance.

Upvotes: 3

Views: 772

Answers (1)

user16930239
user16930239

Reputation: 9717

The problem is not with your code, the problem happens when the user sign up and do not give permission to the game to create and manage its own configuration data in Google Drive.

Now Google default behavior is for this permission to be denied, that's why you suddenly start facing this problem.

enter image description here

Google have fixed it for unity plugin already

Upvotes: 2

Related Questions