ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.25k stars 175 forks source link

Desktop PC doesn't upload a savegame to Steam Cloud after it changes #10014

Open JPLeBreton opened 1 year ago

JPLeBreton commented 1 year ago

Your system information

Please describe your issue in as much detail as possible:

I played some of the new No Man's Sky update on my desktop PC (specs above) yesterday. Later that day, I let the update download on my Steam Deck and then launched the game on that after not having played on the device for about a month and a half. At the "select a save file to load" screen in-game, I noticed that the date on my main (800+ hour) save was June 14th. Not wanting to make any changes that would stomp my desktop PC savegame (ie the past 1.5 months' worth of progress), I exited out of the game. When I relaunched the game on my PC, my savegame was still fine - ie the old save on the Deck / in the cloud did not stomp my save here.

When I check the timestamps of my save files for the game at https://store.steampowered.com/account/remotestorageapp/?appid=275850 , I can see that the specific save slots in question - save.hg, save2.hg, mf_save.hg, and mf_save2.hg - are still dated June 14th, despite the files on my PC being newer.

To determine whether this was an issue with my system, my account, or this particular game, I tried launching another game (Satisfactory), saving, and exiting on my desktop PC. The savegame promptly uploaded to Steam Cloud just fine. (FWIW, I've never played that game on my Steam Deck, or any other computer.)

Last night I also loaded another of my No Man's Sky savegames, for Creative Mode (save5.hg and save6.hg, in my case), saved and exited, and those changes did get uploaded to Steam Cloud. So the problem might be specific to the 4 files named above.

I've checked ~/.local/share/Steam/logs/cloud_log.txt and there are a few lines like this that mention the files:

(ValidateCache) File in shared location '~/SteamLibrary/steamapps/compatdata/275850/pfx/drive_c/users/steamuser/Application Data/HelloGames/NMS/st_76561197970491285/save2.hg' timestamp or SHA mismatch with cache - setting changes in cloud

Not sure what "setting changes in cloud" means, though, since the remote storage file listing does not show the file as having been updated in the past month.

Steps for reproducing this issue:

  1. Launch latest release build of No Man's Sky
  2. Open an existing save
  3. Save and exit the game
  4. Observe: changed savegame file doesn't upload to steam cloud, according to https://store.steampowered.com/account/remotestorageapp/?appid=275850
JPLeBreton commented 1 year ago

Update: I've tried all the troubleshooting steps on this page and ruled them out as a cause: https://help.steampowered.com/en/faqs/view/68D2-35AB-09A9-7678#basic - my internet connection is fine, Steam can download (and upload saves for other games) just fine, and I don't have any other programs on my system messing with the save files, the game files, or Steam itself.

stickgrinder commented 1 year ago

I have the same issue as a publisher. I'm testing AutoCloud with my game and I witness the same asymmetric behavior between my two PCs (same OS).

One uploads files, the other does not, and the error is the same. Since I'm testing and I had some troubles with AutoCloud I may have a dirty situation on my development machine, I'm going to clean the whole thing up and see, but knowing this is something that can happen also to customers makes me shiver.

stickgrinder commented 1 year ago

I have found a solution that worked in my case. Leaving it here for everyone who wants to try it out. Do it at your own risk. It requires erasing some cache files of the Steam client and I don't know, in that case, what gets updated with what so make a backup of your local files, if they are precious to you.
Mine were not, because I was just testing the thing out with throw-away saves.

Forenote 1: I'm also developing on Manjaro Linux, same version of @jplebreton, but my other device is Ubuntu Linux 20.04 and I'm pretty sure my son had a similar problem with another production game on Windows 11, so this should be completely OS-independent. The paths will change of course, so I'll just refer to generic paths as <steam-userdata> or <savegame-root>.

Forenote 2: Since I'm testing my not-yet-released game, I have to keep the console open and issue testappcloudpaths <AppID> and set_spew_level 4 4 (for good measure) every stinking time I close and reopen the client. If you are also testing stuff, remember to do it, as well as make sure you have Cloud saves enabled in settings!

  1. Close all Steam clients on all devices.
  2. On the device that shows the error mentioned in the issue, reach for the <steam-userdata> folder. In there, locate the folder named as the <AppID> of the app that gives problems and delete the remotecache.vdf file in there. If there is a remote folder, get rid of that too.
  3. Go to the <savegames-root> folder and search for a file named steam_autocloud.vdf. It may be present in more subfolders named after your Steam user-id... it really depends on the game implementation I guess. Anyway, get rid of those files too.
  4. Restart Steam on the other device (remember to turn on autocloud and testing stuff in the console), start the game, save a new progress, close everything so that the thing gets saved. Leave the Steam client open on the console page, if you can.
  5. Restart Steam on the device with the problem, make sure Cloud is on (same as above for the console commands if this applies), go to the app in your library and watch the cloud icon in the top area. It should say that Cloud is out of sync. Click on it and make it sync stuff.
  6. Start the game and test the saves, they should be in sync now.
  7. Save a new progress on this machine, close the game and look if the error pops out in the console. It should NOT.
  8. As a good measure, go back and forth between the devices two or three times, saving games every time. You should see everything is working as intended now.

Hope this may help someone who's fighting with this like I did. Just a workaround of course.

JPLeBreton commented 1 year ago

Thanks for the detailed troubleshooting steps, stickgrinder. I'm curious as to whether there's any reliable documentation of remotecache.vdf out there - it seems like the underlying problems might be resolved by simply editing that file, but web search results mostly turn up people on Steam forums experimenting rather unscientifically with it. Anyone know of such a resource? Looking at my own version of the file, it seems like the timestamps for the affected files are indeed incorrect (the June 14th date reported by the web view).