playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.43k stars 953 forks source link

Save game does not persist between devices #3167

Open userqt opened 2 years ago

userqt commented 2 years ago

Describe the bug When I save data to the cloud from one device and then check it on another device, the data should be the same. However, on the second device the data is still the old one.

To Reproduce Steps to reproduce the behavior:

  1. Have the game installed on one device (A) with some data saved to the cloud already
  2. Run the game on another device (B), save some data using the CommitUpdate() method
  3. Launch the game on another device (A)
  4. Verify if the data is updated correctly

Expected behavior The data should persist between devices

Observed behavior The loaded data on device A is still the old one (the data from step 0).

Versions

Additional context The save would eventually be correct after a few saves. But this is not correct behavior. The data should be the same every time. I am using ReadNetworkOnly mode. Sometimes, I need to re-run the game in order for it to get the correct data. It should show the correct data from the first run instead.

kyubuns commented 2 years ago

Hello. This may be the same problem as #3160. (Not solved!!) The v11.01 cloud save is having some issues. Does anyone know of any other information?

KyryloKuzyk commented 2 years ago

Same issue here. I upload my data to Saved Games, but after the app reinstall, the data is not there. I even tried to trigger Google Drive backup manually before uninstalling the game, but still no luck. I open the saved file with DataSource.ReadNetworkOnly, then call CommitUpdate which finishes successfully.

KyryloKuzyk commented 2 years ago

I think I've figured out the cause of the issue, please see this bug report: https://github.com/playgameservices/play-games-plugin-for-unity/issues/3169

@userqt @kyubuns Please confirm your issue is connected to my bug report by launching the adb tool with these filters: adb logcat -s Unity Volley SnapshotUploaderImpl And check if you also have these errors:

E Volley  : [348] BasicNetwork.performRequest: Unexpected response code 403 for https://www.googleapis.com/games/v1/snapshotsExtended/gameSave:prepareRevision
W SnapshotUploaderImpl: {"code":403,"errors":[{"reason":"UrlLeaseLimitExceeded","domain":"usageLimits","message":"Too many pending uploads for this snapshot. Please finish or cancel some before creating more."}]}
kyubuns commented 2 years ago

I think I've figured out the cause of the issue, please see this bug report: #3169

@userqt @kyubuns Please confirm your issue is connected to my bug report by launching the adb tool with these filters: adb logcat -s Unity Volley SnapshotUploaderImpl And check if you also have these errors:

E Volley  : [348] BasicNetwork.performRequest: Unexpected response code 403 for https://www.googleapis.com/games/v1/snapshotsExtended/gameSave:prepareRevision
W SnapshotUploaderImpl: {"code":403,"errors":[{"reason":"UrlLeaseLimitExceeded","domain":"usageLimits","message":"Too many pending uploads for this snapshot. Please finish or cancel some before creating more."}]}

Ah, unfortunately, I could not see that error in my log….

I forgot to mention here that I also made a post on google issuetracker confirming that it also occurs in Samples/SmokeTest. (I did this because I apparently thought that I could not get official replies on GitHub.) https://issuetracker.google.com/issues/236169045

KyryloKuzyk commented 2 years ago

@kyubuns Could you please also try the unfiltered adb log and check if there is anything that could indicate an internal error? adb logcat

kyubuns commented 2 years ago

When I search the log for "error" or something similar, I get nothing but unrelated results. It just looks like "behaving normally and not getting data."