gitbutler icon indicating copy to clipboard operation
gitbutler copied to clipboard

Segfault on startup of AppImage

Open VorpalBlade opened this issue 1 year ago • 16 comments

Version

0.12.25

Operating System

Linux

Distribution Method

AppImage (Linux)

Describe the issue

❯ ./git-butler_0.12.25_amd64.AppImage 
Cannot get default EGL display: EGL_SUCCESS
Cannot create EGL context: invalid display (last error: EGL_SUCCESS)
zsh: segmentation fault (core dumped)  ./git-butler_0.12.25_amd64.AppImage

It does display a completely black window for maybe half a second before crashing.

I tried to look at the coredump captured by systemd-coredump, but the backtrace is all questionmarks, not sure if that is due to the AppImage, or just due to lack of debug symbols.

Other GL/EGL programs such as glxinfo, eglinfo, glxgears, vulkaninfo etc all seem to work as expected (so I don't think my graphics are broken)

  • OS: Arch Linux (which is a rolling release distro, most recently updated yesterday evening)
  • Desktop: KDE Plasma 6.1.5 (Wayland)
  • Lenovo Thinkpad T480 with Intel + Nvidia MX150 graphics (running in pure intel mode).
  • Intel Core i7-8550U (Skylake)

How to reproduce

Just try to run the AppImage

Expected behavior

The AppImage shouldn't segfault, duh.

Relevant log output

No response

VorpalBlade avatar Sep 22 '24 19:09 VorpalBlade

Thanks a lot for reporting!

GitButler binaries are compiled with debug symbols included, but I am not sure the AppImage preparation doesn't strip them. CC @ndom91 who knows everything about it.

It's possible that #4789 (Switch to Tauri v2) fixes the issue as well.

In the meantime, can you try another distribution mechanism, like .deb?

Byron avatar Sep 23 '24 05:09 Byron

A deb doesn't really work on a distro that doesn't use apt/dpkg. Do you mean simply extracting the binaries from the deb into a local directory and trying to run them?

VorpalBlade avatar Sep 23 '24 06:09 VorpalBlade

Hmm so this looks like an issue I had with mismatched mesa versions on my Nix box.

Can you check which version of mesa you have installed? (Or if you're using the mesa-git pkg from the AUR?)

ndom91 avatar Sep 23 '24 09:09 ndom91

Sure, mesa is 1:24.2.3-1, which is the latest on Arch Linux.

VorpalBlade avatar Sep 23 '24 11:09 VorpalBlade

@Byron I extracted the binary from the deb, and that binary runs fine.

VorpalBlade avatar Sep 23 '24 11:09 VorpalBlade

@Byron I extracted the binary from the deb, and that binary runs fine.

Wow, that's something new and indeed I just wasn't aware of the fact that the distro doesn't natively support .deb. It's good that it runs though, and hopefully a more permanent solution is possible as well.

Byron avatar Sep 24 '24 06:09 Byron

Most distros do not support deb.

  • Only Debian and those based on Debian (such as Ubuntu, Mint and PopOS) use deb. That is a large chunk of the user base to be fair.
  • Anything from the Red Hat / Fedora lineage will use RPM instead (as does Suse and a few others I believe).
  • Arch (and derivatives) uses .pkg.tar.zst (very unimaginative name).
  • Alpine has it's own inspired-by-Arch-but-sufficiently-different format called .apk (I think, the package building recipe format is at least very similar).
  • Gentoo builds everything from source using .ebuild files
  • I'm not quite sure what NixOS does, except it is fancy, isolated, reproducible and quite complex.
  • And there are of course many more, less well known ones. (This family tree shows the proliferation of Linux distros.)

All formats are different enough to not be compatible of course. There was a reason I started with the AppImage (a flatpak would be another reasonable and nice option).

VorpalBlade avatar Sep 24 '24 09:09 VorpalBlade

Yeah the linux packaging landscape is a mess :sweat_smile:. We support rpm and deb as first party formats, which as you mentioned cover a lot of users/distros, but of course not all.

That's partly why stuff like appimages/flatpaks/snaps were invented, in order to have a more universal packaging format for linux desktop. And why we also support appimages.

Of course with these universal packaging formats (flatpak, appimage, etc.), they all do some non-standard stuff like package with the binary all the libraries that might be required, mount the application as a separate squashfs, and so on which make them much more likely to trigger edge-cases like the one described here or the (infamous) "can't open external links on Linux/AppImage" thing :sweat_smile:

Anyway, I'm glad you've got it working for you now, but I'd still like to figure out what was going on here.

I've got [email protected] installed on my local box and AppImage is built on an ubuntu 22 GHA runner which would have 22.0.1 as far as I can tell. So we've both got significantly newer versions than it was built with :thinking:

So maybe it's not that package.. What about libwebkit2gtk-4.0? Which version of that are you running?

ndom91 avatar Sep 24 '24 09:09 ndom91

❯ pacman -Ss libwebkit2gtk
extra/webkit2gtk 2.46.0-2 [installed]
    Web content engine for GTK
extra/webkit2gtk-4.1 2.46.0-2 [installed]
    Web content engine for GTK

Are the packages that are available and installed. The one without suffix is presumably 4.0 as it provides libjavascriptcoregtk-4.0.so=18-64 libwebkit2gtk-4.0.so=37-64. 4.1 meanwhile provides libjavascriptcoregtk-4.1.so=0-64 libwebkit2gtk-4.1.so=0-64

VorpalBlade avatar Sep 24 '24 09:09 VorpalBlade

Oh interesting. So theoretically the AppImage should use the version that comes with it, but maybe it links out to somehting on the host system and got confused. Because libwebkit2gtk-4.0 is required for Tauri v1 apps (like ours) and libwebkit2gtk-4.1 is only for Tauri v2 apps.

Would you be willing to satisfy my curiosity and see if uninstalling the libwebkit2gtk-4.1 helps? :joy:

ndom91 avatar Sep 24 '24 09:09 ndom91

I mean, both are installed, so it shouldn't pick up the one with the wrong SO version? (Also uninstalling would require uninstalling a bunch of dependants that I'd rather not).

I tried using strace -f but that fails to mount the AppImage (fuse error) for some reason. If I use --appimage-mount to mount the image and then strace -f on the ./AppRun entry point, we get this log: gitbutler-strace.log

Anyway, this shows:

❯ grep webkit ~/gitbutler-strace.log  
openat(AT_FDCWD, "/tmp/.mount_git-buMFlRtb/usr/lib/glibc-hwcaps/x86-64-v3/libwebkit2gtk-4.0.so.37", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/tmp/.mount_git-buMFlRtb/usr/lib/glibc-hwcaps/x86-64-v2/libwebkit2gtk-4.0.so.37", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/tmp/.mount_git-buMFlRtb/usr/lib/libwebkit2gtk-4.0.so.37", O_RDONLY|O_CLOEXEC) = 3
[pid 2019457] execve("././/lib/x86_64-linux-gnu/webkit2gtk-4.0/WebKitNetworkProcess", ["././/lib/x86_64-linux-gnu/webkit"..., "1", "28", "30"], 0x6344a60192c0 /* 104 vars */ <unfinished ...>
[pid 2019457] openat(AT_FDCWD, "/tmp/.mount_git-buMFlRtb/usr/lib/glibc-hwcaps/x86-64-v3/libwebkit2gtk-4.0.so.37", O_RDONLY|O_CLOEXEC <unfinished ...>
[pid 2019457] openat(AT_FDCWD, "/tmp/.mount_git-buMFlRtb/usr/lib/glibc-hwcaps/x86-64-v2/libwebkit2gtk-4.0.so.37", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 2019457] openat(AT_FDCWD, "/tmp/.mount_git-buMFlRtb/usr/lib/libwebkit2gtk-4.0.so.37", O_RDONLY|O_CLOEXEC) = 3
[pid 2019457] openat(AT_FDCWD, "/tmp/.mount_git-buMFlRtb/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/glibc-hwcaps/x86-64-v3/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 2019457] newfstatat(AT_FDCWD, "/tmp/.mount_git-buMFlRtb/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/glibc-hwcaps/x86-64-v3/", 0x7ffe24e362f0, 0) = -1 ENOENT (No such file or directory)
[pid 2019457] openat(AT_FDCWD, "/tmp/.mount_git-buMFlRtb/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/glibc-hwcaps/x86-64-v2/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 2019457] newfstatat(AT_FDCWD, "/tmp/.mount_git-buMFlRtb/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/glibc-hwcaps/x86-64-v2/", 0x7ffe24e362f0, 0) = -1 ENOENT (No such file or directory)
[pid 2019457] openat(AT_FDCWD, "/tmp/.mount_git-buMFlRtb/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 2019457] newfstatat(AT_FDCWD, "/tmp/.mount_git-buMFlRtb/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/", {st_mode=S_IFDIR|0755, st_size=0, ...}, 0) = 0

So it seems to use the right one.

I tried gdb, but since AppRun is a shell script it doesn't seem to work well. Running ./AppRun.wrapped fails in the same way (with no window even).

❯ ./usr/bin/git-butler  

** (git-butler:2022384): ERROR **: 12:13:53.406: Unable to spawn a new child process: Failed to spawn child process “././/lib/x86_64-linux-gnu/webkit2gtk-4.0/WebKitNetworkProcess” (No such file or directory)
zsh: trace trap (core dumped)  ./usr/bin/git-butler

But that is now getting pretty far off-track in how we realistically run things

VorpalBlade avatar Sep 24 '24 10:09 VorpalBlade

The binary seems to use RPATH, but it does pick up some libraries from the host:

❯ ldd usr/bin/git-butler 
	linux-vdso.so.1 (0x00007e3db0bfa000)
	libwebkit2gtk-4.0.so.37 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libwebkit2gtk-4.0.so.37 (0x00007e3d9cc00000)
	libgtk-3.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libgtk-3.so.0 (0x00007e3d9c200000)
	libgdk-3.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libgdk-3.so.0 (0x00007e3d9caef000)
	libcairo.so.2 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libcairo.so.2 (0x00007e3d9c0d3000)
	libgdk_pixbuf-2.0.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libgdk_pixbuf-2.0.so.0 (0x00007e3db0bc1000)
	libsoup-2.4.so.1 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libsoup-2.4.so.1 (0x00007e3da175a000)
	libgio-2.0.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libgio-2.0.so.0 (0x00007e3d9bee5000)
	libjavascriptcoregtk-4.0.so.18 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libjavascriptcoregtk-4.0.so.18 (0x00007e3d9a200000)
	libgobject-2.0.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libgobject-2.0.so.0 (0x00007e3d9ca8b000)
	libglib-2.0.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libglib-2.0.so.0 (0x00007e3d9a0bb000)
	libz.so.1 => /usr/lib/libz.so.1 (0x00007e3d9ca72000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007e3d9a08d000)
	libm.so.6 => /usr/lib/libm.so.6 (0x00007e3d99f9e000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007e3d99dad000)
	libepoxy.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libepoxy.so.0 (0x00007e3d99c5f000)
	libicui18n.so.70 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libicui18n.so.70 (0x00007e3d99800000)
	libsystemd.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libsystemd.so.0 (0x00007e3d99734000)
	libicuuc.so.70 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libicuuc.so.70 (0x00007e3d99400000)
	libpango-1.0.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libpango-1.0.so.0 (0x00007e3d99bf3000)
	libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007e3d992e6000)
	libatk-1.0.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libatk-1.0.so.0 (0x00007e3d99bc6000)
	libxml2.so.2 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libxml2.so.2 (0x00007e3d990fa000)
	libsqlite3.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libsqlite3.so.0 (0x00007e3d98fa5000)
	libxslt.so.1 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libxslt.so.1 (0x00007e3d996ef000)
	liblcms2.so.2 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/liblcms2.so.2 (0x00007e3d9968a000)
	libwoff2dec.so.1.0.2 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libwoff2dec.so.1.0.2 (0x00007e3db0b5f000)
	libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007e3d9963a000)
	libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007e3d98edb000)
	libharfbuzz-icu.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libharfbuzz-icu.so.0 (0x00007e3da1754000)
	libgcrypt.so.20 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libgcrypt.so.20 (0x00007e3d98d9b000)
	libgstallocators-1.0.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libgstallocators-1.0.so.0 (0x00007e3da174c000)
	libgstapp-1.0.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libgstapp-1.0.so.0 (0x00007e3d9ca5a000)
	libgstbase-1.0.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libgstbase-1.0.so.0 (0x00007e3d98d10000)
	libgstreamer-1.0.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libgstreamer-1.0.so.0 (0x00007e3d98bb0000)
	libgstpbutils-1.0.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libgstpbutils-1.0.so.0 (0x00007e3d98b67000)
	libgstaudio-1.0.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libgstaudio-1.0.so.0 (0x00007e3d98ae0000)
	libgsttag-1.0.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libgsttag-1.0.so.0 (0x00007e3d98a9b000)
	libgstvideo-1.0.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libgstvideo-1.0.so.0 (0x00007e3d989cf000)
	libgstgl-1.0.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libgstgl-1.0.so.0 (0x00007e3d98940000)
	libgstfft-1.0.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libgstfft-1.0.so.0 (0x00007e3d99bb9000)
	libjpeg.so.8 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libjpeg.so.8 (0x00007e3d988be000)
	libpng16.so.16 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libpng16.so.16 (0x00007e3d98881000)
	libwebpdemux.so.2 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libwebpdemux.so.2 (0x00007e3d9bede000)
	libwebp.so.7 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libwebp.so.7 (0x00007e3d98813000)
	libenchant-2.so.2 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libenchant-2.so.2 (0x00007e3d99baa000)
	libgmodule-2.0.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libgmodule-2.0.so.0 (0x00007e3d99632000)
	libsecret-1.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libsecret-1.so.0 (0x00007e3d987ab000)
	libtasn1.so.6 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libtasn1.so.6 (0x00007e3d98792000)
	libhyphen.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libhyphen.so.0 (0x00007e3d9962a000)
	libX11.so.6 => /usr/lib/libX11.so.6 (0x00007e3d98651000)
	libwayland-server.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libwayland-server.so.0 (0x00007e3d98639000)
	libwayland-client.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libwayland-client.so.0 (0x00007e3d98627000)
	libmanette-0.2.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libmanette-0.2.so.0 (0x00007e3d985f5000)
	libseccomp.so.2 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libseccomp.so.2 (0x00007e3d985d4000)
	libgbm.so.1 => /usr/lib/libgbm.so.1 (0x00007e3d985c4000)
	libdrm.so.2 => /usr/lib/libdrm.so.2 (0x00007e3d985ad000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007e3d98200000)
	/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007e3db0bfc000)
	libpangocairo-1.0.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libpangocairo-1.0.so.0 (0x00007e3d98599000)
	libXi.so.6 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libXi.so.6 (0x00007e3d98584000)
	libXfixes.so.3 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libXfixes.so.3 (0x00007e3d99621000)
	libcairo-gobject.so.2 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libcairo-gobject.so.2 (0x00007e3d98577000)
	libatk-bridge-2.0.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libatk-bridge-2.0.so.0 (0x00007e3d9853b000)
	libfribidi.so.0 => /usr/lib/libfribidi.so.0 (0x00007e3d9851b000)
	libpangoft2-1.0.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libpangoft2-1.0.so.0 (0x00007e3d984fd000)
	libXinerama.so.1 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libXinerama.so.1 (0x00007e3d984f7000)
	libXrandr.so.2 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libXrandr.so.2 (0x00007e3d984e9000)
	libXcursor.so.1 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libXcursor.so.1 (0x00007e3d984dc000)
	libXcomposite.so.1 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libXcomposite.so.1 (0x00007e3d984d6000)
	libXdamage.so.1 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libXdamage.so.1 (0x00007e3d984d0000)
	libxkbcommon.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libxkbcommon.so.0 (0x00007e3d98488000)
	libwayland-cursor.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libwayland-cursor.so.0 (0x00007e3d981f5000)
	libwayland-egl.so.1 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libwayland-egl.so.1 (0x00007e3d981ef000)
	libXext.so.6 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libXext.so.6 (0x00007e3d981d8000)
	libpixman-1.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libpixman-1.so.0 (0x00007e3d9812b000)
	libxcb-shm.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libxcb-shm.so.0 (0x00007e3d98125000)
	libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007e3d980fa000)
	libxcb-render.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libxcb-render.so.0 (0x00007e3d980e8000)
	libXrender.so.1 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libXrender.so.1 (0x00007e3d980da000)
	libpsl.so.5 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libpsl.so.5 (0x00007e3d980c5000)
	libbrotlidec.so.1 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libbrotlidec.so.1 (0x00007e3d980b6000)
	libgssapi_krb5.so.2 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libgssapi_krb5.so.2 (0x00007e3d9805f000)
	libmount.so.1 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libmount.so.1 (0x00007e3d98018000)
	libselinux.so.1 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libselinux.so.1 (0x00007e3d97fea000)
	libatomic.so.1 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libatomic.so.1 (0x00007e3d97fdf000)
	libffi.so.8 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libffi.so.8 (0x00007e3d97fcf000)
	libpcre.so.3 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libpcre.so.3 (0x00007e3d97f58000)
	liblzma.so.5 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/liblzma.so.5 (0x00007e3d97f2c000)
	libzstd.so.1 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libzstd.so.1 (0x00007e3d97e59000)
	liblz4.so.1 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/liblz4.so.1 (0x00007e3d97e38000)
	libcap.so.2 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libcap.so.2 (0x00007e3d97e2a000)
	libicudata.so.70 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libicudata.so.70 (0x00007e3d96200000)
	libthai.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libthai.so.0 (0x00007e3d961f4000)
	libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x00007e3d961d2000)
	libwoff2common.so.1.0.2 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libwoff2common.so.1.0.2 (0x00007e3d97e24000)
	libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007e3d961a8000)
	libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007e3d96195000)
	libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007e3d9616d000)
	libunwind.so.8 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libunwind.so.8 (0x00007e3d96151000)
	libdw.so.1 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libdw.so.1 (0x00007e3d960a3000)
	liborc-0.4.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/liborc-0.4.so.0 (0x00007e3d9601b000)
	libGL.so.1 => /usr/lib/libGL.so.1 (0x00007e3d95f95000)
	libEGL.so.1 => /usr/lib/libEGL.so.1 (0x00007e3d95f83000)
	libX11-xcb.so.1 => /usr/lib/libX11-xcb.so.1 (0x00007e3d95f7e000)
	libgudev-1.0.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libgudev-1.0.so.0 (0x00007e3d95f6e000)
	libevdev.so.2 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libevdev.so.2 (0x00007e3d95f4e000)
	libgallium-24.2.3-arch1.1.so => /usr/lib/libgallium-24.2.3-arch1.1.so (0x00007e3d93800000)
	libxcb-randr.so.0 => /usr/lib/libxcb-randr.so.0 (0x00007e3d95f3c000)
	libdbus-1.so.3 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libdbus-1.so.3 (0x00007e3d937ad000)
	libatspi.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libatspi.so.0 (0x00007e3d95efd000)
	libXau.so.6 => /usr/lib/libXau.so.6 (0x00007e3d95ef6000)
	libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007e3d95eee000)
	libunistring.so.2 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libunistring.so.2 (0x00007e3d935ff000)
	libidn2.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libidn2.so.0 (0x00007e3d935dd000)
	libbrotlicommon.so.1 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libbrotlicommon.so.1 (0x00007e3d935b9000)
	libkrb5.so.3 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libkrb5.so.3 (0x00007e3d934e7000)
	libk5crypto.so.3 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libk5crypto.so.3 (0x00007e3d934b7000)
	libcom_err.so.2 => /usr/lib/libcom_err.so.2 (0x00007e3d934b1000)
	libkrb5support.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libkrb5support.so.0 (0x00007e3d934a2000)
	libblkid.so.1 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libblkid.so.1 (0x00007e3d93469000)
	libpcre2-8.so.0 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libpcre2-8.so.0 (0x00007e3d933cf000)
	libdatrie.so.1 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libdatrie.so.1 (0x00007e3d933c5000)
	libelf.so.1 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libelf.so.1 (0x00007e3d933a6000)
	libGLdispatch.so.0 => /usr/lib/libGLdispatch.so.0 (0x00007e3d932ee000)
	libGLX.so.0 => /usr/lib/libGLX.so.0 (0x00007e3d932bc000)
	libudev.so.1 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libudev.so.1 (0x00007e3d9328e000)
	libglapi.so.0 => /usr/lib/libglapi.so.0 (0x00007e3d93266000)
	libLLVM.so.18.1 => /usr/lib/libLLVM.so.18.1 (0x00007e3d8b000000)
	libxcb-dri3.so.0 => /usr/lib/libxcb-dri3.so.0 (0x00007e3d9325f000)
	libxcb-present.so.0 => /usr/lib/libxcb-present.so.0 (0x00007e3d9325a000)
	libxcb-xfixes.so.0 => /usr/lib/libxcb-xfixes.so.0 (0x00007e3d93251000)
	libxcb-sync.so.1 => /usr/lib/libxcb-sync.so.1 (0x00007e3d93246000)
	libxshmfence.so.1 => /usr/lib/libxshmfence.so.1 (0x00007e3d93241000)
	libsensors.so.5 => /usr/lib/libsensors.so.5 (0x00007e3d93232000)
	libdrm_radeon.so.1 => /usr/lib/libdrm_radeon.so.1 (0x00007e3d93224000)
	libdrm_amdgpu.so.1 => /usr/lib/libdrm_amdgpu.so.1 (0x00007e3d93218000)
	libdrm_intel.so.1 => /usr/lib/libdrm_intel.so.1 (0x00007e3d931f4000)
	libxcb-dri2.so.0 => /usr/lib/libxcb-dri2.so.0 (0x00007e3d931eb000)
	libkeyutils.so.1 => /tmp/.mount_git-buMFlRtb/usr/bin/../lib/libkeyutils.so.1 (0x00007e3d931e3000)
	libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007e3d931d1000)
	libedit.so.0 => /usr/lib/libedit.so.0 (0x00007e3d93198000)
	libncursesw.so.6 => /usr/lib/libncursesw.so.6 (0x00007e3d93127000)
	libpciaccess.so.0 => /usr/lib/libpciaccess.so.0 (0x00007e3d9311c000)

