HGL
following-aqua

HGL flatpak

Login into GOG not possible, returns error message ERROR: [Gog]: GOG login failed to parse std output from gogdl. stdout: where nothing comes up after stdout. Furthermore upon launching a json error is noted in the terminal output as well
(node:13) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at fe.getCredentials (/app/bin/heroic/resources/app.asar/build/main/main.js:9:1308)
at /app/bin/heroic/resources/app.asar/build/main/main.js:35:18349
(node:13) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
(node:13) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at fe.getCredentials (/app/bin/heroic/resources/app.asar/build/main/main.js:9:1308)
at /app/bin/heroic/resources/app.asar/build/main/main.js:35:18349
(node:13) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
Solution:
It has been working perfectly fine yesterday
Jump to solution
3 Replies
Solution
following-aqua
following-aqua3mo ago
It has been working perfectly fine yesterday
following-aqua
following-aquaOP3mo ago
The log portion under settings in the GOG category also reports this as well ./gogdl error while loading shared libraries: libz.so.1: failed to map segment from shared object In the store section I am still logged in, just not in the launcher to access the games -> I found out what it was, somehow something with the heroic flatpak depends on some arbitrary part of the logind part of systemd. Beforehand I was using elogind, yesterday I switched to turnstile+seatd and it broke something with the login for GOG, it could not load the game page, so I logged out, tried to log back in and it didn't work. I swapped back to elogind just now and it works. Does anybody of the devs have a clue on why this could happen in a flatpak environment?
sunny-green
sunny-green2mo ago
Thanks to your tip, IzziVP, I found that it is due to lack of exec permission in the user's runtime dir, which heroic running in flatpak needs as per this comment: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/issues/3015#issuecomment-1712266528 because flatpak's tmp directory is created in /run/user/USERID/.flatpak/FLATPAK_ID/tmp/. (e)logind creates a new tmpfs mount for the user runtime dir with exec enabled, and I believe turnstile just creates a new directory for the user in /run/user inheriting the existing filesystem permissions (which is 'noexec' for /run). I got around it by creating a turnstile user service that creates a tmpfs mount for the user directory on login. In ~/.config/service/turnstile-ready/conf: core_services="mount-rundir dbus import-env" mount-rundir is the relevant tmpfs mounting service. In ~/.config/service/mount-rundir/run:
#!/bin/sh
UID="$(id -u)"
GID="$(id -g)"
# this option set is similar to what elogind sets up for the tmpfs mount on my system
TMPFS_OPTIONS=rw,nosuid,nodev,relatime,size=3246344k,nr_inodes=811586,mode=700,inode64

mountpoint -q /run/user/"$UID" && exec pause

sudo mount -o "$TMPFS_OPTIONS",uid="$UID",gid="$GID" -t tmpfs run /run/user/"$UID"

exec pause
#!/bin/sh
UID="$(id -u)"
GID="$(id -g)"
# this option set is similar to what elogind sets up for the tmpfs mount on my system
TMPFS_OPTIONS=rw,nosuid,nodev,relatime,size=3246344k,nr_inodes=811586,mode=700,inode64

mountpoint -q /run/user/"$UID" && exec pause

sudo mount -o "$TMPFS_OPTIONS",uid="$UID",gid="$GID" -t tmpfs run /run/user/"$UID"

exec pause
In ~/.config/service/mount-rundir/finish:
#!/bin/sh
UID="$(id -u)"
GID="$(id -g)"
mountpoint -q /run/user/"$UID" && exit 0
sudo umount /run/user/"$UID"
#!/bin/sh
UID="$(id -u)"
GID="$(id -g)"
mountpoint -q /run/user/"$UID" && exit 0
sudo umount /run/user/"$UID"
And in /etc/sudoers.d/mount-rundir to permit the sudo's above:
%users ALL=(ALL) NOPASSWD: /bin/mount -o * -t tmpfs /run/user/*
%users ALL=(ALL) NOPASSWD: /bin/umount /run/user/*
%users ALL=(ALL) NOPASSWD: /bin/mount -o * -t tmpfs /run/user/*
%users ALL=(ALL) NOPASSWD: /bin/umount /run/user/*
GitHub
GOG login broken · Issue #3015 · Heroic-Games-Launcher/HeroicGam...
Describe the bug Logging in into GOG using the Heroic interface won&#39;t work. Add logs (17:12:05) INFO: [Legendary]: Running command: XDG_CONFIG_HOME=/home/chirvo/.config/heroic/legendaryConfig /...

Did you find this page helpful?