Murmele / Gittyup

Understand your Git history!
https://murmele.github.io/Gittyup
MIT License
1.37k stars 108 forks source link

Gittyup (Debian, xfce (X11, not Wayland), flatpak) now won't show GUI #783

Open johnny-mayo opened 1 week ago

johnny-mayo commented 1 week ago

After using it for a month or so, Gittyup (Debian, xfce (X11, not Wayland), flatpak) now seems to start, but does not show the graphical window.

If I start it with the command line with "flatpak run -v --branch=stable --arch=x86_64 --command=gittyup com.github.Murmele.Gittyup", the process starts, shows some messages/errors/warnings, and hangs.

One message is: 'Failed to load module "xapp-gtk3-module"', which, after a lot of googling, is something to do with flatpak, but not something that would keep a flatpak app from running. The next message (which further tells me that the last message was not a terminal error) is "Qt: Session management error", which is an ignorable message that can be eliminated by "unset SESSION_MANAGER" before starting the app. Not that it matters, but "sudo apt install xapp" and sudo apt install xapp-gtk3-module" do not find anything by those names in apt, but that was the extent to which I unnecessarily(?) tried to fix that problem.

If I follow the instructions here: https://docs.flatpak.org/en/latest/debugging.html, and run Gittyup in gdb, I get:

(gdb) run Starting program: /app/bin/gittyup [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7ffff27786c0 (LWP 24)] [New Thread 0x7ffff1f776c0 (LWP 25)] Gtk-Message: 14:49:16.097: Failed to load module "xapp-gtk3-module" Qt: Session management error: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed [New Thread 0x7fffebfff6c0 (LWP 26)] [New Thread 0x7fffeaa786c0 (LWP 27)] [New Thread 0x7fffea2776c0 (LWP 28)] [New Thread 0x7fffe9a766c0 (LWP 29)] [New Thread 0x7fffe92756c0 (LWP 30)] [Thread 0x7ffff65e3880 (LWP 21) exited]

...then, after a 10 seconds or so:

[Thread 0x7fffe92756c0 (LWP 30) exited] [Thread 0x7fffe9a766c0 (LWP 29) exited] [Thread 0x7fffea2776c0 (LWP 28) exited] [Thread 0x7fffeaa786c0 (LWP 27) exited]

...then there is nothing more in the logs, and no gui.

If I start it from xfce, I see this process tree: xfce4-panel─┬─bwrap───bwrap───gittyup───3*[{gittyup}]

When I used strace with "strace flatpak run -v --branch=stable --arch=x86_64 --command=gittyup com.github.Murmele.Gittyup |& tee gittyup.strace.log" and grepped through the output file, I saw that it was referencing many config files, so I tried uninstalling all flatpak apps, deleting ~/.var/app/com.github.Murmele.Gittyup, apt uninstalling flatpak, and reinstalling everything from scratch, and I see that it is no longer referencing the .git/gittyup files in my project directories (which, yes, I tried deleting previously), but still, no gui.

I even tried "sudo chmod u+s /usr/bin/bwrap" for giggles, but no dice.

The only file in the ~/.local/share/flatpak/ tree is config, which contains:

[core] repo_version=1 mode=bare-user-only min-free-space-size=500MB

The Appimage version of Gittyup works just fine. I wonder if it has anything to do with the environment or config file differences between the Appimage and the flatpak versions.

I have VSCodium installed in flatpak, and it works just fine. If I "strace flatpak run com.vscodium.codium |& tee vscodium" and use meld to diff the output with that of Gittyup, I see that it does the same miniconda3 bwrap stuff, but, besides the architectural differences, I don't see anything that stands out.

Everything was working fine, until I did an update on apt and flatpak (and maybe a "sudo shutdown -r now" while everything was running), so I tried installing and fully updating in a Debian VM, and it works fine. In the VM, however, I do not have miniconda installed, for one.

In the VM, where the Gittyup flatpak runs just fine (from xfce or terminal), grep returns no mention of "xapp-gtk3-module", but there is the "Qt: Session management error" line, followed by the screenshot I have included.