Perhaps some of that mix-and-match causes issues. If I copy that binary out of the appimage it works. So that seems likely. Don't have time to try to bisect this right now (maybe this evening?)

VorpalBlade avatar Sep 24 '24 10:09 VorpalBlade

Okay no problem with the uninstalling, it's probably not relevant anyway.

You should be able to extract the appimage with --appimage-extract as well.

Also, I think you're on to something there, that the mix-n-match behavior of grabbing libraries from both those that are packaged with the appimage and those from the host may be giving it trouble. Btw, thanks for digging into this with us!

ndom91 avatar Sep 24 '24 11:09 ndom91

If I move the following libraries out of the lib directory it works:

❯ ls disabled/ 
libgio-2.0.so  libgio-2.0.so.0  libgio-2.0.so.0.7200.4  libglib-2.0.so.0  libjavascriptcoregtk-4.0.so.18  libwebkit2gtk-4.0.so.37

Unfortunately these seem interdependent: If I move one or more in our out of disabled I get different (missing symbol) errors. So I can't nail it down further than that. It could be GTK libs or the webkit libs. Or a combination of them. Either subset on it's own create different missing symbol errors.

However there is another approach to take, what is the minimum number of libraries to add that fails:

/tmp/t/usr/lib ❯ ls
disabled  libjavascriptcoregtk-4.0.so.18  libwebkit2gtk-4.0.so.37
/tmp/t/usr/lib ❯ ../bin/git-butler

