android-basic-samples icon indicating copy to clipboard operation
android-basic-samples copied to clipboard

Unresolvable conflict

Open hnim opened this issue 8 years ago • 8 comments

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!

hnim avatar Jul 14 '16 08:07 hnim

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.

Twistplay avatar Jul 25 '16 21:07 Twistplay

Same problem here.

smelfungus avatar Aug 05 '16 17:08 smelfungus

Same here.

stephanedupont avatar Aug 06 '16 17:08 stephanedupont

Same problem.

Giltanas avatar Aug 08 '16 14:08 Giltanas

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.

Shanannigans avatar Aug 10 '16 20:08 Shanannigans

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.

claywilkinson avatar Aug 15 '16 16:08 claywilkinson

Any update on this issue?

acr21 avatar Sep 09 '16 01:09 acr21

@claywilkinson :+1:

cireficc avatar Sep 12 '16 14:09 cireficc