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

Heroic stuck on loading screen #526

Closed dupr0n closed 3 years ago

dupr0n commented 3 years ago

Heroic stuck on the loading screen

Heroic worked on the first install, but not on the subsequent trials and is stuck on the loading screen in every scenario even across restarts and config file changes.

Describe the bug I had a new Arch Linux install with kde and fish shell and installed heroic-games-launcher-bin from the AUR. It launched well the first time. I then logged in with my epic games account and started importing games. These games were downloaded from my other dual-boot in Fedora, a few days prior. I got notifications that the game was imported, but the launcher still showed the game under "Not Ready" and clicking on it showed the same as well. I tried to restart the launcher, but that's when this bug happened. It's stuck on the loading screen indefinitely. I had it on for 2 hours, but still nothing. I tried deleting the config files, but no use. I tried using my previous arch config files, but still nothing. I tried using the AppImage and manual git installation, but the same problem. I launched the AppImage from the terminal and here's what I got.

To Reproduce Steps to reproduce the behavior:

  1. Download games from heroic in fedora.
  2. Install heroic in arch linux.
  3. Login to heroic in arch linux.
  4. Import the games downloaded from fedora in heroic games launcher in arch linux.
  5. Restart launcher.
  6. Constant loading screen.

Expected behavior Login successfully to display the catalogue of games.

Screenshots 2021-07-11_11-44 What happens when I try launching it from terminal.

Desktop (please complete the following information):

Additional context Note, the launcher still works when launched in fedora.

EDIT: I read up on some issues and found that previous versions didn't have these issues, so I downloaded 1.7.2 AppImage and that works like a charm.

flavioislima commented 3 years ago

Hi. Yes, for some reason I guess the check games updates function is not using bash. Fish doesn't have some commands that we use in heroic to parse outputs, probably has but with different names, so that's maybe from the issue is coming.

Until 1.7.2 we were using bash for everything but then we changed to use the user shell. I thought this was fixed on 1.8.2 but it seems that I forgot to check on all places.

I'll need to investigate this.

flavioislima commented 3 years ago

@dupr0n can you check if this build fixes the issue: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/suites/3209979789/artifacts/74246761

?

Vudgekek commented 3 years ago

Have same issue on both Win10 and ArtixLinux (Arch).

dupr0n commented 3 years ago

@dupr0n can you check if this build fixes the issue: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/suites/3209979789/artifacts/74246761

?

On it. Sorry for the delay. I'll update ya when I run it.

dupr0n commented 3 years ago

@flavioislima Unfortunately, its the same issue. image

IntoHades commented 3 years ago

@flavioislima Unfortunately, its the same issue. image

For some reason your login have expired and heroic is not showing the login page. Try removing the user.json file from the .config/legendary folder.

dupr0n commented 3 years ago

@flavioislima Unfortunately, its the same issue. image

For some reason your login have expired and heroic is not showing the login page. Try removing the user.json file from the .config/legendary folder.

I tried it right now and it shows the login screen and stuff. Asks me to paste SSID and wut not and once logged in, I can play my catalogue of games. However, once I quit the launcher and relaunch it, I'm back to the same issue.

flavioislima commented 3 years ago

@flavioislima Unfortunately, its the same issue. image

For some reason your login have expired and heroic is not showing the login page. Try removing the user.json file from the .config/legendary folder.

I tried it right now and it shows the login screen and stuff. Asks me to paste SSID and wut not and once logged in, I can play my catalogue of games. However, once I quit the launcher and relaunch it, I'm back to the same issue.

Thats a really strange error I would say. It loses the Login info after restarting heroic, makes no sense.

Anyhow, can you check this other version: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/suites/3217535727/artifacts/74479779 This one will have more output when login in, I'll try to have even more logs on terminal on the startup to help investigate this issue.

dupr0n commented 3 years ago

Ok, so I tried launching it. Gave me the same error, so I deleted the user.json file and relaunched it. Quit it and relaunched it again. image In the image, the first command is running the launcher after deleting the user.json file. Second one is quitting and relaunching.

flavioislima commented 3 years ago

Ok, I'm lost here. Can you paste that stderr output here so I can ask help with the Legendary team? because it looks like it's an encoding issue. So I'll need to check with them if they have a better idea.

dupr0n commented 3 years ago

Ok, I'm lost here. Can you paste that stderr output here so I can ask help with the Legendary team? because it looks like it's an encoding issue. So I'll need to check with them if they have a better idea.