** (git-butler:2204279): ERROR **: 17:28:08.925: Unable to spawn a new child process: Failed to spawn child process “././/lib/x86_64-linux-gnu/webkit2gtk-4.0/WebKitNetworkProcess” (No such file or directory)
zsh: trace trap (core dumped)  ../bin/git-butler

That seems to be the minimum that fails (and doesn't get missing symbol errors, again). Pointing squarely at webkit2gtk. But note that this says "trace trap" not "segmentation fault", so it might not be quite the same error?

The third question (what lib from the system shouldn't be picked up / what is missing from the AppImage) seems much harder to answer and I don't have a good suggestion for how to approach that.

A flatpak would sidestep this entirely since that doesn't mix host/container libraries at all. Plus it is sandboxed, which is nice.

VorpalBlade avatar Sep 24 '24 15:09 VorpalBlade

Thanks for the further deep dive! I'll take a look at how we can avoid these lib errors going forward.

I'm no expert, but I was under the impression that AppImage's whole sales pitch was that it packaged along all required libs in their correct versions, etc. so it surprises me that there's so much use of and interaction with system libraries :(

ndom91 avatar Sep 25 '24 10:09 ndom91

I would personally go for a flatpak instead. Would likely be more reliable. Though since that is sandboxed the right permissions need to be set and asked for I guess?

VorpalBlade avatar Sep 25 '24 17:09 VorpalBlade

We've recently upgraded to Tauri v2 which runs on libwebkit2gtk-4.1 (as opposed to -4.0). I'd love if you could try one of the latest nightlies (0.5.841+) and let us know if that works for you.

Additionally, since we've been running into so many issues and edge-cases with AppImage, now that we're on Tauri v2 and there is a flatpak builder available, we've been discussing seriously internally whether to ship a flatpak in addition as well.

ndom91 avatar Oct 31 '24 13:10 ndom91

So uh, this is "interesting" and depressing:

  • git-butler_0.13.8_amd64.AppImage starts and works.
  • GitButler\ Nightly_0.5.852_amd64.AppImage crashes during startup with:
Cannot get default EGL display: EGL_SUCCESS
Cannot create EGL context: invalid display (last error: EGL_SUCCESS)
zsh: segmentation fault (core dumped)  ./GitButler\ Nightly_0.5.852_amd64.AppImage

So you fixed it and it broke again? I seriously think that flatpak is the way to go.

VorpalBlade avatar Oct 31 '24 18:10 VorpalBlade

Interesting, I haven't run into that on any other system yet. Some context:

  • git-butler_0.13.8_amd64.AppImage is the latest stable release and is based on Tauri v1 and being built with libwebkit2gtk-4.0=2.44.3
  • GitButler\ Nightly_0.5.852_amd64.AppImage is one of the more recently nightlies and is based on Tauri v2, which is being built with libwebkit2gtk-4.1-0=2.44.0-2

I just tried GitButler\ Nightly_0.5.854_amd64.AppImage on a recent Manjaro live CD and that seemed to work without issue.

I'm curious, can you run other Tauri v2 applicatoins without issue? For example this desktop API client, Yaak: https://github.com/yaakapp/app/releases/tag/v2024.11.5

ndom91 avatar Nov 01 '24 11:11 ndom91

I've got an Arch Linux system running COSMIC desktop alpha 3, with AMD + AMD GPUs, and GitButler 0.13.13 works perfectly there

On my laptop (same software but Intel + nVidia GPUs) I do get Cannot create EGL context: invalid display (last error: EGL_SUCCESS), and that's with GitButler 0.13.13 and the nightly 0.5.877

I do get the same error with Yaak 2024.11.5 (AppImage)

jokeyrhyme avatar Nov 08 '24 23:11 jokeyrhyme

Hey folks, we finally finished the Tauri v2 update and are working on a first-party flatpak! We've love to get some initial feedback of an early build. I believe push-ing to HTTPS remotes still isn't working due to it not being able to pop-up the auth dialog.

  • Early build based off of master as of 12.11.24. It's build for Linux x86_64 only
    • https://drive.google.com/file/d/1N-ZScmvj16jgZF05dHYOJzS84gfV0w6S/view?usp=sharing
  • PR: https://github.com/gitbutlerapp/gitbutler/pull/5473

ndom91 avatar Nov 12 '24 15:11 ndom91

@ndom91 tried to install that flatpak and encounter this error, it requires org.gnome.Platform/x86_64/47 thats already installed

acid@pop-os:~/Downloads$ flatpak install GitButler_Nightly_0.5.884.flatpak
error: The application com.gitbutler.app/x86_64/master requires the runtime org.gnome.Platform/x86_64/47 which was not found
acid@pop-os:~/Downloads$ flatpak install flathub org.gnome.Platform/x86_64/47
Looking for matches…
Skipping: org.gnome.Platform/x86_64/47 is already installed
acid@pop-os:~/Downloads$

acidtib avatar Nov 15 '24 18:11 acidtib

@ndom91 tried to install that flatpak and encounter this error, it requires org.gnome.Platform/x86_64/47 thats already installed

acid@pop-os:~/Downloads$ flatpak install GitButler_Nightly_0.5.884.flatpak
error: The application com.gitbutler.app/x86_64/master requires the runtime org.gnome.Platform/x86_64/47 which was not found
acid@pop-os:~/Downloads$ flatpak install flathub org.gnome.Platform/x86_64/47
Looking for matches…
Skipping: org.gnome.Platform/x86_64/47 is already installed
acid@pop-os:~/Downloads$

Is this maybe a mix up with user/system flatpaks?

Can you try the following?

flatpak install --user GitButler... 

ndom91 avatar Nov 15 '24 18:11 ndom91

hey thanks for the quick reply, i ended up building from source and it works perfectly. Ill retry the flatpak install later and report back

acidtib avatar Nov 15 '24 19:11 acidtib

I am using version 0.15.2 and I have the same issue as the original message. I tried the deb and it works fine. I really don't like flatpak and preffer AppImage much more.

I really hope you will solve the issue with AppImage and continue using it as it is probably something small in the installation script. If I will have time next week I will take a look.

Just for your stats I am using Void Linux - glibc - x64.

RandallFlagg avatar Jul 10 '25 00:07 RandallFlagg