refi64/zypak

Atom fails to start on v2021.01.1

cpba opened this issue · 2 comments

cpba commented

io.atom.Atom works fine on v2020.02 but fails to start on v2021.01.1:

[carles@localhost ~]$ flatpak run io.atom.Atom 
[2 preload-host-spawn-strategy] Warning: waitpid override ignores groups
[2 preload-host-spawn-strategy] Warning: waitpid override ignores groups
[10 preload-host-spawn-strategy] Bus thread is not joinable
[10 preload-host-spawn-strategy] src/base/evloop.cc:197(Wait): Assertion failed: (zypak_assert_r = (pfds[0].fd)) >= 0: No child processes
[2 preload-host-spawn-strategy] Warning: waitpid override ignores groups
[2 preload-host-spawn-strategy] Warning: waitpid override ignores groups
[2 preload-host-spawn-strategy] Warning: waitpid override ignores groups
[2 preload-host-spawn-strategy] Warning: waitpid override ignores groups
Your platform (Linux localhost.localdomain 5.10.12-200.fc33.x86_64 #1 SMP Mon Feb 1 02:40:52 UTC 2021 x86_64 GNU/Linux) is not supported.

Related issues:

flathub/org.electronjs.Electron2.BaseApp#19
flathub/io.atom.Atom#89

zypak-wrapper needs to directly be run on the binary, not on any shell script wrappers. It's technically always been error-prone to do otherwise, but the failures weren't as obvious before. However, with the new spawn strategy, a D-Bus thread is injected into the main process, so if you wrap a shell script, it ends up injecting the D-Bus thread into the shell which...generally won't do what you want.

In Atom's case, it seems atom-real is indeed a wrapper shell script, so you'd have to patch it to run zypak-wrapper over Atom itself.

Leaving this open since I just realized I never documented this...

cpba commented

I'd never noticed atom-real was also a shell script.

Thank you, this explains everything.