playgameservices / android-basic-samples

Google Play game services - Android samples
Apache License 2.0
973 stars 969 forks source link

Unresolvable conflict #210

Open hnim opened 8 years ago

hnim commented 8 years ago

I'm trying to implement saved game in my game. I reach a case when I open the snapshot, the result always return code 4004, and no matter how often I call resolveConflict, it always return code 4004. Thus I can never resolve this conflict. I try to use my appId with collectTheStart2 example, the result is same, selectSnapshotActivty keep popup. May you give me any clue to solve this case? thanks!

Twistplay commented 8 years ago

We see this behaviour too in our own app, using essentially the same resolve workflow as the sample code. I have increased the retry count to 20 and it still fails to resolve (and have previously left it uncapped without success - google play services eventually crashes). Though even if it did work at 20, I don't think the time taken to resolve would be an acceptable experience for end-users.

I have seen similar reports of this problem in various places:

http://stackoverflow.com/questions/37467990/play-games-snapshot-conflict-resolution-gives-conflict https://github.com/playgameservices/play-games-plugin-for-unity/issues/1262 http://codereview.stackexchange.com/questions/135051/loading-saving-and-merging-google-play-saved-games

and indeed on the (closed) issues for this repository: https://github.com/playgameservices/android-basic-samples/issues/90

I having spent considerable time trying to diagnose this problem, and have concluded it is either:

a) inherent in the design of Google Play Game Services OR b) a bug in Google Play Game Services OR c) something that the developer has to code in a very specific way to avoid happening

If (c) exists I haven't found it yet. Trust me I've tried!

The behaviour I see seems to be that, when resolving a conflict, this snapshot passed to the resolve function will itself create more conflicts, judging by the last modified time of each snapshot in the open callback.

So my current implementation is to give up after a certain number of retries, and revert to a local backup of the snapshot - so at least the player can carry on locally.

smelfungus commented 8 years ago

Same problem here.

stephanedupont commented 8 years ago

Same here.

Giltanas commented 8 years ago

Same problem.

Shanannigans commented 8 years ago

Same problem here, very annoying, it just keeps on resolving and even if it resolves the issue after x retries, the error reappears the next time the app is opened.

claywilkinson commented 8 years ago

Thanks everyone for the reports. I've passed them along to the games client library team - they are investigating. I'll update the thread when I know more.

acr21 commented 8 years ago

Any update on this issue?

cireficc commented 8 years ago

@claywilkinson :+1: