Skip to content

Sideloaded games fail to launch: Wine can't find DLLs next to executable due to Flatpak document portal #5315

@ronki2304

Description

@ronki2304

Describe the bug

Description

When adding a sideloaded Windows game via the file picker in the Flatpak version of Heroic, the executable path is set to a Flatpak document portal path (e.g. /run/user/1000/doc/6ea4e6f7/Gobliins6.exe).

The document portal only exposes the individual file selected, not the sibling files in the same directory. When Proton/Wine launches the executable, it maps the portal path to a Wine drive (S:\6ea4e6f7\Gobliins6.exe) where it cannot find any DLLs or data files that the game requires in its own directory.

Steps to reproduce

  1. Install Heroic as a Flatpak
  2. Add a sideloaded Windows game that depends on a DLL in its own directory (in this case Gobliins 6, which requires SDL2.dll)
  3. Launch the game

Expected behavior

Wine should be able to find SDL2.dll and other data files next to the executable.

Actual behavior

Wine fails immediately with:

err:module:import_dll Library SDL2.dll (which is needed by L"S:\6ea4e6f7\Gobliins6.exe") not found
err:module:loader_init Importing dlls for L"S:\6ea4e6f7\Gobliins6.exe" failed, status c0000135

Root cause

The Flatpak document portal (/run/user/1000/doc/<id>/) exposes files individually. When the sideload file picker selects Gobliins6.exe, only that file is accessible through the portal — not the other files in the same directory (SDL2.dll, audio.vox, etc.). Proton maps this path to a Wine drive letter, but
since the sibling files are not visible through the portal, Wine cannot load them.

Workaround

Copy the game files into a directory that Heroic's Flatpak sandbox already has filesystem access to (e.g. ~/Games/Heroic/), then manually edit ~/.var/app/com.heroicgameslauncher.hgl/config/heroic/sideload_apps/library.json to update executable and folder_name to point to the real path instead of the
document portal path.

Suggested fix

When adding a sideloaded game, Heroic should either:

  • Request directory-level access via the document portal (using the folder picker instead of the file picker, then letting the user select the executable within it)
  • Or automatically call flatpak override --user --filesystem=<game-directory> to grant access to the game's directory
  • Or warn the user that sideloaded games must be placed within an already-accessible directory (e.g. ~/Games/Heroic/)

Environment

  • Heroic: 2.19.1 (Flatpak)
  • OS: Bazzite 43 (Fedora Silverblue-based)
  • Wine: GE-Proton 10-30 (wine-staging 10.0)
  • Game tested: Gobliins 6 (AGS engine, requires SDL2.dll)

Add logs

GNU nano 8.5                                                                                                                              bNVs6g8ztM4N2bJtTQRsUc_sideload/launch.log                                                                                                                                        

(17:41:00) [INFO]:    Winetricks packages:

Wine Command: /app/bin/gamemoderun /home/jeremy/.var/app/com.heroicgameslauncher.hgl/config/heroic/tools/runtimes/umu/umu_run.py /run/user/1000/doc/6ea4e6f7/Gobliins6.exe

Game Log:
gamemodeauto:
gamemodeauto:
gamemodeauto:
INFO: umu-launcher version 1.3.0 (3.13.11 (main, Nov 10 2011, 15:00:00) [GCC 15.2.0])
INFO: No GAMEID set, using umu-default
INFO: steamrt3 is up to date
gamemodeauto:
gamemodeauto:
gamemodeauto: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory
gamemodeauto: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory
gamemodeauto: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory
ProtonFixes[2319] WARN: [CONFIG]: Parent directory "/home/jeremy/.config/protonfixes" does not exist. Abort.
ProtonFixes[2319] INFO: Running protonfixes
ProtonFixes[2319] INFO: Running checks
ProtonFixes[2319] INFO: All checks successful
ProtonFixes[2319] WARN: Game title not found in CSV
ProtonFixes[2319] INFO: Non-steam game UNKNOWN (umu-default)
ProtonFixes[2319] INFO: No store specified, using UMU database
ProtonFixes[2319] INFO: Using global defaults for UNKNOWN (umu-default)
ProtonFixes[2319] INFO: Non-steam game UNKNOWN (umu-default)
ProtonFixes[2319] INFO: No store specified, using UMU database
ProtonFixes[2319] INFO: No global protonfix found for UNKNOWN (umu-default)
gamemodeauto: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory
gamemodeauto: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory
Proton: /run/flatpak/doc/6ea4e6f7/Gobliins6.exe
Proton: Executable a unix path, launching with /unix option.
gamemodeauto: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory
gamemodeauto: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory
gamemodeauto: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory
gamemodeauto: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory
fsync: up and running.
gamemodeauto: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory
002c:fixme:winediag:loader_init wine-staging 9.0 is a testing version containing experimental patches.
002c:fixme:winediag:loader_init Please mention your exact version when filing bug reports on winehq.org.
gamemodeauto: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory
gamemodeauto: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory
gamemodeauto: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory
gamemodeauto: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
00a0:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\winebth": c0000135
0034:fixme:service:scmdatabase_autostart_services Auto-start service L"winebth" failed to start: 126
00a0:fixme:xinput:pdo_pnp IRP_MN_QUERY_ID type 5, not implemented!
00a0:fixme:xinput:pdo_pnp IRP_MN_QUERY_ID type 5, not implemented!
gamemodeauto: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory
00a0:fixme:xinput:pdo_pnp IRP_MN_QUERY_ID type 5, not implemented!
00a0:fixme:xinput:pdo_pnp IRP_MN_QUERY_ID type 5, not implemented!
00c8:fixme:wineusb:query_id Unhandled ID query type 0x5.
00c8:fixme:wineusb:query_id Unhandled ID query type 0x5.
00c8:fixme:wineusb:query_id Unhandled ID query type 0x5.
gamemodeauto: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory
gamemodeauto: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory
gamemodeauto: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory
00dc:err:module:import_dll Library SDL2.dll (which is needed by L"S:\\6ea4e6f7\\Gobliins6.exe") not found
gamemodeauto: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory
00dc:err:module:loader_init Importing dlls for L"S:\\6ea4e6f7\\Gobliins6.exe" failed, status c0000135
gamemodeauto: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory
gamemodeauto: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory
gamemodeauto:
============= End of log =============

Steps to reproduce

  1. Install Bazzite 43 (Fedora Silverblue-based, Flatpak is the default package manager)
  2. Install Heroic Game Launcher from Flathub (com.heroicgameslauncher.hgl)
  3. Install GE-Proton from within Heroic (Wine Manager)
  4. Have a Windows game that depends on a DLL in its own directory (e.g. Gobliins 6 which requires SDL2.dll next to Gobliins6.exe)
  5. In Heroic, go to "Add Game" → "Sideload"
  6. Select the .exe file via the file picker (e.g. Gobliins6.exe)
  7. Note that Heroic stores the path as a Flatpak document portal path: /run/user/1000/doc/6ea4e6f7/Gobliins6.exe
  8. Launch the game
  9. Game immediately crashes

Expected behavior

Wine finds SDL2.dll and other data files next to the executable
The game launches normally

Screenshots

Heroic Version

Latest Stable (Flatpak)

System Information

  • Heroic: 2.19.1 (Flatpak)
  • OS: Bazzite 43 (Fedora Silverblue-based)
  • Wine: GE-Proton 10-30 (wine-staging 10.0)
  • Game tested: Gobliins 6 (AGS engine, requires SDL2.dll)

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug:unconfirmedSomeone works on identifying the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions