Manjaro-provided Heroic Games Launcher can't launch Origin games

Hello!

The Manjaro-provided heroic-games-launcher package (relevant PKGBUILD) installs Heroic’s files into subfolders of /usr/, which breaks titles that rely on Origin/EA app integration. Our official heroic-games-launcher-bin package on the other hand installs into /opt/ which, while not being an ideal location, avoids the issue

The following error is printed in Heroic’s game log when launching an Origin game:

pressure-vessel-wrap[30492]: W: Unable to share "/usr/lib/heroic/app.asar.unpacked/build/bin/x64/linux" with container: Path "/usr" is reserved by the container framework
bwrap: Can't chdir to /usr/lib/heroic/app.asar.unpacked/build/bin/x64/linux: No such file or directory

I believe the root cause of the error is that due to the game technically not being installed at all, Heroic does not change the working directory to the game install path (and it thus stays in the location our helper binaries live in, mentioned in the error message). When umu then tries to create a runtime and tries exposing the CWD in the container, the error occurs

I’m not sure what you guys want to do here, this is definitely a bug we can resolve, but at the same time this bug wouldn’t happen with our official packages

Hi @CommandMC,

I can double check why it gets installed to /usr on our end. If /opt is the way to go for now, why not …


I wonder if this is now better:

heroic-games-launcher /opt/
heroic-games-launcher /opt/Heroic/
heroic-games-launcher /opt/Heroic/app.asar
heroic-games-launcher /opt/Heroic/app.asar.unpacked/
heroic-games-launcher /opt/Heroic/app.asar.unpacked/build/
heroic-games-launcher /opt/Heroic/app.asar.unpacked/build/bin/
heroic-games-launcher /opt/Heroic/app.asar.unpacked/build/bin/x64/
heroic-games-launcher /opt/Heroic/app.asar.unpacked/build/bin/x64/linux/
heroic-games-launcher /opt/Heroic/app.asar.unpacked/build/bin/x64/linux/comet
heroic-games-launcher /opt/Heroic/app.asar.unpacked/build/bin/x64/linux/gogdl
heroic-games-launcher /opt/Heroic/app.asar.unpacked/build/bin/x64/linux/legendary
heroic-games-launcher /opt/Heroic/app.asar.unpacked/build/bin/x64/linux/nile
heroic-games-launcher /opt/Heroic/app.asar.unpacked/build/bin/x64/linux/vulkan-helper
heroic-games-launcher /opt/Heroic/app.asar.unpacked/build/bin/x64/win32/
heroic-games-launcher /opt/Heroic/app.asar.unpacked/build/bin/x64/win32/EpicGamesLauncher.exe
heroic-games-launcher /opt/Heroic/app.asar.unpacked/build/bin/x64/win32/GalaxyCommunication.exe
heroic-games-launcher /opt/Heroic/app.asar.unpacked/build/icon-dark.png
heroic-games-launcher /opt/Heroic/app.asar.unpacked/build/icon-light.png
heroic-games-launcher /opt/Heroic/app.asar.unpacked/build/icon.icns
heroic-games-launcher /opt/Heroic/app.asar.unpacked/build/icon.png
heroic-games-launcher /opt/Heroic/app.asar.unpacked/build/mac-icon.icns
heroic-games-launcher /opt/Heroic/app.asar.unpacked/build/win_icon.ico
heroic-games-launcher /opt/Heroic/app.asar.unpacked/node_modules/
heroic-games-launcher /opt/Heroic/app.asar.unpacked/node_modules/register-scheme/
heroic-games-launcher /opt/Heroic/app.asar.unpacked/node_modules/register-scheme/build/
heroic-games-launcher /opt/Heroic/app.asar.unpacked/node_modules/register-scheme/build/Release/
heroic-games-launcher /opt/Heroic/app.asar.unpacked/node_modules/register-scheme/build/Release/node-addon-api/
heroic-games-launcher /opt/Heroic/app.asar.unpacked/node_modules/register-scheme/build/Release/node-addon-api/src/
heroic-games-launcher /opt/Heroic/app.asar.unpacked/node_modules/register-scheme/build/Release/node-addon-api/src/nothing.a.ar-file-list
heroic-games-launcher /opt/Heroic/app.asar.unpacked/node_modules/register-scheme/build/Release/register-protocol-handler.node
heroic-games-launcher /opt/Heroic/app.asar.unpacked/node_modules/register-scheme/index.js
heroic-games-launcher /opt/Heroic/app.asar.unpacked/node_modules/register-scheme/package.json
heroic-games-launcher /opt/Heroic/app.asar.unpacked/node_modules/register-scheme/src/
heroic-games-launcher /opt/Heroic/app.asar.unpacked/node_modules/register-scheme/src/register.h
heroic-games-launcher /opt/Heroic/app.asar.unpacked/node_modules/register-scheme/src/register_linux.cpp
heroic-games-launcher /opt/Heroic/app.asar.unpacked/node_modules/register-scheme/src/register_mac.m
heroic-games-launcher /opt/Heroic/app.asar.unpacked/node_modules/register-scheme/src/register_win.cpp
heroic-games-launcher /usr/
heroic-games-launcher /usr/bin/
heroic-games-launcher /usr/bin/heroic
heroic-games-launcher /usr/share/
heroic-games-launcher /usr/share/applications/
heroic-games-launcher /usr/share/applications/com.heroicgameslauncher.hgl.desktop
heroic-games-launcher /usr/share/icons/
heroic-games-launcher /usr/share/icons/hicolor/
heroic-games-launcher /usr/share/icons/hicolor/1024x1024/
heroic-games-launcher /usr/share/icons/hicolor/1024x1024/apps/
heroic-games-launcher /usr/share/icons/hicolor/1024x1024/apps/com.heroicgameslauncher.hgl.png
heroic-games-launcher /usr/share/icons/hicolor/128x128/
heroic-games-launcher /usr/share/icons/hicolor/128x128/apps/
heroic-games-launcher /usr/share/icons/hicolor/128x128/apps/com.heroicgameslauncher.hgl.png

