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.11k stars 425 forks source link

Failed to execute script 'cli' when updating the game's list #3164

Closed 0wn3dg0d closed 9 months ago

0wn3dg0d commented 12 months ago

Describe the bug

Starting from version 2.7.0 I started getting an error (version 2.6.2 is ok): Failed to execute script 'cli' due to unhandled exception!

An error has occurred! Try to Logout and Login on your Epic account.
[cli] INFO: Logging in...[Core] INFO: Trying to re-use existing login session...[cli] INFO: Getting game list... (this may take a while)Traceback (most recent call last):
File "legendary\cli.py", line 3069, in <module>
File "legendary\cli.py", line 2980, in main
File "legendary\cli.py", line 206, in list_games
File "legendary\core.py", line 519, in get_non_asset_library_items
File "legendary\api\egs.py", line 201, in get_game_info
File "requests\models.py", line 1021, in raise_for_status
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://catalog-public-service-prod06.ol.epicgames.com/catalog/api/shared/namespace/p-dlmgtzntcfrfg6cmfwuxqmpaeuk49q/bulk/items?id=6aa934dbfaea49bdb50f74ab286983a5&includeDLCDetails=True&includeMainGameDetails=True&country=RU&locale=ru
[22488] Failed to execute script 'cli' due to unhandled exception!```

The problem occurs when updating the list of games. 
As I understand it, this is due to some change after version 2.7.0.
Specifically, the problem is related to the fact that, due to a specific game, the server blocks access to receiving information.

I would also like to separately note that when working with the latest current version of legendaries, when executing the command:
`legendary.exe list-games --tsv`
no problems arise.

Do you have any ideas on how to change the code to bypass this problem?

Thanks.

P.S. Luckily, even with the bug, the game list still loads, but it's still a bit annoying. I want to use the new version, but in the new version, when updating the list, you constantly see an error window.

### Add logs

```text
(15:43:18) INFO:    [Legendary]:        Legendary location: C:\Users\Admin\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\legendary
(15:43:18) INFO:    [Gog]:              GOGDL location: C:\Users\Admin\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\gogdl
(15:43:18) INFO:    [Connection]:       Connectivity: check-online
(15:43:18) INFO:    [Connection]:       Pinging external endpoints
(15:43:18) INFO:    [Backend]:          DRM module staus {
  "neifaoindggfcjicffkgpmnlppeffabd": {
    "name": "Google Widevine Windows CDM",
    "status": "new",
    "version": "1.0.2512.1"
  },
  "oimompecagnajdejgnnjijobebaeigek": {
    "name": "Widevine Content Decryption Module",
    "status": "new",
    "version": "4.10.2710.0"
  }
}
(15:43:18) WARNING: [Backend]:          Protocol already registered.
(15:43:18) INFO:    [Connection]:       Connectivity: online
(15:43:18) ERROR:   [Gog]:              Unable to syncQueued playtime, userData not present
(15:43:18) INFO:    [Backend]:          VCRuntime is installed
(15:43:19) INFO:    [Backend]:          Loading Screen Ready
(15:43:19) INFO:    [Frontend]:         Refreshing undefined Library
(15:43:19) WARNING: [Backend]:          refresh not implemented on Sideload Library Manager
(15:43:19) INFO:    [Legendary]:        Refreshing library...
(15:43:19) INFO:    [Legendary]:        Refreshing Epic Games...
(15:43:19) INFO:    [Legendary]:        Game list updated, got 1217 games & DLCs
(15:43:19) INFO:    [Backend]:          Frontend Ready
(15:43:19) WARNING: [Backend]:          listUpdateableGames not implemented on Sideload Library Manager
(15:43:19) INFO:    [Gog]:              Found 0 game(s) to update
(15:43:19) INFO:    [Backend]:          Checking for new Heroic Updates
(15:43:19) INFO:    [Backend]:          Checking for current version changelog
(15:43:19) INFO:    [Legendary]:        Running command: XDG_CONFIG_HOME=C:\Users\Admin\AppData\Roaming\heroic\legendaryConfig C:\Users\Admin\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\legendary --version
(15:43:19) INFO:    [Gog]:              Running command: C:\Users\Admin\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\gogdl --auth-config-path C:\Users\Admin\AppData\Roaming\heroic\gog_store\auth.json --version
(15:43:19) INFO:    [Nile]:             Running command: XDG_CONFIG_HOME=C:\Users\Admin\AppData\Roaming\heroic\nile_config C:\Users\Admin\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\nile --version
(15:43:19) INFO:    [Legendary]:        Checking for game updates: XDG_CONFIG_HOME=C:\Users\Admin\AppData\Roaming\heroic\legendaryConfig C:\Users\Admin\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\legendary list --third-party
(15:43:19) INFO:    [Legendary]:        Running command: XDG_CONFIG_HOME=C:\Users\Admin\AppData\Roaming\heroic\legendaryConfig C:\Users\Admin\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\legendary list --third-party
(15:43:20) INFO:    [Backend]:          
System Information:
CPU: 24x 12th Gen Intel(R) Core(TM) i9-12900KF
Memory: 34.21 GB (used: 10.03 GB)
GPUs:
  GPU 0:
    Name: NVIDIA Corporation GA102 [GeForce RTX 3080 Ti]
    IDs: D=2208 V=10de SD=2208 SV=1569
    Driver: 537.42
