pop-os / flatpak

Fork of https://salsa.debian.org/debian/flatpak
GNU Lesser General Public License v2.1
2 stars 5 forks source link

Flatpak apps stop launching if an app is using display :99 (fixed in Flatpak 1.14) #5

Open nano-o opened 1 year ago

nano-o commented 1 year ago

Distribution (run cat /etc/os-release):

NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os

Related Application and/or Package Version (run apt policy $PACKAGE NAME):

flatpak:
  Installed: 1.12.7-1
  Candidate: 1.12.7-1
  Version table:
 *** 1.12.7-1 500
        500 http://apt.pop-os.org/ubuntu jammy/universe amd64 Packages
        100 /var/lib/dpkg/status

Issue/Bug Description:

After a while, my system stops being able to launch flatpak applications. For example, running the command flatpak run com.discordapp.Discord results in:

Invalid MIT-MAGIC-COOKIE-1 key
Failed to generate minidump./app/bin/discord: line 18:     6 Segmentation fault      (core dumped) env TMPDIR=$XDG_CACHE_HOME zypak-wrapper /app/discord/Discord $FLAGS "$@"

All other GUI flatpak applications I have installed also fail, with various errors, but the Invalid MIT-MAGIC-COOKIE-1 key seems to always occur. Other, non-flatpak application run fine.

A reboot fixes the situation: initially, flatpak applications start fine; but after a while, the problem above occurs. Once it occurs, seemingly nothing but a reboot will fix things. I haven't been able to figure out what triggers this behavior.

Steps to reproduce (if you know):

Run a GUI flatpak application. Initially (after boot), flatpak applications start fine; but after a while, the problem above occurs. Once it occurs, seemingly nothing but a reboot will fix things. I haven't been able to figure out what triggers this behavior.

Expected behavior:

Able to run GUI flatpak applications

Other Notes:

This has been occurring for a while. It seems to affect only GUI application. For example, after the problem occurs, flatpak run org.gnu.emacs, which normally starts the emacs GUI, will start emacs in the console.

nano-o commented 1 year ago

It seems this related to this flatpak issue: https://github.com/flatpak/flatpak/issues/3357. I have an application that uses xvfb, which uses server number 99 by default, and this interferes with flatpak. Stopping said application solves the problem. Seems that this is fixed in flatpak 1.14

jacobgkau commented 1 year ago

Interesting. We currently inherit the Flatpak version from Ubuntu on 22.04, but we do have a Flatpak repository we've used for previous releases that we could use to push an update overriding Ubuntu's version. The alternative would be getting Ubuntu to update it in their 22.04 repository.