Skip to content
This repository has been archived by the owner on May 19, 2024. It is now read-only.

[Bug] GOG games (library.json not found/empty) #126

Open
tegaidogun opened this issue Apr 8, 2023 · 12 comments
Open

[Bug] GOG games (library.json not found/empty) #126

tegaidogun opened this issue Apr 8, 2023 · 12 comments
Labels
bug Something isn't working heroic Issue may be related to Heroic

Comments

@tegaidogun
Copy link

tegaidogun commented Apr 8, 2023

Describe the bug
Gets an unhandled exception whenever I try running the application on my Steam Deck sing the latest version currently being 3.2.1.

To Reproduce
Steps to reproduce the behavior:

  1. Right-clik the main executable and "Run In Konsole" on a Steam Deck.
  2. Get an unhandled exception stating that library.json doesn't exist in the heroic games launcher.

Expected behavior
I have met this error before, and I expected that playing the game at least once undoes this error but sadly, it didn't

Details

  • Platform: Steam Deck
  • OS: Steam OS
  • Heroic Version: [e.g. v2.7.0 Flatpak, etc.]
  • Bash Launcher Version: [e.g. v3.2.1 Base]
@redromnon
Copy link
Owner

redromnon commented Apr 8, 2023

Could you please paste the full log here? The error you see on the terminal.

@redromnon
Copy link
Owner

Maybe it's checking library.json in the wrong path.

@tegaidogun
Copy link
Author

This is what is in HeroicBashLauncher.log:

[INFO] Using Bash Launcher v3.2.1
NOTE - This is an independent project and not affiliated with Heroic Games Launcher.

[DEBUG] Starting new HTTPS connection (1): api.github.com:443
[DEBUG] https://api.github.com:443 "GET /repos/redromnon/HeroicBashLauncher/releases/latest HTTP/1.1" 200 1432
[INFO] Done! Now creating launch files for your Epic Games library ...

Although when I run the executable in a terminal, I get this:

Using Bash Launcher v3.2.1
NOTE - This is an independent project and not affiliated with Heroic Games Launcher.

3.32.0
Traceback (most recent call last):
  File "func/HeroicBashLauncher.py", line 69, in <module>
  File "func/listinstalled.py", line 65, in listinstalled
FileNotFoundError: [Errno 2] No such file or directory: '/home/deck/.var/app/com.heroicgameslauncher.hgl/config/heroic/gog_store/library.json'
[223096] Failed to execute script 'HeroicBashLauncher' due to unhandled exception!

@redromnon redromnon changed the title [Bug] [Bug] GOG games (library.json not found/empty) Apr 9, 2023
@redromnon
Copy link
Owner

I can encounter this issue. Maybe this issue is occurring due to Heroic'd latest stable v2.7.0. I didn't encounter this before.
My library.json is present but empty. This is where data related to all GOG games in the account is supposed to be stored.

For now, you can turn off GOG games check in settings.config (present next to the HeroicBashLauncher executable) by setting gog: false

@redromnon redromnon added heroic Issue may be related to Heroic bug Something isn't working labels Apr 9, 2023
@redromnon
Copy link
Owner

Or you can just use Heroic's built-in Add To Steam feature. It's more polished.

@redromnon
Copy link
Owner

Found the solution: there's a new store-cache directory which Heroic now presumably uses. This issue will be fixed in the next release.

@tegaidogun
Copy link
Author

Thanks for everything!

@tegaidogun
Copy link
Author

I actually got another issue with library.json in another directory which affects the games from the Epic Games Store too. This is my log:

[INFO] Using Bash Launcher v3.2.1
NOTE - This is an independent project and not affiliated with Heroic Games Launcher.

[DEBUG] Starting new HTTPS connection (1): api.github.com:443
[DEBUG] https://api.github.com:443 "GET /repos/redromnon/HeroicBashLauncher/releases/latest HTTP/1.1" 200 1551
[INFO] Done! Now creating launch files for your Epic Games library ...
[INFO] Sonic Mania [818447bb519b46d48d365d5753362796]...
[WARNING] shortcuts.vdf already exists in 1082050489
[INFO] Adding Sonic Mania to Steam
[INFO] Steam AppID for Sonic Mania is 2493287133
[INFO] Checking Artwork...
[CRITICAL] Traceback (most recent call last):
  File "func/artwork.py", line 72, in addartwork
FileNotFoundError: [Errno 2] No such file or directory: '/home/deck/.var/app/com.heroicgameslauncher.hgl/config/heroic/lib-cache/library.json'

[CRITICAL] Traceback (most recent call last):
  File "func/artwork.py", line 72, in addartwork
FileNotFoundError: [Errno 2] No such file or directory: '/home/deck/.var/app/com.heroicgameslauncher.hgl/config/heroic/lib-cache/library.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "func/steam.py", line 175, in addtosteam
  File "func/artwork.py", line 172, in addartwork
AttributeError: 'Namespace' object has no attribute 'silent'

@redromnon
Copy link
Owner

Noted.
I'll won't be able to fix this anytime soon. I'll close this myself whenever I push the fix.

@redromnon
Copy link
Owner

Hey, can you please check if the following build works?
https://github.com/redromnon/HeroicBashLauncher/actions/runs/4796826991

@tegaidogun
Copy link
Author

It went well on the first run then couldnt overwrite the new file for some reason.

[INFO] Using Bash Launcher v3.2.2
NOTE - This is an independent project and not affiliated with Heroic Games Launcher.

[DEBUG] Starting new HTTPS connection (1): api.github.com:443
[DEBUG] https://api.github.com:443 "GET /repos/redromnon/HeroicBashLauncher/releases/latest HTTP/1.1" 200 1417
[INFO] Done! Now creating launch files for your Epic Games library ...
[INFO] Sonic Mania [818447bb519b46d48d365d5753362796]...
[WARNING] shortcuts.vdf already exists in 1082050489
[CRITICAL] Traceback (most recent call last):
  File "func/steam.py", line 131, in addtosteam
  File "func/steam.py", line 75, in calculate_last_srno
ValueError: invalid literal for int() with base 10: 'ck"'

@redromnon
Copy link
Owner

I haven't conducted a lot of tests for the add-to-steam functionality. I'm thinking of either refactoring it entirely or just removing this feature since Heroic already has a better implementation of this.

As a workaround, just set autoaddtosteam to False in settings.config
You'll have to add any new games to Steam manually though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working heroic Issue may be related to Heroic
Projects
None yet
Development

No branches or pull requests

2 participants