Reputation: 9894
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:
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
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.
Google have fixed it for unity plugin already
Upvotes: 2