redromnon / HeroicBashLauncher

Directly launch any Epic Games Store and GOG game from anywhere without Heroic on Linux.
GNU General Public License v3.0
354 stars 17 forks source link

[Bug] v2.6.0 Flatpak GLIBC error on Steam Deck #65

Closed carn1x closed 2 years ago

carn1x commented 2 years ago

To Reproduce Steps to reproduce the behavior:

  1. Download https://github.com/redromnon/HeroicBashLauncher/releases/download/v2.6.0/HeroicBashLauncher-2.6.0.zip
  2. Extract and run setup.sh
  3. No success message
  4. Find error in HeroicBashLauncher.log
    [97233] Error loading Python lib '/tmp/_MEI4ps1Eb/libpython3.10.so.1.0': dlopen: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /tmp/_MEI4ps1Eb/libpython3.10.so.1.0)

Expected behavior Success message.

Details

redromnon commented 2 years ago

The issue is since I create the executable with Pyinstaller, it makes use of the glibc version of the system (here 2.35). Thus, the executable won't work in other systems where glic version < 2.35. I recently came to know that Steam OS (Deck) uses an older glibc version and maybe even other older disros. So I'm afraid you need to wait for newer versions of Steam OS to use the latest glibc 2.35. I'm thinking of a workaround currently.

carn1x commented 2 years ago

This seems related https://github.com/ValveSoftware/SteamOS/issues/776

redromnon commented 2 years ago

So Valve needs to update their runtime SDK. It's not a SteamOS issue.

By the way, you try the latest build from the GitHub Actions and see if it works.

carn1x commented 2 years ago

By the way, you try the latest build from the GitHub Actions and see if it works.

Sorry I've not used Github Actions before, but I'm guessing you mean use this binary over the top of v2.6.0 extract? https://github.com/redromnon/HeroicBashLauncher/actions/runs/2350707319

carn1x commented 2 years ago

By the way, you try the latest build from the GitHub Actions and see if it works.

Tried https://github.com/redromnon/HeroicBashLauncher/actions/runs/2350707319 and setup.sh now runs successfully, however the game launcher scripts now all give this error:

Error - Dolphin
Unknown error code 100
execvp: Exec format error
Please send a full bug report at https://bug.kde.org.

There's no log in the logs folder.

Here's an example launcher script it generated:


    #!/bin/bash 

    #Generate log
    exec > logs/SonicMania_Heroic.log 2>&1

    #Enable UTF-8 Encoding
    export LC_ALL=en_US.UTF-8

    #Game Name = Sonic Mania (epic) 

    #App Name = 818447bb519b46d48d365d5753362796

    #Override launch parameters
    /home/deck/Apps/HeroicBashLauncher/HeroicBashLauncher "Sonic Mania" "818447bb519b46d48d365d5753362796" "/home/deck/.var/app/com.heroicgameslauncher.hgl/config/heroic/GamesConfig/818447bb519b46d48d365d5753362796.json" "epic"

    flatpak run --command=./launchflatpakgame.sh com.heroicgameslauncher.hgl

    #Launch Command
    #WINEESYNC=1 WINEFSYNC=1 STEAM_COMPAT_CLIENT_INSTALL_PATH=/home/deck/.var/app/com.heroicgameslauncher.hgl/.steam/steam STEAM_COMPAT_DATA_PATH='/Sonic-Mania' /app/bin/heroic/resources/app.asar.unpacked/build/bin/linux/legendary launch 818447bb519b46d48d365d5753362796 --no-wine --wrapper "'/home/deck/.steam/steam/steamapps/common/Proton 7.0/proton' run" 
carn1x commented 2 years ago

I tried opening Terminal and running the launcher shell script from the GameFiles folder and this logged to file:


** (zenity:14458): WARNING **: 09:59:58.043: AT-SPI: Could not obtain desktop path or name

** (zenity:14458): WARNING **: 09:59:58.054: AT-SPI: Could not obtain desktop path or name

** (zenity:14458): WARNING **: 09:59:58.054: atk-bridge: get_device_events_reply: unknown signature

** (zenity:14458): WARNING **: 09:59:58.054: atk-bridge: get_device_events_reply: unknown signature

** (zenity:14458): WARNING **: 09:59:58.054: atk-bridge: GetRegisteredEvents returned message with unknown signature