Regarding the apt and flatpak updates, here is what was updated in apt at that time:

Start-Date: 2024-06-17 14:55:31 Commandline: apt upgrade -y Requested-By: user (1000) Upgrade: containerd.io:amd64 (1.6.32-1, 1.6.33-1), docker-compose-plugin:amd64 (2.27.0-1debian.12bookworm, 2.27.1-1debian.12bookworm), docker-ce-cli:amd64 (5:26.1.3-1debian.12bookworm, 5:26.1.4-1debian.12bookworm), gstreamer1.0-gl:amd64 (1.22.0-3+deb12u1, 1.22.0-3+deb12u2), libarchive13:amd64 (3.6.2-1, 3.6.2-1+deb12u1), libavdevice59:amd64 (7:5.1.4-0+deb12u1, 7:5.1.5-0+deb12u1), libgstreamer-gl1.0-0:amd64 (1.22.0-3+deb12u1, 1.22.0-3+deb12u2), ffmpeg:amd64 (7:5.1.4-0+deb12u1, 7:5.1.5-0+deb12u1), libarchive-tools:amd64 (3.6.2-1, 3.6.2-1+deb12u1), gstreamer1.0-alsa:amd64 (1.22.0-3+deb12u1, 1.22.0-3+deb12u2), gir1.2-gst-plugins-base-1.0:amd64 (1.22.0-3+deb12u1, 1.22.0-3+deb12u2), libpostproc56:amd64 (7:5.1.4-0+deb12u1, 7:5.1.5-0+deb12u1), docker-buildx-plugin:amd64 (0.14.0-1debian.12bookworm, 0.14.1-1debian.12bookworm), docker-ce:amd64 (5:26.1.3-1debian.12bookworm, 5:26.1.4-1debian.12bookworm), libndp0:amd64 (1.8-1, 1.8-1+deb12u1), gstreamer1.0-x:amd64 (1.22.0-3+deb12u1, 1.22.0-3+deb12u2), libavcodec59:amd64 (7:5.1.4-0+deb12u1, 7:5.1.5-0+deb12u1), gstreamer1.0-plugins-base:amd64 (1.22.0-3+deb12u1, 1.22.0-3+deb12u2), docker-ce-rootless-extras:amd64 (5:26.1.3-1debian.12bookworm, 5:26.1.4-1debian.12bookworm), python3-pil.imagetk:amd64 (9.4.0-1.1+b1, 9.4.0-1.1+deb12u1), libavutil57:amd64 (7:5.1.4-0+deb12u1, 7:5.1.5-0+deb12u1), libswscale6:amd64 (7:5.1.4-0+deb12u1, 7:5.1.5-0+deb12u1), python3-pil:amd64 (9.4.0-1.1+b1, 9.4.0-1.1+deb12u1), libswresample4:amd64 (7:5.1.4-0+deb12u1, 7:5.1.5-0+deb12u1), libavformat59:amd64 (7:5.1.4-0+deb12u1, 7:5.1.5-0+deb12u1), libgstreamer-plugins-base1.0-0:amd64 (1.22.0-3+deb12u1, 1.22.0-3+deb12u2), firefox-esr:amd64 (115.11.0esr-1deb12u1, 115.12.0esr-1deb12u1), libavfilter8:amd64 (7:5.1.4-0+deb12u1, 7:5.1.5-0+deb12u1) End-Date: 2024-06-17 14:55:53

I'm not sure how to see what versions of Gittyup dependencies were in flatpak before I did the flatpak app update. I think the versions of the dependencies are what the Gittyup flatpak app says it needs, though, and the Gittyup flatpak version hasn't changed in some time...should not the dependency versions installed in flatpak remain the same?

I have to point out that I've installed updating apt and flatpak apps in the VM works fine, and with xfce, so I don't think it is a version problem. In my hardware box with the problem, I've unintstalled and wiped out every config file I could find and resinstalled from scratch, which did not fix the problem, so I don't think it was a config file corruption problem. I do not have a standardized Debian config, as I install tools when I find them as solutions to problems I have, so it would be near impossible to recreate the environment I have.

