gitbutler icon indicating copy to clipboard operation
gitbutler copied to clipboard

Could not create default EGL display: EGL_BAD_PARAMETER. Aborting...

Open esamson opened this issue 2 years ago • 51 comments

Version

0.13.6

Operating System

Linux

Distribution Method

AppImage (Linux)

Describe the issue

Upon launch, I just get an empty window.

I'm using Fedora 40 (KDE Plasma) with Wayland.

Relevant log output

** (git-butler:3207): WARNING **: 21:29:40.424: webkit_settings_set_enable_offline_web_application_cache is deprecated and does nothing.
2024-10-23T13:29:40.445664Z  INFO crates/gitbutler-tauri/src/main.rs:64: system git executable for fetch/push: "git"
2024-10-23T13:29:40.445781Z  INFO crates/gitbutler-tauri/src/main.rs:101: starting app version=0.13.6 name=GitButler
Could not create default EGL display: EGL_BAD_PARAMETER. Aborting...

** (git-butler:3207): WARNING **: 21:30:05.447: atk-bridge: get_device_events_reply: unknown signature

esamson avatar Oct 23 '24 13:10 esamson

if you need to download the old one to get your system working again

https://releases.gitbutler.com/releases/release/0.13.5-1375/linux/x86_64/git-butler_0.13.5_amd64.AppImage.tar.gz

Keloran avatar Oct 23 '24 13:10 Keloran

Thanks a lot for reporting!

The compatibility story for the Linux distribution, particularly related to AppImage, isn't great, and sometimes there is no good solution, from my experience.

But also, I am fortunately not the right one to talk to about this, but @ndom91 is and knows all about it.

Byron avatar Oct 24 '24 06:10 Byron

Hey thanks for reporting this. So EGL is referring to OpenGL. I ran into this yesterday as well and spent a bunch of time going back and forth between different opengl / mesa versions trying to pin this down, I'm on NixOS. Downgrading to the version on the 24.04 nixpkgs ([email protected]) allowed me to run these newer releases again.