Thanks for the quick fix! I’ve contacted the user who originally reported this issue so they can re-test. Testing on my own system (running regular Arch) suggests the issue is indeed resolved with that change

Yes, because it’s built using the system Electron version. So does @Lolix’s heroic-games-launcher AUR package.

…contains a bundled version of Electron.

Please See Electron package guidelines: Directory structure

How, exactly? :thinking:

Would it be as easy as looking in both /opt/Heroic/ and /usr/lib/heroic/?

@Yochanan that script cant write to /usr folder at all due to a non changing folder switch. Using /opt works around that. Until upstream cant handle a regular install we need to use it as is.

And so it shouldn’t, because containerized apps should go under /opt anyway. So the PKGBUILD should be modified.

I understand the difference between system & bundled Electron, and the changes in folder structure the packaging guidelines recommend because of that. The issue here is that changing the folder structure causes an issue in the program itself. As I mentioned in my original post, I don’t know how you want to deal with this issue, since it is resolve-able by us, but also wouldn’t happen if these changes weren’t made.

To launch games from the Epic Games platform, Heroic invokes a CLI program called Legendary. Legendary is shipped with Heroic (in the app.asar.unpacked directory). For Origin games specifically, Legendary generates a protocol URL (link2ea://launchgame/...) and executes that with Wine. When this happens, Legendary does not change the working directory of the Wine process (usually it would use the game install directory, but Origin games aren’t installed that way at all), so it stays in the directory the Legendary executable is in. That’s the first piece of the puzzle.

Heroic (and Lutris, and various other launchers) also use umu to launch Proton in the Steam runtime it’s built for. When creating this container, pressure-vessel seems to attempt to share the current working directory (I’m not an expert there, but judging by the error messages that seems to be happening)

Putting those pieces together, PV tries to share /usr/lib/heroic/app.asar.unpacked/build/bin/x64/linux/, which isn’t possible (since, as the error message mentions, Path "/usr" is reserved by the container framework). With Legendary living in /opt/Heroic/, this issue is bypassed (since /opt/ is not reserved).

We’d have to modify Legendary to change the working directory to a more neutral path before invoking Wine, which is a little harder than just “Set cwd to <wineprefix path>” (for unrelated reasons). Certainly possible however, and I’m fine with making that change. Just wanted to ask here first how you’d like the issue to be handled (I assume you’ve had a case of packaging changes causing unrelated issues before?)

Thank you for explaining. I think I understand some of that… :grimacing: :laughing:

For now, the Manjaro package has been updated to install to /opt/Heroic/ as of 2.18.1-3.