For me, I'm fine with running the Appimage version. Maybe this is really a flatpak issue.

For the purposes of helping the community, I'm willing to try suggestions to resolve this issue. gittyup.strace.log Screenshot_2024-06-20_18-20-35

johnny-mayo commented 1 week ago

FIXED...?

I was beat and ready to give up, then I thought I would give Gittyup one last shot.

I cloned the repository and compiled from source, AND IT WORKED.

I get a GUI, and I don't get "Indexer Crashed". Gittyup works perfectly. I can create a new repository. I can open my existing project.

I compiled from master, not from the most recent development branch. I've tweaked the build script for my purposes. WARNING - this will delete the Gittyup directory WARNING - I don't know what I'm doing NOTE - I am not using "git checkout deps", but the result works fine WARNING - did I mention that I don't know what I'm doing?

With that said, the following is a script that "works for me" on my up-to-date Debian system. I figure it should work for Ubuntu and similar, based on apt.

===============================================

sudo apt install build-essential libgl1-mesa-dev sudo apt install cmake sudo apt install libgit2-dev sudo apt install cmark sudo apt install git sudo apt install libssh2-1-dev sudo apt install openssl sudo apt install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools sudo apt install qttools5-dev sudo apt install ninja-build

rm -rf Gittyup git clone https://github.com/Murmele/Gittyup.git cd Gittyup

git checkout master git pull origin master

git submodule init git submodule update

cd dep/openssl/openssl/ ./config -fPIC make

cd ../../.. mkdir -vp build/release cd build/release cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ../.. ninja

===============================================

This was after I tried the following (which failed):

flatpak uninstall com.github.Murmele.Gittyup rm -rf ~/.var/app/com.github.Murmele.Gittyup rm -rf ~/.local/share/flatpak/Gittyup rm -rf ~/.local/share/Gittyup rm -rf ~/.config/gittyup.github.com rm -rf ~/python/step4

Then, I start the AppImage version of Gittyup and create a new project at ~/python/step4, and I get the same "Indexer Crashed" error.

Then I "flatpak install com.github.Murmele.Gittyup" and run the flatpak version, and still, no gui.

I really didn't want to reinstall my system from scratch, only for something unknown to change, and have Gittyup stop working again.

Murmele commented 5 days ago

Can you build the flatpak package using the DEBUG flag for gittyup? just pass -DCMAKE_BUILD_TYPE=Debug to the cmake command inside the manifest So the gui showed up with version Gittyup 1.3.0 but not with 1.4.0? Because recently we released 1.4.0 maybe this makes problems for you?

KDE Application Platform org.kde.Platform 5.15-23.08 flathub system you probably have the newest platform version installed?

Can you try a flatpak update?

johnny-mayo commented 12 hours ago

I've created a flatpak build on my Debian box with the -DCMAKE_BUILD_TYPE=Debug flag in the manifest.

It still does not open a GUI window. It crashes at exactly the same point in the strace logs. I'm also attaching the merged log file from strace and bpftrace that my script produced. The openat /dev/dri/renderD128 is at 22:29:56.246221 I did the "flatpak build-bundle" to send you the result in flatpak format.

Comments:I noticed that the com.github.Murmele.Gittyup.yaml in the 1.4 source tree is for version 1.3, so I fixed that. I used the install.sh, build.sh, and createBundle.sh you pointed me to. I modified install.sh a little: flatpak remote-delete --user GittyupRepo flatpak remote-add --user GittyupRepo $(pwd)/GittyupRepo --no-gpg-verify --if-not-exists flatpak install --user GittyupRepo com.github.Murmele.Gittyup If you want me to run that again differently, tell me.

I was not sure what environment I should be using to create this build, but maybe that is abstracted away by the flatpak-builder process.

I have an idea about a compiler option I want to try.

gittyup.flatpak.build.test.zip