MrStahlfelge / gdx-gamesvcs

Easy integration of gameservices in your libGDX game: Google Play Games, Apple Game Center, Amazon GameCircle and more
Apache License 2.0
113 stars 20 forks source link

Cannot log in Google Play Services when cloud save enabled #35

Closed kusfo closed 4 years ago

kusfo commented 4 years ago

Since couple of days ago, I'm not able to log my app into the Google Play Services. I'm getting this trace in the logs: E/Auth: [GoogleAccountDataServiceImpl] getToken() -> NETWORK_ERROR. Account: <ELLIDED:-827796636>, App: com.teenagemutantninjacoders.robotwarehouse.android.dev, Service: oauth2:https://www.googleapis.com/auth/drive.appdata https://www.googleapis.com/auth/games_lite It looks like it's really a Google problem, but as I'm not seeing any recent complaint on that, I was wondering if the library is simply using some deprecated API?

magfort commented 4 years ago

I've just starting having the same issue with my game (which uses Google's old GameHelper sample rather than gdx-gamesvcs)

I'm guessing this has finally come into effect: https://developers.google.com/drive/android/deprecation

If I remove the drive API and snapshot code, log in works again. ie: builder.addApi(Drive.API).addScope(Drive.SCOPE_APPFOLDER);

When I attempt to sign in on the demo game (Falling Lightblocks) I get this error: "Falling Lightblocks requires one or more Google Play services that are not currently available..."

kusfo commented 4 years ago

That totally looks like the main reason. I can disable the saved game feature for now (as my game is only in Alpha now), but It'll be nice to know if there's any way to migrate that to the new Rest API.

MrStahlfelge commented 4 years ago

Yeah my game has the same problem. As far as I know, there were never any information given on how to migrate GPGS cloud saves. If anyone has information, it is appreciated.

makkmarcci commented 4 years ago

Same problem here with android 5.1 and 4.4, but on a phone with 6.0 it still sign in with cloud save.

magfort commented 4 years ago

I think the new SnapshotClient API is intended to replace it https://developers.google.com/games/services/android/savedgames

That's what Google's sample app uses now https://github.com/playgameservices/android-basic-samples/tree/master/CollectAllTheStars2

MrStahlfelge commented 4 years ago

The solution is even more easy. It's just needed to remove the Drive API declaration, nothing else has to be changed.

makkmarcci commented 4 years ago

Thanks! It's working with 1.0.2