Sure thing. Whole Output: Gtk-Message: 16:26:26.852: Failed to load module "appmenu-gtk-module" ERROR: Failed to register protocol with OS. INFO: Command 'python' found. Version: '3.9.6' INFO: Refreshing the Library... ERROR: No credentials. Missing Login? Error occurred in handler for 'checkGameUpdates': Error: Command failed: /tmp/.mount_Heroicqz5BP1/resources/app.asar.unpacked/build/bin/linux/legendary list-installed --check-updates --tsv [cli] INFO: Logging in to check for updates... [Core] INFO: Trying to re-use existing login session... Traceback (most recent call last): File "legendary/cli.py", line 1375, in File "legendary/cli.py", line 1339, in main File "legendary/cli.py", line 205, in list_installed UnicodeEncodeError: 'ascii' codec can't encode character '\xae' in position 19: ordinal not in range(128) [12161] Failed to execute script cli

at ChildProcess.exithandler (child_process.js:317:12)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1048:16)
at Socket.<anonymous> (internal/child_process.js:439:11)
at Socket.emit (events.js:315:20)
at Pipe.<anonymous> (net.js:673:12) {

killed: false, code: 255, signal: null, cmd: '/tmp/.mount_Heroicqz5BP1/resources/app.asar.unpacked/build/bin/linux/legendary list-installed --check-updates --tsv', stdout: 'App name\tApp title\tInstalled version\tAvailable version\tUpdate available\tInstall size\tInstall path\r\n' + 'Blowfish\tFaster Than Light\t1.6.12.Windows\t1.6.12.Windows\tFalse\t285886371\t/mnt/data/Games/Heroic/FasterThanLight\r\n', stderr: '[cli] INFO: Logging in to check for updates...\n' + '[Core] INFO: Trying to re-use existing login session...\n' + 'Traceback (most recent call last):\n' + ' File "legendary/cli.py", line 1375, in \n' + ' File "legendary/cli.py", line 1339, in main\n' + ' File "legendary/cli.py", line 205, in list_installed\n' + "UnicodeEncodeError: 'ascii' codec can't encode character '\xae' in position 19: ordinal not in range(128)\n" + '[12161] Failed to execute script cli\n' } INFO: checking for heroic updates

stderr '[cli] INFO: Logging in to check for updates...\n' + '[Core] INFO: Trying to re-use existing login session...\n' + 'Traceback (most recent call last):\n' + ' File "legendary/cli.py", line 1375, in \n' + ' File "legendary/cli.py", line 1339, in main\n' + ' File "legendary/cli.py", line 205, in list_installed\n' + "UnicodeEncodeError: 'ascii' codec can't encode character '\xae' in position 19: ordinal not in range(128)\n" + '[12161] Failed to execute script cli\n'

flavioislima commented 3 years ago

@dupr0n and @Vudge One more try. Added even more logging and fixed several other functions on the client and backend side. Lets hope it fixes it: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/suites/3228082647/artifacts/74801778

dupr0n commented 3 years ago

Ok, so here's what I did. I launched the appImage and it just showed a blank grey screen. No loading indicator and such. So, I then deleted that user.json file and it showed me my library. Quit and ran again and it showed the library. Great! I then tried playing a game and it told me my session expired and I had to logout and log back in. So I did that. Got logged in and was able to play a game. Quit the launcher and tried again, but came back to the first issue. A blank grey screen with no loading indicator.

Here's the output in the console:

Gtk-Message: 08:14:00.715: Failed to load module "appmenu-gtk-module"
INFO: Trying to get user information
INFO: Trying to get user information
INFO: Refreshing library fully
INFO: Refreshing library fully
ERROR: No credentials. Missing Login?
ERROR: Error: Command failed: /tmp/.mount_HeroicbmNqgF/resources/app.asar.unpacked/build/bin/linux/legendary list-games --include-ue
[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 1375, in <module>
  File "legendary/cli.py", line 1337, in main
  File "legendary/cli.py", line 175, in list_games
UnicodeEncodeError: 'ascii' codec can't encode character '\xae' in position 18: ordinal not in range(128)
[9826] Failed to execute script cli

INFO: Updating game list
ERROR: No credentials. Missing Login?
ERROR: Error: Command failed: /tmp/.mount_HeroicbmNqgF/resources/app.asar.unpacked/build/bin/linux/legendary list-games --include-ue
[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 1375, in <module>
  File "legendary/cli.py", line 1337, in main
  File "legendary/cli.py", line 175, in list_games
UnicodeEncodeError: 'ascii' codec can't encode character '\xae' in position 18: ordinal not in range(128)
[9825] Failed to execute script cli

INFO: Updating game list
ERROR: Failed to register protocol with OS.
INFO: Command 'python' found. Version: '3.9.6'
INFO: Frontend: Refreshing Library
INFO: Refreshing library fully
ERROR: No credentials. Missing Login?
ERROR: Error: Command failed: /tmp/.mount_HeroicbmNqgF/resources/app.asar.unpacked/build/bin/linux/legendary list-games --include-ue
[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 1375, in <module>
  File "legendary/cli.py", line 1337, in main
  File "legendary/cli.py", line 175, in list_games
UnicodeEncodeError: 'ascii' codec can't encode character '\xae' in position 18: ordinal not in range(128)
[9903] Failed to execute script cli

INFO: Updating game list
ERROR: Error: Command failed: /tmp/.mount_HeroicbmNqgF/resources/app.asar.unpacked/build/bin/linux/legendary list-installed --check-updates --tsv
[cli] INFO: Logging in to check for updates...
[Core] INFO: Trying to re-use existing login session...
Traceback (most recent call last):
  File "legendary/cli.py", line 1375, in <module>
  File "legendary/cli.py", line 1339, in main
  File "legendary/cli.py", line 205, in list_installed
UnicodeEncodeError: 'ascii' codec can't encode character '\xae' in position 19: ordinal not in range(128)
[9913] Failed to execute script cli

INFO: Trying to get user information
INFO: Refreshing library fully
ERROR: No credentials. Missing Login?
ERROR: Error: Command failed: /tmp/.mount_HeroicbmNqgF/resources/app.asar.unpacked/build/bin/linux/legendary list-games --include-ue
[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 1375, in <module>
  File "legendary/cli.py", line 1337, in main
  File "legendary/cli.py", line 175, in list_games
UnicodeEncodeError: 'ascii' codec can't encode character '\xae' in position 18: ordinal not in range(128)
[9919] Failed to execute script cli

INFO: Updating game list
INFO: checking for heroic updates

Output after deleting the user.json file:

Gtk-Message: 08:20:58.798: Failed to load module "appmenu-gtk-module"
INFO: Trying to get user information
INFO: Trying to get user information
ERROR: Failed to register protocol with OS.
INFO: Command 'python' found. Version: '3.9.6'
INFO: Frontend: Refreshing Library
INFO: Refreshing library fully
ERROR: No credentials. Missing Login?
ERROR: Error: Command failed: /tmp/.mount_HeroicYmqUnL/resources/app.asar.unpacked/build/bin/linux/legendary list-games --include-ue
[cli] INFO: Logging in...
Traceback (most recent call last):
  File "legendary/cli.py", line 1375, in <module>
  File "legendary/cli.py", line 1337, in main
  File "legendary/cli.py", line 142, in list_games
  File "legendary/core.py", line 155, in login
ValueError: No saved credentials
[10413] Failed to execute script cli

INFO: Updating game list
WARNING: App offline, skipping checking game updates.
INFO: Trying to get user information
INFO: checking for heroic updates

When I try to launch Rocket League after deleting user.json file:

INFO: launching Rocket League® Sugar
INFO: Trying to get user information
(node:10594) UnhandledPromiseRejectionWarning: Error: Could not connect
    at Socket.onerror (/tmp/.mount_HeroiciUB9WG/resources/app.asar/node_modules/discord-rpc/src/transports/ipc.js:32:16)
    at Object.onceWrapper (events.js:422:26)
    at Socket.emit (events.js:315:20)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
(Use `heroic --trace-warnings ...` to show where the warning was created)
(node:10594) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:10594) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
INFO: 
 Launch Command:    __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia   /usr/bin/gamemoderun /tmp/.mount_HeroiciUB9WG/resources/app.asar.unpacked/build/bin/linux/legendary launch Sugar  --wine /usr/bin/wine --wine-prefix '/home/dr0hith/.wine'

After logging out and logging back in:

Check failed: chdir(current_directory) == 0
INFO: Trying to get user information
INFO: Refreshing library fully
ERROR: No credentials. Missing Login?
ERROR: Error: Command failed: /tmp/.mount_HeroiciUB9WG/resources/app.asar.unpacked/build/bin/linux/legendary list-games --include-ue
[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 1375, in <module>
  File "legendary/cli.py", line 1337, in main
  File "legendary/cli.py", line 175, in list_games
UnicodeEncodeError: 'ascii' codec can't encode character '\xae' in position 18: ordinal not in range(128)
[10943] Failed to execute script cli

INFO: Updating game list
INFO: Successfully logged in
INFO: Frontend: Called Login

Launching game after logging in:

INFO: launching Rocket League® Sugar
INFO: Trying to get user information
INFO: Refreshing library fully
(node:10594) UnhandledPromiseRejectionWarning: Error: Could not connect
    at Socket.onerror (/tmp/.mount_HeroiciUB9WG/resources/app.asar/node_modules/discord-rpc/src/transports/ipc.js:32:16)
    at Object.onceWrapper (events.js:422:26)
    at Socket.emit (events.js:315:20)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
(node:10594) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 5)
ERROR: No credentials. Missing Login?
ERROR: Error: Command failed: /tmp/.mount_HeroiciUB9WG/resources/app.asar.unpacked/build/bin/linux/legendary list-games --include-ue
[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 1375, in <module>
  File "legendary/cli.py", line 1337, in main
  File "legendary/cli.py", line 175, in list_games
UnicodeEncodeError: 'ascii' codec can't encode character '\xae' in position 18: ordinal not in range(128)
[10960] Failed to execute script cli

INFO: Updating game list
INFO: 
 Launch Command:    __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia   /usr/bin/gamemoderun /tmp/.mount_HeroiciUB9WG/resources/app.asar.unpacked/build/bin/linux/legendary launch Sugar  --wine /usr/bin/wine --wine-prefix '/home/dr0hith/.wine' 
INFO: Stopping Discord Rich Presence if running...
INFO: Stopped Discord Rich Presence.
(node:10594) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'write' of null
    at IPCTransport.send (/tmp/.mount_HeroiciUB9WG/resources/app.asar/node_modules/discord-rpc/src/transports/ipc.js:155:17)
    at /tmp/.mount_HeroiciUB9WG/resources/app.asar/node_modules/discord-rpc/src/transports/ipc.js:161:12
    at new Promise (<anonymous>)
    at IPCTransport.close (/tmp/.mount_HeroiciUB9WG/resources/app.asar/node_modules/discord-rpc/src/transports/ipc.js:159:12)
    at RPCClient.destroy (/tmp/.mount_HeroiciUB9WG/resources/app.asar/node_modules/discord-rpc/src/client.js:656:26)
    at RP.disconnect (/tmp/.mount_HeroiciUB9WG/resources/app.asar/node_modules/discord-rich-presence-typescript/index.js:39:11)
    at LegendaryGame.launch (/tmp/.mount_HeroiciUB9WG/resources/app.asar/build/legendary/games.js:479:20)
    at async electron/js2c/browser_init.js:197:563
(node:10594) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 7)

Quitting launcher and relaunching (Same as first log in this post):

Gtk-Message: 08:28:16.294: Failed to load module "appmenu-gtk-module"
INFO: Trying to get user information
INFO: Trying to get user information
INFO: Refreshing library fully
INFO: Refreshing library fully
ERROR: No credentials. Missing Login?
ERROR: Error: Command failed: /tmp/.mount_HeroicQWWhLw/resources/app.asar.unpacked/build/bin/linux/legendary list-games --include-ue
[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 1375, in <module>
  File "legendary/cli.py", line 1337, in main
  File "legendary/cli.py", line 175, in list_games
UnicodeEncodeError: 'ascii' codec can't encode character '\xae' in position 18: ordinal not in range(128)
[11378] Failed to execute script cli

INFO: Updating game list
ERROR: No credentials. Missing Login?
ERROR: Error: Command failed: /tmp/.mount_HeroicQWWhLw/resources/app.asar.unpacked/build/bin/linux/legendary list-games --include-ue
[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 1375, in <module>
  File "legendary/cli.py", line 1337, in main
  File "legendary/cli.py", line 175, in list_games
UnicodeEncodeError: 'ascii' codec can't encode character '\xae' in position 18: ordinal not in range(128)
[11379] Failed to execute script cli

INFO: Updating game list
ERROR: Failed to register protocol with OS.
INFO: Command 'python' found. Version: '3.9.6'
INFO: Frontend: Refreshing Library
INFO: Refreshing library fully
ERROR: No credentials. Missing Login?
ERROR: Error: Command failed: /tmp/.mount_HeroicQWWhLw/resources/app.asar.unpacked/build/bin/linux/legendary list-games --include-ue
[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 1375, in <module>
  File "legendary/cli.py", line 1337, in main
  File "legendary/cli.py", line 175, in list_games
UnicodeEncodeError: 'ascii' codec can't encode character '\xae' in position 18: ordinal not in range(128)
[11455] Failed to execute script cli

INFO: Updating game list
ERROR: Error: Command failed: /tmp/.mount_HeroicQWWhLw/resources/app.asar.unpacked/build/bin/linux/legendary list-installed --check-updates --tsv
[cli] INFO: Logging in to check for updates...
[Core] INFO: Trying to re-use existing login session...
Traceback (most recent call last):
  File "legendary/cli.py", line 1375, in <module>
  File "legendary/cli.py", line 1339, in main
  File "legendary/cli.py", line 205, in list_installed
UnicodeEncodeError: 'ascii' codec can't encode character '\xae' in position 19: ordinal not in range(128)
[11459] Failed to execute script cli

INFO: Trying to get user information
INFO: Refreshing library fully
ERROR: No credentials. Missing Login?
ERROR: Error: Command failed: /tmp/.mount_HeroicQWWhLw/resources/app.asar.unpacked/build/bin/linux/legendary list-games --include-ue
[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 1375, in <module>
  File "legendary/cli.py", line 1337, in main
  File "legendary/cli.py", line 175, in list_games
UnicodeEncodeError: 'ascii' codec can't encode character '\xae' in position 18: ordinal not in range(128)
[11463] Failed to execute script cli

INFO: Updating game list
INFO: checking for heroic updates
flavioislima commented 3 years ago

Ok thanks, now at least we know that the issue is with this function: legendary list-games --include-ue I'll try to change the way we call it to bypass the shell. I think that this will fix the issue with the encoding. Btw, which encoding do you use? I think by default we use utf8 on all calls. also, can you install legendary from AUR and run: legendary list-games --include-ue, I think will work, but would be good to see if for some reason the output complains about something.

dupr0n commented 3 years ago

Yeah, I use utf-8 encoding. Ran that command ya gave me et voila.

[cli] INFO: Logging in...
[Core] INFO: Trying to re-use existing login session...
[cli] INFO: Getting game list... (this may take a while)
[Core] INFO: Updating meta for ac8f20a7931e4d63a1db4dc1267ec3d1 due to build version mismatch

Available games:
 * 3 out of 10: Season Two (App name: 9a1aae61129247fb971ce96ab6a959da | Version: S02_Release_V002_CL16694)
 * A Short Hike (App name: d6407c9e6fd54cb492b8c6635480d792 | Version: Win_1.8.14)
 * Absolute Drift (App name: 19927295d6e3467887d4e830d8c85963 | Version: Win_202106111315
...

Looks like its just the encoding issue.

flavioislima commented 3 years ago

Yeah, I use utf-8 encoding. Ran that command ya gave me et voila.

[cli] INFO: Logging in...
[Core] INFO: Trying to re-use existing login session...
[cli] INFO: Getting game list... (this may take a while)
[Core] INFO: Updating meta for ac8f20a7931e4d63a1db4dc1267ec3d1 due to build version mismatch

Available games:
 * 3 out of 10: Season Two (App name: 9a1aae61129247fb971ce96ab6a959da | Version: S02_Release_V002_CL16694)
 * A Short Hike (App name: d6407c9e6fd54cb492b8c6635480d792 | Version: Win_1.8.14)
 * Absolute Drift (App name: 19927295d6e3467887d4e830d8c85963 | Version: Win_202106111315
...

Looks like its just the encoding issue.

Ok, doing some internet search I found out what could be causing the issue since I was able to replicate it using legendary only:

❯ PYTHONIOENCODING=ascii legendary list-games
[cli] INFO: Logging in...
[Core] INFO: Trying to re-use existing login session...
[cli] INFO: Getting game list... (this may take a while)

Available games:
 * 20XX (App name: Quail | Version: 1.42.12rc1)
 * 3 out of 10: Season Two (App name: 9a1aae61129247fb971ce96ab6a959da | Version: S02_Release_V002_CL16694)
 * >observer_ (App name: Tumeric | Version: 1.0.0d)
 * A Total War Saga: TROY (App name: 11e598b192324994abce05bad4f81b50 | Version: 13189.2253749_Ajax)
 * Absolute Drift (App name: 19927295d6e3467887d4e830d8c85963 | Version: Win_202106111315)
 * ABZU (App name: Curry | Version: 1.0)
 * AER Memories of Old (App name: 26b63c46de9e4dcc856b3c6b106b6777 | Version: 1.0.4.2)
 * Alan Wake's American Nightmare (App name: Condor | Version: 01.03)
 * Alien: Isolation (App name: 8935bb3e1420443a9789fe01758039a5 | Version: 1.0RC5.284847.51533)
 * Amnesia: A Machine for Pigs (App name: d7db33dfe7634d6b8a188c708f2caa3c | Version: 1.2)
 * Among Us (App name: 963137e4c29d4c79a81323b8fab03a40 | Version: 2021.6.30.0)
 * ARK: Survival Evolved (App name: aafc587fbf654758802c8e41e4fb3255 | Version: 332.9.win)
 * Barony (App name: c98c4cd6d83a4524b4b22f13af95a104 | Version: v3.3.7-010920)
Traceback (most recent call last):
  File "/usr/bin/legendary", line 33, in <module>
    sys.exit(load_entry_point('legendary-gl==0.20.6', 'console_scripts', 'legendary')())
  File "/usr/lib/python3.9/site-packages/legendary/cli.py", line 1337, in main
    cli.list_games(args)
  File "/usr/lib/python3.9/site-packages/legendary/cli.py", line 175, in list_games
    print(f' * {game.app_title} (App name: {game.app_name} | Version: {game.app_version})')
UnicodeEncodeError: 'ascii' codec can't encode character '\u2122' in position 9: ordinal not in range(128)

So, for some reason, on your machine, Python is using this environment, and I have no idea why and also why only in Heroic since this is not happening when using legendary only. I'll try to set this variable to utf8 on all legendary calls on heroic, this might fix the issue for good, at least I think so 🤞🏽

dupr0n commented 3 years ago

Well F. And this was on a clean install as well, so rip. I had made python virtual environments, but they were all, well, virtual. Other than that, no idea. 🥲 Let's hope for the best with that fix, lol.

flavioislima commented 3 years ago

Well F. And this was on a clean install as well, so rip. I had made python virtual environments, but they were all, well, virtual. Other than that, no idea. 🥲 Let's hope for the best with that fix, lol.

Ok, one more: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/suites/3248283636/artifacts/75456838

instead of passing the variable, I changed the way I was requesting the games from Legendary, that way it will skip the shell. So, should work, because passing the variable made no difference for me, even trying to force the error didn't work. If this doesn't fix it, I don't know what will do 👍🏽

dupr0n commented 3 years ago

Yeah, still no luck, rip. I'll try something on my end, like having a different python environment and such, and I'll tell ya how it goes.

Gtk-Message: 21:46:15.653: Failed to load module "appmenu-gtk-module"
INFO: Trying to get user information
INFO: Trying to get user information
INFO: Trying to get user information
WARNING: Protocol already registered.
INFO: Command 'python' found. Version: '3.9.6'
INFO: Frontend: Refreshing Library
INFO: Refreshing library...
INFO: Refreshing Epic Games...
[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 1375, in <module>
  File "legendary/cli.py", line 1337, in main
  File "legendary/cli.py", line 175, in list_games
UnicodeEncodeError: 'ascii' codec can't encode character '\xae' in position 18: ordinal not in range(128)
[19179] Failed to execute script cli

INFO: Updating game list
INFO: Game List Updated
INFO: Trying to get user information
INFO: checking for heroic updates
ERROR: Error: Command failed: /tmp/.mount_HeroicUkBSI4/resources/app.asar.unpacked/build/bin/linux/legendary list-installed --check-updates --tsv
[cli] INFO: Logging in to check for updates...
[Core] INFO: Trying to re-use existing login session...
Traceback (most recent call last):
  File "legendary/cli.py", line 1375, in <module>
  File "legendary/cli.py", line 1339, in main
  File "legendary/cli.py", line 205, in list_installed
UnicodeEncodeError: 'ascii' codec can't encode character '\xae' in position 19: ordinal not in range(128)
[19183] Failed to execute script cli

The same encoding error, unfortunately. I'll see what I can do.

flavioislima commented 3 years ago

Yeah, still no luck, rip. I'll try something on my end, like having a different python environment and such, and I'll tell ya how it goes.

Gtk-Message: 21:46:15.653: Failed to load module "appmenu-gtk-module"
INFO: Trying to get user information
INFO: Trying to get user information
INFO: Trying to get user information
WARNING: Protocol already registered.
INFO: Command 'python' found. Version: '3.9.6'
INFO: Frontend: Refreshing Library
INFO: Refreshing library...
INFO: Refreshing Epic Games...
[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 1375, in <module>
  File "legendary/cli.py", line 1337, in main
  File "legendary/cli.py", line 175, in list_games
UnicodeEncodeError: 'ascii' codec can't encode character '\xae' in position 18: ordinal not in range(128)
[19179] Failed to execute script cli

INFO: Updating game list
INFO: Game List Updated
INFO: Trying to get user information
INFO: checking for heroic updates
ERROR: Error: Command failed: /tmp/.mount_HeroicUkBSI4/resources/app.asar.unpacked/build/bin/linux/legendary list-installed --check-updates --tsv
[cli] INFO: Logging in to check for updates...
[Core] INFO: Trying to re-use existing login session...
Traceback (most recent call last):
  File "legendary/cli.py", line 1375, in <module>
  File "legendary/cli.py", line 1339, in main
  File "legendary/cli.py", line 205, in list_installed
UnicodeEncodeError: 'ascii' codec can't encode character '\xae' in position 19: ordinal not in range(128)
[19183] Failed to execute script cli

The same encoding error, unfortunately. I'll see what I can do.

Yes, please maybe its something with the python env since on Fedora it was working nicely. I tested so far on: Pop_OS, Manjaro, Garuda, Fedora 34 and OpenSuse TW and neve got this issue. With OpenSuse I needed to setup some python variables and paths, but didn't got the same errors you're getting.

On my end I have no idea, even passing the variable with that encoding is not breaking for me, and I'm doing it directly on the code and it doesn't break with this new approach. I'm out of ideas 😢

JonathanBrouwer commented 3 years ago

I'm on manjaro. When first running heroic, it works. Any subsequent launch fails with the errors above. Deleting .config/legendary/user.json and logging in again makes it launch again once, and the next launch fails again.

flavioislima commented 3 years ago

I'm on manjaro. When first running heroic, it works. Any subsequent launch fails with the errors above. Deleting .config/legendary/user.json and logging in again makes it launch again once, and the next launch fails again.

Try this version: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/suites/3323335033/artifacts/77859937

gat02 commented 3 years ago

I have the same problem but only if I am in a gnome de session. If I switch to a plasma de session Heroic works.

flavioislima commented 3 years ago

I have the same problem but only if I am in a gnome de session. If I switch to a plasma de session Heroic works.

Can you try the version above if you use arch based distro? I think it was fixed for good now.

Vudgekek commented 3 years ago

@flavioislima Most recent patch isn’t working on Artix. Most recent official release not working on Artix Linux, Pop_OS, and Windows with same issue.

gat02 commented 3 years ago

Just tested the newest patch. It shows games for maybe 2 sec then I get a blank screen. This is on Gnome session. If I switch to Plasma Heroic works fine. Heroic - 01

Heroic - 02

Heroic - 03

flavioislima commented 3 years ago

@Vudge the issue with windows is different, is due to a bug in nodejs. A portable versions works without issues.

This linux issue is that I can't reproduce it. I'm also using arch based with gnome right now. And I never saw this issue so it's hard to me to fix something I cannot reproduce. As far as I can see, this is a python issue. Heroic is working but once it calls legendary it gives the error. It looks like an encoding issue like I said above. Some misconfigured python, missing lib, etc. And why only on gnome for you?, since I use gnome myself and have no issues, hard to figure it out.

In OpenSuse there is this issue with python where you need to setup some paths first otherwise it won't work. Maybe this is something similar?

flavioislima commented 3 years ago

@Vudge you said popos as well, can you provide the logs? I have a vm with it and it's working fine for me on latest 21.04.

flavioislima commented 3 years ago

Clean PopOS! 21.04 install, logged in, closed heroic, open it again, refreshed library, imported game, launched game, no errors at all. Hard to know what is happening on your machines, guys. image

gat02 commented 3 years ago

I found out my problem. It was a problem with my /etc/locale.conf and /etc/locale.gen files.

Heroic - 04

Fixed the files, you probably have to reboot after correcting the files.

Heroic - 05

Seems like plasma uses it own ~/.config/plasma-localerc, so maybe that's why my plasma session was working.

Hope it helps with other's problems.

Vudgekek commented 3 years ago

Alright, I will clean install another distro tonight and see if there are any issues and get back to you with what I find. @flavioislima

flavioislima commented 3 years ago

Thanks for posting the solution @gat02 , this will help others for sure.

dupr0n commented 3 years ago

I found out my problem. It was a problem with my /etc/locale.conf and /etc/locale.gen files.

Heroic - 04

Fixed the files, you probably have to reboot after correcting the files.

Heroic - 05

Seems like plasma uses it own ~/.config/plasma-localerc, so maybe that's why my plasma session was working.

Hope it helps with other's problems.

This is it, lol. After so many tries with different python environments, I just gave up. Thanks for the solution!

May I know how ya found out that this was the issue?

Also, @flavioislima can you explain how the locale causes an error with encoding? I really wanna know how it works, lol.

I'll close this issue tomorrow, for other peeps to reply as well.

Vudgekek commented 3 years ago

@flavioislima, @gat02’s solution appears to be working on all my installations with Gnome (including PopOS). I will see if the problem appears on other DEs.

gat02 commented 3 years ago

I found out my problem. It was a problem with my /etc/locale.conf and /etc/locale.gen files. Heroic - 04 Fixed the files, you probably have to reboot after correcting the files. Heroic - 05 Seems like plasma uses it own ~/.config/plasma-localerc, so maybe that's why my plasma session was working. Hope it helps with other's problems.

This is it, lol. After so many tries with different python environments, I just gave up. Thanks for the solution!

May I know how ya found out that this was the issue?

Also, @flavioislima can you explain how the locale causes an error with encoding? I really wanna know how it works, lol.

I'll close this issue tomorrow, for other peeps to reply as well.

I was looking at legendary github page and there was a UnicodeEncodeError issue and someone commented that it seems like a locale issue. So I went on archwiki since I use arch and searched for locale. I saw the command locale -a and I ran it and I had those 3 lines of error. So, I just tried to fix it and it worked.

Happy that I can help.

darus90 commented 3 years ago

me too, stuck on loading screen Heroic 1.9.3 appimage Ubuntu 21.04 x64 Intel i7 10750H RTX2060 Super Captura de pantalla de 2021-09-13 19-09-03

Megalomaniak commented 1 year ago

I just started experiencing this on Manjaro Testing branch today. Plasma-wayland session. Been running heroic without issues for months, now it launches, shows a loading spinner for a second and then displays a blank screen.

(23:38:07) INFO:    [Legendary]:       Running command: /opt/Heroic/resources/app.asar.unpacked/build/bin/linux/legendary --version
(23:38:07) INFO:    [Legendary]:       Legendary location: /opt/Heroic/resources/app.asar.unpacked/build/bin/linux/legendary
(23:38:07) INFO:    [Gog]:             GOGDL location: /opt/Heroic/resources/app.asar.unpacked/build/bin/linux/gogdl
(23:38:07) INFO:    [Backend]:         

Heroic Version: 2.4.0-beta.2 Caesar Clown
Legendary Version:  0.20.27 Dark Energy (hotfix)
OS: ManjaroLinux KERNEL: 5.15.86-1-MANJARO ARCH: x64
CPU: AMD Ryzen 5 1600 Six-Core Processor @3.2 GOVERNOR: schedutil
RAM: Total: 23.4 GiB Available: 17.02 GiB
GRAPHICS: GPU0: Navi 23 [Radeon RX 6600/6600 XT/6600M] VRAM: 1MB DRIVER:  
PROTOCOL: wayland

(23:38:07) INFO:    [Gog]:             Getting data about the user
APPIMAGE env is not defined, current application is not an AppImage
(23:38:07) WARNING: [Backend]:         Protocol already registered.
[16971:0106/233808.021013:ERROR:browser_main_loop.cc(271)] Gtk: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
[16971:0106/233808.021101:ERROR:browser_main_loop.cc(271)] Gtk: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
[16971:0106/233808.021160:ERROR:browser_main_loop.cc(271)] Gtk: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
(23:38:08) INFO:    [Backend]:         AreWeAntiCheatYet data downloaded
(23:38:08) INFO:    [Gog]:             Saved user data to config
(23:38:10) INFO:    [DXVKInstaller]:   Updating vkd3d to: vkd3d-proton-2.7.tar.xz
(23:38:10) INFO:    [Backend]:         Downloaded Winetricks
(23:38:11) INFO:    [DXVKInstaller]:   downloaded vkd3d
(23:38:11) INFO:    [DXVKInstaller]:   extracting vkd3d
(23:38:11) INFO:    [DXVKInstaller]:   extracting vkd3d updated!
[17004:0106/233812.309934:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[17004:0106/233816.251936:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!

Worth a mention there was definitely a mesa update yesterday, and I just saw another follow up just now so updated and will restart then edit/report back again.

edit: No positive change. :(

flavioislima commented 1 year ago

@Megalomaniak you seems to be using a pretty old heroic release. Try the latest one. Also try the flatpak if aur does not work.

Megalomaniak commented 1 year ago

@flavioislima Yep, already ahead of you on that. I was just returning to report success on switching from one packagers AUR to another once I realized how far behind it was.