Heroic-Games-Launcher / HeroicGamesLauncher

A games launcher for GOG, Amazon and Epic Games for Linux, Windows and macOS.
https://heroicgameslauncher.com
GNU General Public License v3.0
8.3k stars 439 forks source link

Cloud-Syncing after Game-Quit via CLI/Steam-Shortcut not working in version 2.5.0 beta3 #2070

Closed NoxDawnsong closed 1 year ago

NoxDawnsong commented 2 years ago

Describe the bug

The feature discussed in https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/issues/2043 and added in version 2.5.0beta3 only appears to work before the game starts, but not after the game ends, leaving the cloud-save outdated.

I verified this using the game "Against the Storm", playing on the Steam Deck, and having another installation elsewhere.

I cannot say whether this behaviour is exclusive to gog-saves, but judging by the changes mentioned in the original issue it might affect all cloud-saves

Add logs

./Heroic-2.5.0-beta.3.AppImage --no-gui --no-sandbox "heroic://launch/1460447406"
(12:26:15) INFO:    [Connection]:       Connectivity: check-online
(12:26:15) INFO:    [Connection]:       Pinging external endpoints
(12:26:15) INFO:    [Legendary]:        Running command: /tmp/.mount_HeroicGa3i75/resources/app.asar.unpacked/build/bin/linux/legendary --version
(12:26:15) INFO:    [Legendary]:        Legendary location: /tmp/.mount_HeroicGa3i75/resources/app.asar.unpacked/build/bin/linux/legendary
(12:26:15) INFO:    [Gog]:              GOGDL location: /tmp/.mount_HeroicGa3i75/resources/app.asar.unpacked/build/bin/linux/gogdl
Checking for update
(12:26:17) WARNING: [Backend]:          Failed to register protocol with OS.
(12:26:17) INFO:    [Gog]:              Running command: /tmp/.mount_HeroicGa3i75/resources/app.asar.unpacked/build/bin/linux/gogdl --version
(12:26:17) INFO:    [Connection]:       Connectivity: online
(12:26:17) INFO:    [Backend]:          User Not Found, removing it from Store
(12:26:17) INFO:    [Gog]:              Getting data about the user
[151855:1126/122617.340697:ERROR:browser_main_loop.cc(269)] Gtk: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
[151855:1126/122617.340932:ERROR:browser_main_loop.cc(269)] Gtk: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
[151855:1126/122617.341090:ERROR:browser_main_loop.cc(269)] Gtk: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
(12:26:17) INFO:    [Backend]:          AreWeAntiCheatYet data downloaded
(12:26:17) INFO:    [Gog]:              Saved user data to config
/bin/sh: line 1: hostname: command not found
(12:26:18) INFO:    [Backend]:          