** (zenity:14458): WARNING **: 09:59:58.065: AT-SPI: Could not obtain desktop path or name

** (zenity:14458): WARNING **: 09:59:58.065: atk-bridge: get_device_events_reply: unknown signature

** (zenity:14458): WARNING **: 09:59:58.065: atk-bridge: get_device_events_reply: unknown signature

** (zenity:14458): WARNING **: 09:59:58.065: atk-bridge: GetRegisteredEvents returned message with unknown signature
Using Bash Launcher 2.6.0

Checking if Zenity is installed:

shortcuts.vdf already exists in 1294057
Sonic Mania already added to Steam.
Steam AppID for Sonic Mania is 3752580394
Checking Artwork...
Traceback (most recent call last):
  File "func/artwork.py", line 65, in addartwork
FileNotFoundError: [Errno 2] No such file or directory: '/home/deck/Apps/HeroicBashLauncher/GameFiles/GameFiles/SonicMania_Heroic.sh'

[cli] INFO: Logging in...
[Core] INFO: Logging in...
[cli] INFO: Checking for updates...
[Core] INFO: Getting authentication token...
[cli] INFO: Launching 818447bb519b46d48d365d5753362796...
Traceback (most recent call last):
  File "/home/deck/.steam/steam/steamapps/common/Proton 7.0/proton", line 1392, in <module>
    g_session.init_session(sys.argv[1] != "runinprefix")
  File "/home/deck/.steam/steam/steamapps/common/Proton 7.0/proton", line 1194, in init_session
    g_compatdata.setup_prefix()
  File "/home/deck/.steam/steam/steamapps/common/Proton 7.0/proton", line 704, in setup_prefix
    with self.prefix_lock:
  File "/home/deck/.local/share/Steam/steamapps/common/Proton 7.0/filelock.py", line 323, in __enter__
    self.acquire()
  File "/home/deck/.local/share/Steam/steamapps/common/Proton 7.0/filelock.py", line 271, in acquire
    self._acquire()
  File "/home/deck/.local/share/Steam/steamapps/common/Proton 7.0/filelock.py", line 384, in _acquire
    fd = os.open(self._lock_file, open_mode)
FileNotFoundError: [Errno 2] No such file or directory: '/Sonic-Mania/pfx.lock'
wineserver stopped
Sonic Mania stopped
carn1x commented 2 years ago
FileNotFoundError: [Errno 2] No such file or directory: '/Sonic-Mania/pfx.lock'

Seems similar to https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/issues/96 which was solved by manually creating a folder. Running find ~/|grep "Sonic-Mania" yields no results, however from the error message I don't understand exactly where to create the folder since /Sonic-Mania/pfx.lock would imply I need to create the folder in the file system root / which seems incorrect.

redromnon commented 2 years ago

Check your Prefix folder location in the Heroic setting. I think it should be there.

carn1x commented 2 years ago

Check your Prefix folder location in the Heroic setting. I think it should be there.

Do you mean in Heroic -> Settings -> Wine? If yes, I have:

redromnon commented 2 years ago

I meant the the game's settings. Not the global settings which you've mentioned.

carn1x commented 2 years ago

I meant the the game's settings. Not the global settings which you've mentioned.

The Library -> Sonic Mania -> Settings -> WinePrefix: /Sonic-Mania. I've never adjusted this setting manually however, and the game launches fine through Heroic launcher still.

EDIT: also, there is no /Sonic-Mania in the filesystem root.

redromnon commented 2 years ago

I don't know much about how Proton works. Maybe you can post the issue in Heroic's Discord.

carn1x commented 2 years ago

If I manually remove the /Sonic-Mania prefix so that it defaults to ~/.wine (which exists) prefix from Heroic settings, then the game will launcher from the launcher script from terminal, however there is an error when running the launcher script from Dolphin UI, and same error when running from Steam Library. I'm wondering if this error from my log paste above is causing a fatal error when run in the UI/Steam context, but is somehow non-fatal when via terminal:

FileNotFoundError: [Errno 2] No such file or directory: '/home/deck/Apps/HeroicBashLauncher/GameFiles/GameFiles/SonicMania_Heroic.sh'

?

redromnon commented 2 years ago

I have to fix the path here. GameFiles appears twice. But otherwise the game is launching from the terminal?

