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.27k stars 437 forks source link

Heroic throwing error dialog after login epic. #2590

Closed eebssk1 closed 1 year ago

eebssk1 commented 1 year ago

Describe the bug

A dismissable error dialog was displayed with stop windows sound after logged in to epic account.

Add logs

发生了错误!尝试注销并登录您的 Epic 帐户。
Available games:
* A Game Of Thrones: The Board Game Digital Edition (App name: 06b8b80d89c24a28a7e91127fcbd9542 | Version: 1.1.2.1570)
* A Plague Tale: Innocence (App name: e0fa47ae79514345823bff209ae29451 | Version: EGS_1.08.4)
* Adios (App name: 73c56a1f38a548b2852ce8608c5e436e | Version: 1.0.0.11)
* Amnesia: Rebirth (App name: f59de18db4dc445f88ffeff24d081234 | Version: 1.42)
* Among the Sleep - Enhanced Edition (App name: aa78f7be2ee64193b6b6444c5fc50157 | Version: Windows.3.1.0.41_Win64_DLL_Fix)
* Ancient Enemy (App name: a96de508ac71471fa05e7c1c695e3b5d | Version: 1.03fix)
* ARK: Survival Evolved (App name: aafc587fbf654758802c8e41e4fb3255 | Version: 357.9.win)
* Automachef (App name: 069a60f6b0514a5fbe81b38957c1ddfd | Version: 15)
* Aven Colony (App name: dc07b9ead8214591b8df6d2546d2a0e3 | Version: 15)
* BioShock 2 Remastered (App name: b22ce34b4ce0408c97a888554447479b | Version: 1.0.0_BN-138_CL-17677)
* BioShock Infinite: Complete Edition (App name: f9d6f0530ea140909f8e8a997a7532d7 | Version: 1.0.0_BN-314_CL-17899)
* BioShock Remastered (App name: bc2c95c6ff564a16b26644f1d3ac3c55 | Version: 1.0.0_BN-187_CL-17677)
* Black Widow: Recharged (App name: a21fd90517bf428eb7c995a8c3261722 | Version: 5)
* Bloons TD 6 (App name: 7786b355a13b47a6b3915335117cd0b2 | Version: 35.2.6313)
* Borderlands 3 (App name: Catnip | Version: 1.0.23_CL_2860060_Borderlands_3)
* Brothers - A Tale of Two Sons (App name: Tamarind | Version: 1.1)
* Call of the Sea (App name: 6278dd278d714aeb88239a423fa0f8be | Version: 1.5.4.10)
* Car Mechanic Simulator 2018 (App name: 8032b75cf0914afa87c78d6914adc165 | Version: 1.6)
* Centipede Recharged (App name: 8727e9d0693542bda60769dc2ce33c20 | Version: 4)
* Chess Ultra (App name: fc0b13b7b17b4a46933756fb2786cdc4 | Version: MWLocal_13)
* Cities Skylines (App name: bcbc03d8812a44c18f41cf7d5f849265 | Version: 1.16.1-f3)
* City of Brass (App name: Arrowroot | Version: 1.6.3.0)
* Control (App name: Calluna | Version: 01.13)
* Costume Quest 2 (App name: 82a78a4dd6ef4eaa892707791b705073 | Version: 1)
* Cris Tales (App name: e7d92786abe54fae9319c1ddb94ae271 | Version: 1.0.7)
* DAEMON X MACHINA (App name: f4f0d39fbb4640e0be62aa91d9eca87d | Version: 1.0.6)
* Dark Deity (App name: e21be436768f4add87d4935a180b4932 | Version: 1.58)
* Darkwood (App name: 923130ebb546417b9d3115507f752d34 | Version: 1)
* DARQ (App name: ee96375fac2f47de978170a24398e581 | Version: 1.3.2d)
* Dead by Daylight (App name: Brill | Version: DBD_Live_EGS_Shipping_154_923411_6.6.2.2)
* Defense Grid: The Awakening (App name: a434dcb20f0d439b93aaa31dac9e3210 | Version: 1.263117)
* DEMON'S TILT (App name: b8b37813c5634dbdac61d88ff411135c | Version: FlipFix)
* Destiny 2 (App name: 592c359fb0e0413fb46dee2d24448eb4 | Version: 8374233)
* Dishonored - Definitive Edition (App name: d2da64bd4c4e422da4b1a88041492a3a | Version: 1.6)[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: Fetching metadata for 186 app(s).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 239, in list_games
UnicodeEncodeError: 'gbk' codec can't encode character '\xae' in position 13: illegal multibyte sequence
[14988] Failed to execute script 'cli' due to unhandled exception!

Steps to reproduce

1.login to epic 2.switch to other page 3.switch to login page again and dialog shows up(if not,try login with gog or switch to other random page will also trigger this)

Expected behavior

No such error dialog should show up

Screenshots

图片

Heroic Version

main branch from GitHub

System Information

Windows 10 22h2

Additional information

version commit id be6945dc4df3acbb8f666ef64f2e300b1ac14f72

Looks like a problem of legendary?Or is some changes are not compatible with chinese languange?

eebssk1 commented 1 year ago

It's the copyright sign in utf-8

Nocccer commented 1 year ago

Does the error exist if you enable utf8 support on windows? https://superuser.com/questions/1033088/is-it-possible-to-set-locale-of-a-windows-application-to-utf-8

Hamtarotaro commented 1 year ago

Hello,

I have the exact same problem on a steam deck on SteamOS Beta.

eebssk1 commented 1 year ago

Does the error exist if you enable utf8 support on windows? https://superuser.com/questions/1033088/is-it-possible-to-set-locale-of-a-windows-application-to-utf-8

Haven't try yet. However in my memory(when messing with virtual machine before, also chinese locale) turn on this will make half of the applications we normally use show garbaged text and even crash. I don't have vm currently and better not try this on host.

FYI:It looks like it's python's old school decision to use GBK on chinese locale and it's indepent of OS. While Windows' terminal defaults to so-called "gbk codepage",it does support output utf8 characters,the gbk is simply misleading but python does take this. Most solution from baidu is also force use utf8 or gb18030(around 2010,so looks like a long exist problem) as encoder,which is the solution in the commit.

eebssk1 commented 1 year ago

Hello,

I have the exact same problem on a steam deck on SteamOS Beta.

If you sure that it's python's default encoders' issue,then just fork lengendary and pick my commit and then replace the bundles binary with your compiled one.

Hamtarotaro commented 1 year ago

I'm sorry, i don't understand what you are telling me. (english is not my main language and its a bit technical for me) I can give you the log of what happend :

Legendary (Epic Games) Error: An error has occurred! Try to Logout and Login on your Epic account. Available games:

zclimber commented 1 year ago

Forcing change chinese encoding in Legendary won't fix the problem, because it's not limited to chinese.

What we need to do is set PYTHONIOENCODING = "utf-8" in options.env here https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/blob/fd5dcba27ab5d1ca31ff234558e62d02a3a7db3a/src/backend/storeManagers/legendary/library.ts#L626 But I don't have js skills to do it )))

dereulenspiegel commented 1 year ago

@zclimber I implemented your fix and it seems to work, thanks for the hint. As I am not a TS developer by trade I expect a few rounds of review and changes on my PR, but in the end this should fix this https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/pull/2643

zclimber commented 1 year ago

Turns out we can't just pass a variable and call it a day, we need Legendary to fix things. I created a PR there for this https://github.com/derrod/legendary/pull/554

Thaurin commented 1 year ago

Seems like the issue in Legendary has been closed with a commit from 4 days ago. Hoping to see this in the next release of Heroic. In the meantime, it looks like I could probably fix it by hand by inserting those few lines of code in cli.py.

arielj commented 1 year ago

you can download the binary from the Legendary repository and set it in Advanced settings in heroic so you don't have to wait for a release with that

Thaurin commented 1 year ago

Ahh, it's distributed as a binary created with PyInstaller... so I'll have to build it myself until Legendary comes up with a new release. Didn't find instructions in the README.md of the Legendary repo, so here you go:

$ git clone https://github.com/derrod/legendary.git
$ cd legendary/legendary
$ pip install --user pyinstaller
$ pyinstaller -F -n legendary cli.py

Binary can now be found in dist/legendary.

eebssk1 commented 1 year ago

Ahh, it's distributed as a binary created with PyInstaller... so I'll have to build it myself until Legendary comes up with a new release. Didn't find instructions in the README.md of the Legendary repo, so here you go:

$ git clone https://github.com/derrod/legendary.git
$ cd legendary/legendary
$ pip install --user pyinstaller
$ pyinstaller -F -n legendary cli.py

Binary can now be found in dist/legendary.

You can just fork the repo then enable the github actions,then push your change. It will automatically build it for you.

"Everyone should check the .github directory and see what it actually contains" In your case,you check the workflow file to see how developer build it actually.

arielj commented 1 year ago

you don't need to build it yourself, each commit builds the binary for all systems https://github.com/derrod/legendary/actions/runs/5101018370

Thaurin commented 1 year ago

Ahh, thanks. I must have missed that, sorry.

flavioislima commented 1 year ago

Closing this since it is a Legendary issue.

fingolfin commented 1 year ago

So is Heroic using Legendary snapshots? Or does there need to be a new Legendary release with the fix (which then presumably also needs to be picked up by Heroic)?

Pedrofsky commented 1 year ago

I'm having the same error on Steam Deck.

eebssk1 commented 1 year ago

This will be fixed later in legendary upstream. Pls do NOT spam in this issue any more, thanks.

zclimber commented 1 year ago

Sorry for spamming, but legendary has new release version which includes a fix for this bug.

Nocccer commented 1 year ago

Next release should have up to date legendary

eebssk1 commented 1 year ago

Next release should have up to date legendary

Consider lock the issue if spamming keeps happening.

zShxck720 commented 1 year ago

I have the same issue on Nobara linux

SweetInk commented 1 year ago

I have the same issue on Nobara linux

Step 1

Download the latest legendary release file

Step 2

Overwrite the downloaded legendary.exe into the heroic game launcher installation directory(e.g. C:\Users\username\AppData\Local\Programs\heroic\resources\app.asar.unpacked\build\bin\win32)

If nothing else, this should solve your problem!

orzaez commented 6 months ago

any solution for ubuntu 23??

arielj commented 6 months ago

any solution for ubuntu 23??

what's the exact error you are getting?

orzaez commented 6 months ago

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: Checking for updates...[Core] INFO: Getting authentication token...[cli] INFO: Launching f452ea20ae1b43698209998b56c2cc1c...Traceback (most recent call last): File "legendary/cli.py", line 3161, in <module>File "legendary/cli.py", line 3076, in main File "legendary/cli.py", line 716, in launch_gameFile "subprocess.py", line 951, in __init__File "subprocess.py", line 1837, in _execute_childFileNotFoundError: [Errno 2] No such file or directory: '/home/miguelpc/.config/heroic/tools/wine/Wine-GE-Proton8-26/bin/wine' [8636] Failed to execute script 'cli' due to unhandled exception!

I tried installing older legendary versions and nothing work :(

arielj commented 6 months ago

that's a different problem than the one from this thread

Do this:

if it still doesn't work, join our discord and start a thread in #-Support with the game logs (github is for issues with heroic itself, not with issues running games)

orzaez commented 6 months ago

Ok thank u so much, and sorry sorry for the confuse. I'm totally noob with Heroic 🙏🏼