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
7.95k stars 421 forks source link

When flatpak is not installed, Scummvm games from GoG cannot launch #4016

Open Kingwad opened 5 days ago

Kingwad commented 5 days ago

Describe the bug

Running heroic natively installed, not using flatpak. Flatpak is not installed on the system. Running Scummvm games from GoG attempts to load flatpak version of scummvm and fails to fallback to alternate versions.

Add logs

Launching "Space Quest 4 - Roger Wilco and the Time Rippers" (gog)
Native? No
Installed in: /home/mhf/.local/share/Heroic/Space Quest 4

System Info:
CPU: 16x AMD Ryzen 7 4800H with Radeon Graphics
Memory: 16.15 GB (used: 11 GB)
GPUs:
  GPU 0:
    Name: Advanced Micro Devices, Inc. [AMD/ATI] Renoir [Radeon Vega Series / Radeon Vega Mobile Series]
    IDs: D=1636 V=1002 SD=1100 SV=1d05
    Driver: amdgpu
  GPU 1:
    Name: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q]
    IDs: D=2520 V=10de SD=1111 SV=1d05
    Driver: nvidia
OS: Gentoo 6.6.47-gentoo-dist (linux)

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

Software Versions:
  Heroic: 2.15.1 Emeth
  Legendary: 0.20.35 Lowlife (Heroic)
  gogdl: 1.1.1
  comet: comet 0.1.2

  Nile: 1.1.1 Will A. Zeppeli

Game Settings: {
    "autoInstallDxvk": true,
    "autoInstallDxvkNvapi": false,
    "autoInstallVkd3d": true,
    "preferSystemLibs": false,
    "enableEsync": true,
    "enableMsync": false,
    "enableFsync": true,
    "nvidiaPrime": false,
    "enviromentOptions": [],
    "wrapperOptions": [],
    "showFps": false,
    "useGameMode": false,
    "battlEyeRuntime": false,
    "eacRuntime": false,
    "language": "",
    "beforeLaunchScriptPath": "",
    "afterLaunchScriptPath": "",
    "wineVersion": {
        "bin": "/etc/eselect/wine/bin/wine",
        "name": "Wine Default - wine-9.0",
        "type": "wine",
        "wineserver": "/etc/eselect/wine/bin/wineserver"
    },
    "winePrefix": "/home/mhf/.local/share/Heroic/Prefixes/default/Space Quest 4 - Roger Wilco and the Time Rippers",
    "wineCrossoverBottle": ""
}

Game launched at: Sun Sep 15 2024 11:20:49 GMT-0400 (Eastern Daylight Saving Time)

Winetricks packages: 

Launch Command: HEROIC_APP_NAME=1207661443 HEROIC_APP_RUNNER=gog GAMEID=umu-0 HEROIC_APP_SOURCE=gog STORE=gog STEAM_COMPAT_INSTALL_PATH="/home/mhf/.local/share/Heroic/Space Quest 4" LD_PRELOAD= WINEPREFIX="/home/mhf/.local/share/Heroic/Prefixes/default/Space Quest 4 - Roger Wilco and the Time Rippers" WINEDLLOVERRIDES=winemenubuilder.exe=d WINE_FULLSCREEN_FSR=0 WINEESYNC=1 WINEFSYNC=1 ORIG_LD_LIBRARY_PATH= /opt/heroic-2.15.1/resources/app.asar.unpacked/build/bin/x64/linux/gogdl launch "/home/mhf/.local/share/Heroic/Space Quest 4" 1207661443 --wine /etc/eselect/wine/bin/wine --platform windows

Game Log:
Traceback (most recent call last):
  File "gogdl/cli.py", line 67, in <module>
  File "gogdl/cli.py", line 62, in main
  File "gogdl/launch.py", line 82, in launch
  File "gogdl/launch.py", line 27, in get_flatpak_command
  File "subprocess.py", line 505, in run
  File "subprocess.py", line 951, in __init__
  File "subprocess.py", line 1837, in _execute_child
FileNotFoundError: [Errno 2] No such file or directory: 'flatpak'
[30886] Failed to execute script 'cli' due to unhandled exception!
============= End of log =============

Steps to reproduce

Expected behavior

Heroic should not abort the search for an appropriate scummvm if flatpak is not installed. It should fail to launch the flatpak version, then attempt the other options in the expected order "flatpak scummvm, in path scummvm, wine scummvm"

Screenshots

No response

Heroic Version

Latest Stable

System Information

Additional information

No response

Kingwad commented 5 days ago

A temporary workaround is to put a symbolic link to false called flatpak in the path. Then it will find the fake flatpak, which will error out, and successfully fallback to the scummvm in path or the wine version as expected.

Kingwad commented 5 days ago

On inspecting the code, this issue should probably be moved to https://github.com/Heroic-Games-Launcher/heroic-gogdl, as the error is there.

https://github.com/Heroic-Games-Launcher/heroic-gogdl/blob/1ff09820915f855ea764c6e49ea2def63e86b3bb/gogdl/launch.py#L96

https://github.com/Heroic-Games-Launcher/heroic-gogdl/blob/1ff09820915f855ea764c6e49ea2def63e86b3bb/gogdl/launch.py#L106

Either catch the FileNotFoundError exception thrown by get_flatpak_command in both of these locations or don't throw the exception at all.

arielj commented 5 days ago

this was solved in gogdl 1.1.2 https://github.com/Heroic-Games-Launcher/heroic-gogdl/releases/tag/v1.1.2

you can use that binary as an alternative binary in heroic temporarily until the next release (in settings > advanced)

Kingwad commented 5 days ago

Thank you, I can confirm that heroic-gogdl 1.1.2 indeed works as expected