OS: Майкрософт Windows 11 Pro 10.0.22621 (win32)

The current system is not a Steam Deck
We are not running inside a Flatpak container

Software Versions:
  Heroic: 2.9.2 Boa Hancock
  Legendary: 0.20.32 Dark Energy (hotfix #6)
  gogdl: 0.7.3
  Nile: 1.0.0 Jonathan Joestar

(15:43:21) DEBUG:   [Backend]:          Unable to load Steam Libraries, libraryfolders.vdf not found
(15:43:24) INFO:    [Backend]:          Starting the Download Queue
(15:43:34) DEBUG:   [Legendary]:        Update is available for eb2c955d6a494dfb9b7e09e0145668a1: Build_20230516.0 != Build_20231012.0
(15:43:34) INFO:    [Legendary]:        Found 1 game to update

Steps to reproduce

  1. Go to 'Library'
  2. Click on 'Update library'
  3. See error

Expected behavior

The error window should not appear.

Screenshots

No response

Heroic Version

Latest Stable

System Information

Additional information

No response

arielj commented 11 months ago

@0wn3dg0d can you try with heroic 2.10.0? we updated legendary, maybe that fixes this problem

also, would be good to verify if the problem is Heroic or Legendary, because if it's legendary this should be reported in that project instead

0wn3dg0d commented 11 months ago

@0wn3dg0d can you try with heroic 2.10.0? we updated legendary, maybe that fixes this problem

@arielj hi. Yes, the problem still remains.

I think the problem may be related to legendary, but the question is how exactly does heroic uses legendary and in which part the problem occurs?

Becuase when I use legendary list-games or legandary list - there are no problems

I would open this topic in the legendary issues, but I don’t know how to present it. I need to know what kind of request to make to legendary in order to get this error. This error occurs a few seconds after clicking the "update library" button.


An error has occurred! Try to Logout and Login on your Epic account.
[cli] INFO: Logging in...[Core] INFO: Trying to re-use existing login session...[cli] INFO: Getting game list... (this may take a while)Traceback (most recent call last):
File "legendary\cli.py", line 3148, in <module>File "legendary\cli.py", line 3059, in main
File "legendary\cli.py", line 206, in list_games
File "legendary\core.py", line 531, in get_non_asset_library_items
File "legendary\api\egs.py", line 201, in get_game_info
File "requests\models.py", line 1021, in raise_for_status
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://catalog-public-service-prod06.ol.epicgames.com/catalog/api/shared/namespace/p-dlmgtzntcfrfg6cmfwuxqmpaeuk49q/bulk/items?id=6aa934dbfaea49bdb50f74ab286983a5&includeDLCDetails=True&includeMainGameDetails=True&country=RU&locale=ru
[480] Failed to execute script 'cli' due to unhandled exception!
arielj commented 11 months ago

Can you check in Settings > Logs > Legendary what's the command before the error? and try that same command outside heroic

0wn3dg0d commented 11 months ago

Ok, its:

(01:14:15) INFO:    [Legendary]:        Running command: LEGENDARY_CONFIG_PATH=C:\Users\Admin\AppData\Roaming\heroic\legendaryConfig\legendary C:\Users\Admin\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\legendary list --third-party

(01:14:15) INFO:    [Legendary]:        Checking for game updates: LEGENDARY_CONFIG_PATH=C:\Users\Admin\AppData\Roaming\heroic\legendaryConfig\legendary C:\Users\Admin\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32\legendary list --third-party

The problem is related to --third-party (--third-party is "include apps that are not installable (e.g. that have to be activated on Origin)

Receiving information about some “uninstallable” game leads to a request that is blocked, resulting in an error.

I'll create a topic in Legendary.

I wonder if there is a way to somehow make Heroic request list only without --third-party games. As an option in advanced settings, like "toggle third-party game search" or etc.

arielj commented 11 months ago

we list everything so we can show EA games as unsupported (without that information, users think the games are not recognized by Heroic and fill in bugs asking why X game does not show up)

I think it would be useful to know which game is actually producing this problem, something to check with legendary I guess, I don't know how it works internally

arielj commented 11 months ago

Maybe we could try to fetch the list of games and if it fails try to fetch without the third party ones as a fallback

0wn3dg0d commented 11 months ago

Ok, I created a topic: https://github.com/derrod/legendary/issues/618

Judging by the log, the problem is related to requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://catalog-public-service-prod06.ol.epicgames.com/catalog/api/shared/namespace/p-dlmgtzntcfrfg6cmfwuxqmpaeuk49q/bulk/items?id=6aa934dbfaea49bdb50f74ab286983a5&includeDLCDetails=True&includeMainGameDetails=True&country=RU&locale=ru

Namespace is p-dlmgtzntcfrfg6cmfwuxqmpaeuk49q Surprisingly, I can't find this namespace on epicdatainfo. So I don't know what this game is.

arielj commented 11 months ago

do you own the game "RUN - The world in-between"? I searched for the id=.... from that url and found this https://raw.githubusercontent.com/nachoaldamav/items-tracker/main/database/items/6aa934dbfaea49bdb50f74ab286983a5.json

0wn3dg0d commented 11 months ago

Nope, I don't have it. Just checked.

0wn3dg0d commented 11 months ago

Feels like it's really has something to do with RUN - The world in-between, but it's private. There is no RUN - The world in-between in the library in the official client, but technically it's listed on the account.

    {
        "namespace": "p-dlmgtzntcfrfg6cmfwuxqmpaeuk49q",
        "catalogItemId": "6aa934dbfaea49bdb50f74ab286983a5",
        "appName": "ce3847ad3d464210834cde06e472619c",
        "productId": "d1f36b0d43614c73a3b6a7e7a0f13f09",
        "sandboxName": "Dev",
        "sandboxType": "PRIVATE"
    },
0wn3dg0d commented 11 months ago

Derrod solved the problem in the code part, all that remains is to wait for the Legendary Standalone Binary update to use it with Heroic.

arielj commented 11 months ago

Derrod solved the problem in the code part, all that remains is to wait for the Legendary Standalone Binary update to use it with Heroic.

great!

you can download the binary from the legendary repo and use it as an alternative legendary binary in settings > advanced if you don't want to wait

0wn3dg0d commented 10 months ago

Ok. Today the stable version of Legenadry was updated (0.20.34 - Direct Intervention): https://github.com/derrod/legendary/releases/tag/0.20.34

Now it's fixed. It remains to add a new version of Legendary to Heroic, I will do this manually for now.

arielj commented 9 months ago

This will be fully fixed by https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/pull/3357

Meanwhile an alternative binary can be used to use Legendary 0.20.34.

Closing this now