What I've found so far:

  • Nightly 0.5.826 is the last working version for me (AppImage download)
  • The diff to the next version (0.5.827) seems to be very small (https://github.com/gitbutlerapp/gitbutler/compare/nightly/0.5.826...nightly/0.5.827) and has nothing to do with any updates to libwebkit2gtk or any other rendering related libraries, which is a bit confusing as to why opengl is all of a sudden complaining.
  • So first thing I wanted to do was bisect and try building a copy with/without each one of those commits/changes. Maybe having an .envrc messes with the GitHub Actions runner

I'll keep this issue updated once I find something :+1:

ndom91 avatar Oct 24 '24 08:10 ndom91

So I was able to build master locally and run the appimage without issue.

There were two commits in that diff, I tried reverting them both individually and built nightlies on GHA off of the branches:

  1. Revert .envrc
  2. Revert csp changes

Links to the resulting AppImages in comments in those closed PRs

Unfortunately, neither GHA built build worked on my machine :(

ndom91 avatar Oct 24 '24 10:10 ndom91

Okay interestingly, taking the latest AppImage and extracting it and trying to run the AppRun binary found therein did work on my system.

ndom91 avatar Oct 24 '24 12:10 ndom91

So it seems that the GHA Ubuntu 22.04 instance started installing libwebkit2gtk-4.0-dev version 2.46.1 as of ~2-3 days ago. As opposed to 2.44.1 previously.

First thing I can recommend is try to upgrade libwebkit2gtk on your systems and see if that helps :+1:

ndom91 avatar Oct 24 '24 13:10 ndom91

So I think I figured it out. Can you give the latest nightly a shot? I've pinned the libwebkit2gtk to the previous version.

  • AppImage: https://releases.gitbutler.com/releases/nightly/0.5.835-1389/linux/x86_64/git-butler-nightly_0.5.835_amd64.AppImage.tar.gz
  • Deb: https://releases.gitbutler.com/releases/nightly/0.5.835-1389/linux/x86_64/git-butler-nightly_0.5.835_amd64.deb
  • Rpm: https://releases.gitbutler.com/releases/nightly/0.5.835-1389/linux/x86_64/git-butler-nightly-0.5.835-1.x86_64.rpm

I put up a PR for this: https://github.com/gitbutlerapp/gitbutler/pull/5301

ndom91 avatar Oct 24 '24 15:10 ndom91

Had the same issue on ArchLinux yesterday and the latest nightly does work on my machine!

itszero avatar Oct 24 '24 20:10 itszero

I can confirm that nightly_0.5.835 AppImage works as expected for me. Thanks.

esamson avatar Oct 25 '24 02:10 esamson

We're in the process of upgrading to Tauri 2, which requires libwebkit2gtk-4.1 (as opposed to 4.0 for Tauri v1).

Unfortunately the latest versions of libwebkit2gtk-4.1 also exhibits the same issue again. I'm testing also pinning it to an older version, the Ubuntu 22.04 repo also have 2.36.1 available for libwebkit2gtk-4.1, but that's ~2 years old so I'd love to figure out a better fix for this. Anyone else have any more details about the issue perhaps?

| Sidenote, libwebkit2gtk 4.0 and 4.1 are API versions, not versions of the package, for anyone not familiar with them

ndom91 avatar Oct 28 '24 17:10 ndom91

Came across this issue on the webkit bug tracker: https://www2.webkit.org/show_bug.cgi?id=280239

Looks like they acknowledged that something is wrong on their side there, but then there's been no movement since end of Sept :/

ndom91 avatar Oct 29 '24 09:10 ndom91

We've just merged the update to Tauri v2, which also comes with a bump in libwebkit2gtk.

You can try it already by downloading the nightly 0.5.849 (https://app.gitbutler.com/downloads).

The AppImage is conitnuing to work well for me. Additionally two little bugs were fixed via this upgrade in the AppImage - dropzones not being rendered correctly (black hole), and contenteditable divs not being editable :partying_face:

ndom91 avatar Oct 30 '24 15:10 ndom91

I apologize for bumping this.

We are having the same issues and haven't been able to find a fix yet. We are running Tauri V2. Do you have any pointers for us? This is our release build workflow.

binarybaron avatar Nov 17 '24 11:11 binarybaron

@binarybaron no problem, basically doing what they did here at zmkfirmware should do the trick.

It seems that the latest version of libwebkit2gtk-4.1 in the Ubuntu 22 and 24 repositories doesn't play well with Tauri.

Be aware though that using the solution we did and zmk seems to have, by bumping to building with Ubuntu 24, will use Ubuntu 24s version of glibc and therefore block folks running earlier versions of Ubuntu from using your app.

Alternatively, you could build with Ubuntu 22 and use the previously available version of libwebkit2gtk-4.1 in the Ubuntu 22 repos, however that's like ~2.5 years old and lead to a few CSS bugs in GitButler.

ndom91 avatar Nov 20 '24 18:11 ndom91

@binarybaron no problem, basically doing what they did here at zmkfirmware should do the trick.

It seems that the latest version of libwebkit2gtk-4.1 in the Ubuntu 22 and 24 repositories doesn't play well with Tauri.

Be aware though that using the solution we did and zmk seems to have, by bumping to building with Ubuntu 24, will use Ubuntu 24s version of glibc and therefore block folks running earlier versions of Ubuntu from using your app.

Alternatively, you could build with Ubuntu 22 and use the previously available version of libwebkit2gtk-4.1 in the Ubuntu 22 repos, however that's like ~2.5 years old and lead to a few CSS bugs in GitButler.

Thanks! For us backwards compatability is quite important. Do you know what the most recent working webkit version on ubuntu 22.04 is that works?

binarybaron avatar Nov 21 '24 01:11 binarybaron

I wonder if maybe the Linux Tauri build ought to statically link/bundle a known-good libwebkit2gtk?

jokeyrhyme avatar Nov 21 '24 01:11 jokeyrhyme

@binarybaron looks like it's 2.36.0. (https://packages.ubuntu.com/jammy/libwebkit2gtk-4.1-0). Latest version is ~2.46.3 I think

ndom91 avatar Nov 21 '24 17:11 ndom91

We ran into this issue here: https://github.com/VHSgunzo/sharun/issues/2

Any suggestion besides downgrading? Note that the way we build appimages we bundle all the libs with the dynamic linker so to avoid glibc versioning issues.

Samueru-sama avatar Nov 23 '24 01:11 Samueru-sama

Looks like Ubuntu released libwebkit2gtk-4.1=2.46.4 recently. I tried it out (https://github.com/gitbutlerapp/gitbutler/pull/5816), but unfortunately I got the same EGL_BAD_PARAMETER issue on my nixos desktop. On my Ubuntu 24.04 VM it seemed to work however. Curious what other peoples experience with 2.46.4 is

ndom91 avatar Dec 12 '24 09:12 ndom91

@ndom91 I ran in a similar issue when bundling my Tauri 2.0 app as an AppImage on Linux Mint 22 Cinnamon with Nvidia and then trying to test it in a Fedora VM. Could not create default EGL display: EGL_BAD_PARAMETER. Aborting... It runs normally in a Linux Mint VM strangely.

SpeeQz1 avatar Dec 16 '24 18:12 SpeeQz1