carn1x commented 2 years ago

But otherwise the game is launching from the terminal?

Yes

redromnon commented 2 years ago

Try creating a new prefix again with the game's name (Sonic-Mania) in the Games/Prefix directory originally created by Heroic, instead of using ~wine. Even better, why not try using Wine-GE? Since Proton is specifically created for Steam games.

Error - Dolphin Unknown error code 100 execvp: Exec format error Please send a full bug report at https://bug.kde.org.

It's a KDE error. Can't do much about this.

redromnon commented 2 years ago

Launch Command

#WINEESYNC=1 WINEFSYNC=1 STEAM_COMPAT_CLIENT_INSTALL_PATH=/home/deck/.var/app/com.heroicgameslauncher.hgl/.steam/steam STEAM_COMPAT_DATA_PATH='/Sonic-Mania'

The Steam Compact data path looks corrupted.

carn1x commented 2 years ago

It's a KDE error. Can't do much about this.

Supposedly execvp: Exec format error is an error regarding incorrect formatting of the shebang. So I manually edited the launcher shell script to remove all leading space and new lines ahead of the shebang so the file now starts with the first line:

#!/bin/bash 

This now gets past the execvp: Exec format error error and instead I get UI error:

Failed to add artwork. Please check HeroicBashLauncher.log for the error in the HeroicBashLauncher folder and consider reporting it as an issue on Gitlab.

Strangely after running this and editing the shell script again, the leading new line and indentation have returned which is really weird.

redromnon commented 2 years ago

Because HBL updates and creates the script again to override any change in launch parameters. It won't affect the execution of the code.

What's the error in the HeroicBashLauncher.log? Looks like an issue of adding the artwork.

carn1x commented 2 years ago

Here's the log after my temporary shebang edit:


** (zenity:25253): WARNING **: 13:46:32.146: AT-SPI: Could not obtain desktop path or name

** (zenity:25253): WARNING **: 13:46:32.157: AT-SPI: Could not obtain desktop path or name

** (zenity:25253): WARNING **: 13:46:32.157: atk-bridge: get_device_events_reply: unknown signature

** (zenity:25253): WARNING **: 13:46:32.158: atk-bridge: get_device_events_reply: unknown signature

** (zenity:25253): WARNING **: 13:46:32.158: atk-bridge: GetRegisteredEvents returned message with unknown signature

** (zenity:25253): WARNING **: 13:46:32.168: AT-SPI: Could not obtain desktop path or name

** (zenity:25253): WARNING **: 13:46:32.168: atk-bridge: get_device_events_reply: unknown signature

** (zenity:25253): WARNING **: 13:46:32.168: atk-bridge: get_device_events_reply: unknown signature

** (zenity:25253): WARNING **: 13:46:32.168: atk-bridge: GetRegisteredEvents returned message with unknown signature
Using Bash Launcher 2.6.0

Checking if Zenity is installed:

shortcuts.vdf already exists in 1294057
Sonic Mania already added to Steam.
Steam AppID for Sonic Mania is 3752580394
Checking Artwork...
Traceback (most recent call last):
  File "func/artwork.py", line 65, in addartwork
FileNotFoundError: [Errno 2] No such file or directory: '/home/deck/Apps/HeroicBashLauncher/GameFiles/GameFiles/SonicMania_Heroic.sh'

