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.24k stars 431 forks source link

Error downloading save games of GOG Game #3733

Open kekonn opened 6 months ago

kekonn commented 6 months ago

Describe the bug

When downloading my saves from Cyberpunk 2077, I get the following error:

[SAVES] INFO: Local files: 115
[SAVES] INFO: Files in cloud: 166
[SAVES] WARNING: Forcing download
[SAVES] INFO: Downloading files
[SAVES] ERROR: Downloading file failed
Traceback (most recent call last):
  File "gogdl/cli.py", line 67, in <module>
  File "gogdl/cli.py", line 62, in main
  File "gogdl/saves.py", line 161, in sync
  File "gogdl/saves.py", line 287, in download_file
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
[24280] Failed to execute script 'cli' due to unhandled exception!

Add logs

Log file posted here: https://gist.github.com/kekonn/f08a8bc6e776bbce83216090a9d7f60c
because it it made the issue text too large otherwise

Steps to reproduce

  1. Install Cyberpunk 2077
  2. Go to settings
  3. Force download saves

Expected behavior

Save games are downloaded

Screenshots

No response

Heroic Version

Latest Stable

System Information

System: Host: tuxgamer Kernel: 6.8.8-1-cachyos-bore arch: x86_64 bits: 64 Desktop: KDE Plasma v: 6.0.4 Distro: CachyOS

Additional information

I wasn't sure to post this under heroic or gogdl. I'm guessing this is not reproducible without my specific set of save games. Is there another way to access them?

hvdijk commented 4 months ago

I've just had this happen on my end as well. The key is that "ERROR: Downloading file failed" just before. This indicates that the server returned an error: at https://github.com/Heroic-Games-Launcher/heroic-gogdl/blob/610b0e5360d0e8db8740fb3af1c4b9277eae6218/gogdl/saves.py#L279 this checks response.ok which checks that the remote server indicated some error. Notably, in the handling of this error, the function does not return, it just logs it and carries on as if there was no error. In my case, I was seeing the remote server randomly return HTTP error 503, and on that error, no content-length is returned, and the attempt to determine how large the file is causes the crash. I guess it's good that it crashed because if it had attempted to save that server error to your local save folder, the mess would be worse because there would be some good local files, some corrupted local files, and no good way of figuring out which is which.