play-games-plugin-for-unity icon indicating copy to clipboard operation
play-games-plugin-for-unity copied to clipboard

Save game does not persist between devices

Open userqt opened this issue 2 years ago • 6 comments

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: 0. Have the game installed on one device (A) with some data saved to the cloud already

  1. Run the game on another device (B), save some data using the CommitUpdate() method
  2. Launch the game on another device (A)
  3. 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

  • Unity version: 2020
  • Google Play Games Plugin for Unity version: 11

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.

userqt avatar Jun 15 '22 20:06 userqt

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?

kyubuns avatar Jun 16 '22 06:06 kyubuns

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 avatar Jun 19 '22 07:06 KyryloKuzyk

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."}]}

KyryloKuzyk avatar Jun 20 '22 11:06 KyryloKuzyk

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

kyubuns avatar Jun 20 '22 12:06 kyubuns

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

KyryloKuzyk avatar Jun 20 '22 12:06 KyryloKuzyk

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."

kyubuns avatar Jun 20 '22 12:06 kyubuns