/home/deck/Apps/HeroicBashLauncher/GameFiles/SonicMania_Heroic.sh: line 20: unexpected EOF while looking for matching `"'
/home/deck/Apps/HeroicBashLauncher/GameFiles/SonicMania_Heroic.sh: line 23: syntax error: unexpected end of file
carn1x commented 2 years ago

Note this log is most recently from build f8a7de3 though I was getting the same error before (seems that the artwork part error is still present?)

redromnon commented 2 years ago

Are you sure? Did you replace the new build with the old one? Because the error corresponding to the line 65 code is not present in the new build - https://github.com/redromnon/HeroicBashLauncher/blob/main/func/artwork.py#L65

Instead, that code has moved to line 68

carn1x commented 2 years ago

Are you sure? Did you replace the new build with the old one? Because the error corresponding to the line 65 code is not present in the new build - https://github.com/redromnon/HeroicBashLauncher/blob/main/func/artwork.py#L65

Instead, that code has moved to line 68

You're right sorry, I pasted the new build to the wrong folder. Retried, and now dolphin works fine with no error and launches the game, but Steam gives an error and this log:

/home/deck/Apps/HeroicBashLauncher/GameFiles/SonicMania_Heroic.sh: line 14: /home/deck/Apps/HeroicBashLauncher/HeroicBashLauncher: Permission denied
[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 818447bb519b46d48d365d5753362796...
Proton: Upgrading prefix from None to 7.0-100 (/)
fsync: up and running.
wine: RLIMIT_NICE is <= 20, unable to use setpriority safely
WARNING: radv is not a conformant Vulkan implementation, testing use only.
WARNING: radv is not a conformant Vulkan implementation, testing use only.
iniparser: cannot open C:\users\steamuser\AppData\Local\Sega\SonicMania\Settings.ini
iniparser: cannot open C:\users\steamuser\AppData\Local\Sega\SonicMania\Settings.ini
WARNING: radv is not a conformant Vulkan implementation, testing use only.
Unable to read VR Path Registry from C:\users\steamuser\AppData\Local\openvr\openvrpaths.vrpath
Saving Settings.
w: 430 h: 265 windowed: 1
Total HID GamePad Count: 0
wineserver stopped
Sonic Mania stopped
carn1x commented 2 years ago

OK I confused at what state/build I was in, so I deleted the SonicMania.sh and regenerated it. The shebang edit is still needed, but now I'm getting:

Traceback (most recent call last):
  File "func/artwork.py", line 68, in addartwork
FileNotFoundError: [Errno 2] No such file or directory: '/home/deck/Apps/HeroicBashLauncher/GameFilesSonicMania_Heroic.sh'

/home/deck/Apps/HeroicBashLauncher/GameFiles/SonicMania_Heroic.sh: line 20: unexpected EOF while looking for matching `"'
/home/deck/Apps/HeroicBashLauncher/GameFiles/SonicMania_Heroic.sh: line 23: syntax error: unexpected end of file
redromnon commented 2 years ago

I just fixed that missing "/" in the newer build and you seemed to get just that.

/home/deck/Apps/HeroicBashLauncher/GameFilesSonicMania_Heroic.sh'

redromnon commented 2 years ago

And I'll make the shebang edit too. It worked in my case without the edit though.

carn1x commented 2 years ago

Build 6089acd now works from dolphin without edits, however Steam still isn't happy, giving the following log:

3.32.0
Using Bash Launcher 2.6.0

Checking if Zenity is installed:

shortcuts.vdf already exists in 1294057
Sonic Mania already added to Steam.
Steam AppID for Sonic Mania is 3078299162
Checking Artwork...
Covert Art exists
Background Art exists
BigPicture Art exists
[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 818447bb519b46d48d365d5753362796...
Proton: Upgrading prefix from None to 7.0-100 (/)
fsync: up and running.
wine: RLIMIT_NICE is <= 20, unable to use setpriority safely
WARNING: radv is not a conformant Vulkan implementation, testing use only.
WARNING: radv is not a conformant Vulkan implementation, testing use only.
iniparser: cannot open C:\users\steamuser\AppData\Local\Sega\SonicMania\Settings.ini
iniparser: cannot open C:\users\steamuser\AppData\Local\Sega\SonicMania\Settings.ini
WARNING: radv is not a conformant Vulkan implementation, testing use only.
Unable to read VR Path Registry from C:\users\steamuser\AppData\Local\openvr\openvrpaths.vrpath
Saving Settings.
w: 430 h: 265 windowed: 1
Total HID GamePad Count: 0
wineserver stopped
Sonic Mania stopped

I'm not even sure what the error is from that...

geoelectric commented 2 years ago

And I'll make the shebang edit too. It worked in my case without the edit though.

Not sure if modern shells compensate somehow if you launch from command line, but historically the shebang had to be the first two characters (assuming the script is chmod+x and launched directly) because they were the “magic number” that indicated interpreted script to the POSIX exec API. Those are always expected to be the first bytes in the file.

Even if it works in some instances, I think per spec it’s still considered a mistake to have anything else in the file before the shebang. The error seen above is exactly the error I’d expect for exec() not identifying the file type.

https://en.wikipedia.org/wiki/Shebang_(Unix)#Magic_number

carn1x commented 2 years ago

Build 6089acd now works from dolphin without edits, however Steam still isn't happy, giving the following log:

3.32.0
Using Bash Launcher 2.6.0

Checking if Zenity is installed:

shortcuts.vdf already exists in 1294057
Sonic Mania already added to Steam.
Steam AppID for Sonic Mania is 3078299162
Checking Artwork...
Covert Art exists
Background Art exists
BigPicture Art exists
[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 818447bb519b46d48d365d5753362796...
Proton: Upgrading prefix from None to 7.0-100 (/)
fsync: up and running.
wine: RLIMIT_NICE is <= 20, unable to use setpriority safely
WARNING: radv is not a conformant Vulkan implementation, testing use only.
WARNING: radv is not a conformant Vulkan implementation, testing use only.
iniparser: cannot open C:\users\steamuser\AppData\Local\Sega\SonicMania\Settings.ini
iniparser: cannot open C:\users\steamuser\AppData\Local\Sega\SonicMania\Settings.ini
WARNING: radv is not a conformant Vulkan implementation, testing use only.
Unable to read VR Path Registry from C:\users\steamuser\AppData\Local\openvr\openvrpaths.vrpath
Saving Settings.
w: 430 h: 265 windowed: 1
Total HID GamePad Count: 0
wineserver stopped
Sonic Mania stopped

I'm not even sure what the error is from that...

Just to reiterate/confirm, this issue is still happening in 2.6.1 when launching via Steam.

redromnon commented 2 years ago

This doesn't look like a Bash Launcher anymore. Most likely a game issue. Are you getting the same error when launching from Heroic?

carn1x commented 2 years ago

This doesn't look like a Bash Launcher anymore. Most likely a game issue. Are you getting the same error when launching from Heroic?

OK so I decided to start from scratch:

  1. Delete all files, re-extract https://github.com/redromnon/HeroicBashLauncher/releases/download/v2.6.1/HeroicBashLauncher-2.6.1.zip
  2. Run setup.sh
  3. Observe error ./HeroicBashLauncher: Permission denied
  4. Allow HeroicBashLauncher to be executable
  5. Re-Run setup.sh
  6. Observe launcher scripts are generated in GameFiles without error
  7. Try to run all launcher scripts, met with the following issues:
    • Seems the space in the Proton path issue is back. If I change a game to use GE or something with no space in the path, then this gets past that error in the launcher script, even though Heroic Launcher has no problem with space in the Proton path.
    • Seems the pfx.lock issue is still happening, fixed by removing what seems to be a default value added by Heroic Launcher to each games Wine Prefix override. Wiping this field returns to the default Wine Prefix and the game launches. This issue I've just noticed also seems to affect launching the game from Heroic as well.
  8. Ultimately I have 7 games installed, and 7 launcher scripts, and I'm able to tweak them in Heroic according to the above issues to launch both in Heroic and the Launcher scripts, yet none of them launch via Steam, all of them with that same log as above which appears to show no fatal error.
redromnon commented 2 years ago

Just to confirm - both Heroic and scripts are able to launch the game except via Steam?

redromnon commented 2 years ago

Did you AutoInstall Vulkan? Maybe try toggling it.

carn1x commented 2 years ago

Just to confirm - both Heroic and scripts are able to launch the game except via Steam?

Correct. Also I just tried BoilR and Steam appears to be able to launch Heroic games added to Steam via BoilR as well, but I have only just tried it so I don't know much about how it is handling things.

Did you AutoInstall Vulkan? Maybe try toggling it.

I don't recall ever seeing this option anywhere?

redromnon commented 2 years ago

BoilR adds the game's exe directly unlike Bash Launcher. You didn't enable Proton Compatibility in Steam for the add scripts right?

carn1x commented 2 years ago

You didn't enable Proton Compatibility in Steam for the add scripts right?

I did not make any changes at all to the steam game configs added by HBL.

redromnon commented 2 years ago

Hey, are you still facing issues?

carn1x commented 2 years ago

Hey, are you still facing issues?

I haven't had a chance to retry and won't for a while, I'll re-raise if it happens in newer versions if that allows you to close this?

redromnon commented 2 years ago

Ok, I'll close this as not planned for now. You can reopen it later.