Heroic Version: 2.5.0-beta.3 Caesar Clown
Legendary Version:  0.20.31 Dark Energy (hotfix #5)
GOGdl Version: 0.5
OS: SteamOS KERNEL: 5.13.0-valve21.3-1-neptune ARCH: x64
CPU: AMD Custom APU 0405 @2.31 GOVERNOR: schedutil
RAM: Total: 14.49 GiB Available: 8.06 GiB
GRAPHICS: GPU0: VanGogh VRAM: 512MB DRIVER:  
PROTOCOL: x11

(12:26:18) INFO:    [Backend]:          Checking for new Heroic Updates
(12:26:18) INFO:    [Frontend]:         Refreshing Library
(12:26:18) INFO:    [Legendary]:        Refreshing library...
(12:26:18) INFO:    [Gog]:              Getting GOG library
(12:26:18) INFO:    [ProtocolHandler]:  received 'heroic://launch/1460447406'
(12:26:18) WARNING: [Legendary]:        Requested game 1460447406 was not found in library
(12:26:18) ERROR:   [Legendary]:        Could not get game info for 1460447406, returning empty object. Something is probably gonna go wrong soon
(12:26:18) INFO:    [Gog]:              Syncing saves for 1460447406
(12:26:18) INFO:    [Gog]:              Syncing saves for 1460447406: /tmp/.mount_HeroicGa3i75/resources/app.asar.unpacked/build/bin/linux/gogdl save-sync "/home/deck/Games/Heroic Beta/Prefixes/Against the Storm/pfx/dosdevices/c:/users/steamuser/AppData/LocalLow/Eremite Games/Against the Storm" 1460447406 --token <redacted> --os windows --ts 1669461804.331293 --name saves
(12:26:18) INFO:    [Gog]:              Number of library pages: 2
(12:26:18) INFO:    [Gog]:              Getting data for page 2
(12:26:19) INFO:    [Winetricks]:       Downloaded Winetricks
Update for version 2.5.0-beta.3 is not available (latest version: 2.5.0-beta.3, downgrade is disallowed).
(12:26:19) INFO:    [Gog]:              Getting data for page 2
(12:26:19) INFO:    [Gog]:              Saved games data
(12:26:19) INFO:    [Frontend]:         No cache found, getting data from legendary...
(12:26:19) INFO:    [Legendary]:        Refreshing library...
(12:26:20) INFO:    [Backend]:          Launching Against the Storm (1460447406)
(12:26:20) INFO:    [Backend]:          Preventing display from sleep
(12:26:20) WARNING: [Backend]:          You are using Proton, this can lead to some bugs. Please do not open issues with bugs related to games
(12:26:20) DEBUG:   [Backend]:          Running Wine command: run wineboot --init
(12:26:23) INFO:    [Backend]:          Created/Updated Wineprefix at /home/deck/Games/Heroic Beta/Prefixes/Against the Storm
(12:26:23) INFO:    [Gog]:              Setup: No instructions
(12:26:23) INFO:    [Gog]:              Launching Against the Storm: LD_PRELOAD= STEAM_COMPAT_CLIENT_INSTALL_PATH=/home/deck/.steam/steam STEAM_COMPAT_DATA_PATH="/home/deck/Games/Heroic Beta/Prefixes/Against the Storm" PROTON_NO_ESYNC=1 PROTON_NO_FSYNC=1 STEAM_COMPAT_APP_ID=0 SteamAppId=0 SteamGameId="heroic-Against the Storm" PROTON_LOG_DIR=/home/deck /home/deck/.local/share/Steam/steamapps/common/SteamLinuxRuntime_soldier/run "--filesystem=/home/deck/Games/Heroic/Heroic Beta/Against the Storm" -- /tmp/.mount_HeroicGa3i75/resources/app.asar.unpacked/build/bin/linux/gogdl launch "/home/deck/Games/Heroic/Heroic Beta/Against the Storm" 1460447406 --no-wine --wrapper "'/home/deck/.local/share/Steam/steamapps/common/Proton 7.0/proton' run" --platform windows --skip-version-check
(12:28:03) INFO:    [Backend]:          Stopping Display Power Saver Blocker

Steps to reproduce

  1. Launch game via CLI: ./Heroic-2.5.0-beta.3.AppImage --no-gui --no-sandbox "heroic://launch/1460447406"
  2. Save the game
  3. Quit
  4. Verify via another Gog Galaxy or Heroic Launcher installation if save was transferred.

Expected behavior

I'd expect the log to show up another Syncing saves - entry after the game ends, instead, the launcher seems to quit immediately, without calling cloud-save-methods again.

Screenshots

No response

System Information

Heroic Version: 2.5.0-beta.3 Caesar Clown
Legendary Version:  0.20.31 Dark Energy (hotfix #5)
GOGdl Version: 0.5
OS: SteamOS KERNEL: 5.13.0-valve21.3-1-neptune ARCH: x64
CPU: AMD Custom APU 0405 @2.31 GOVERNOR: schedutil
RAM: Total: 14.49 GiB Available: 8.06 GiB
GRAPHICS: GPU0: VanGogh VRAM: 512MB DRIVER:  
PROTOCOL: x11

Additional information

No response

flavioislima commented 2 years ago

Hmm, so it was like I suspected. Perhaps we need to handle this on the backend and not on the frontend. We will try to fix this before stable.

NoxDawnsong commented 1 year ago

Please excuse me if i am mistaken, but, in the mentioned PR i cannot locate a commit that fixes this issue. The commit fix: check if path exists before sync saves describes a different problem.

flavioislima commented 1 year ago

Please excuse me if i am mistaken, but, in the mentioned PR i cannot locate a commit that fixes this issue. The commit fix: check if path exists before sync saves describes a different problem.

which issue?

flavioislima commented 1 year ago

Ah, this issue. Hmm, I will check again tomorrow.

drakenabarion commented 1 year ago

My first post here so firstly I want to say thank you so much for creating Heroic Launcher. It vastly improves my Steam Deck experience.

Previously, I was syncing save game folders with Syncthing, but I find it annoying that game settings also sync across devices (4K on Steam Deck isnt great, and 800p on PC isnt great). Now, I am trying Heroic's automatic Sync, which I did not before.

But I am also experiencing the sync issue. If I play on my PC, then switch to Steam Deck and launch the game from Game Mode (CLI), the game will correctly download the save game from the cloud. But exiting, there is no upload sync.

I tested this on Dragon Quest XI, Final Fantasy 7R and Sable - I have these games from the Epic Store. Its not a terrible problem for me to hop into Desktop Mode and manually upload saves, but I am writing heresince it is a feature that you want to implement, and it may help to get feedback.

PatrickJMaloney commented 1 year ago

I'm on 2.5.2 on Steam Deck. I just want to point out that, if I launch Horizon Chase Turbo from within the Heroic Launcher GUI, a cloud sync is done when I exit the game. I've confirmed that by opening up the game on a Windows PC from Epic Launcher to confirm the cloud had updated data.

But, as others pointed out, the sync on exit does not appear to work when the game is run from a Steam shortcut.

The cloud sync always seems to be done when the game is started.

PatrickJMaloney commented 1 year ago

Update? Big patch recently and this is still open.

flavioislima commented 1 year ago

Update? Big patch recently and this is still open.

This was fixed on 2.6, just forgot to close.