linuxdeployqt
linuxdeployqt copied to clipboard
Recent update broke connection to d-bus Secret Agent API
Not a qt developer, just a user that did some debugging after Nextcloud Client stopped working with any Secret Agent but kwallet: https://github.com/nextcloud/desktop/issues/4715
As stated in that bug it seems that some change between the release 8 and the continuous one broke the ability of qtkeychain to talk to other programs providing the Secret Agent API.
Confirmed the problem derives from linuxdeployqt. Built an appimage with build-daily.sh, changed the continuous appimage to release '8' from 13.6. 2021 (the only other option would be even older and labeled do not use). Authentication using d-bus Secret Agent works like expected (well.. at least in my envirionment).
Can you compare the contents of the AppImage made with linuxdeployqt 8 vs. continous? Do they contain different files?
@probonopd I built 2 AppImages of Nextcloud Client:
- one with linuxdeployqt continous which has the problem with libsecret,
- one with linuxdeployqt 8 which works fine
Here the difference between the two AppImage:
$ diff -r /tmp/Nextcloud-linuxdeployqt-continuous-x86_64.AppImage/ /tmp/Nextcloud-linuxdeployqt-8-x86_64.AppImage/
Binary files /tmp/Nextcloud-linuxdeployqt-continuous-x86_64.AppImage/AppRun and /tmp/Nextcloud-linuxdeployqt-8-x86_64.AppImage/AppRun differ
Binary files /tmp/Nextcloud-linuxdeployqt-continuous-x86_64.AppImage/usr/bin/nextcloud and /tmp/Nextcloud-linuxdeployqt-8-x86_64.AppImage/usr/bin/nextcloud differ
Only in /tmp/Nextcloud-linuxdeployqt-continuous-x86_64.AppImage/usr/lib: libglib-2.0.so.0
Only in /tmp/Nextcloud-linuxdeployqt-continuous-x86_64.AppImage/usr/lib: libgobject-2.0.so.0
Binary files /tmp/Nextcloud-linuxdeployqt-continuous-x86_64.AppImage/usr/lib/libnextcloudsync.so and /tmp/Nextcloud-linuxdeployqt-8-x86_64.AppImage/usr/lib/libnextcloudsync.so differ
Binary files /tmp/Nextcloud-linuxdeployqt-continuous-x86_64.AppImage/usr/lib/libnextcloudsync.so.0 and /tmp/Nextcloud-linuxdeployqt-8-x86_64.AppImage/usr/lib/libnextcloudsync.so.0 differ
Binary files /tmp/Nextcloud-linuxdeployqt-continuous-x86_64.AppImage/usr/lib/libnextcloudsync.so.3.5.50 and /tmp/Nextcloud-linuxdeployqt-8-x86_64.AppImage/usr/lib/libnextcloudsync.so.3.5.50 differ
It seems odd to me that the 'continuous Appimage' contains libglib-2.0.so.0 and libgobject-2.0.so.0.
Oh.. while I was rebuilding the deleted images someone did this allready.. anyways it is like stated above: Diff of the file listings by appimagetool: 66a67
usr/lib/libglib-2.0.so.0 68a70 usr/lib/libgobject-2.0.so.0
What happens if you delete libglib and libgobject from /tmp/Nextcloud-linuxdeployqt-continuous-x86_64.AppImage/usr/lib
and then run /tmp/Nextcloud-linuxdeployqt-continuous-x86_64.AppImage/AppRun
?
It seems like https://github.com/AppImage/pkg2appimage/commit/1e3ecde6b92ef198405463415b8090a4435d0cb0 added these files, which was done due to https://github.com/probonopd/Emacs.AppImage/issues/16.
@probonopd If I delete them, the app runs fine.
Thanks for testing and confirming @FredericLespez. This seems to bring us to an inconvenient tradeoff situation where bundling libglib-2.0.so.0 and libgobject-2.0.so.0 breaks some apps while not bundling them breaks others. Not sure how to proceed here.
@probonopd You're welcome I am not an expert, so I cannot help you :-( While a suitable solution is found, maybe a workaround can be used inside Nexcloud client build script ?
Is there a way to remove these libraries before "packing" the AppImage ?
running a test right now
running a test right now
not familiar enough with the toolchain.. did not find a way to avoid inclusion/delete them after wards with the toolchain given in the buildenv
Create an AppImage, unpack AppImage to get an AppDir, delete files from that AppDir, turn AppDir into an AppImage again.
+ rm ./squashfs-root/usr/lib/libgobject-2.0.so.0
+ rm ./squashfs-root/usr/lib/libglib-2.0.so.0
+ ./squashfs-root/AppRun /app/usr/share/applications/com.nextcloud.desktopclient.nextcloud.desktop -appimage
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb.
And here I am after I decided to use the AppImage because I wanted to avoid the headaches that come with the Qt / cmake buildchain :) Thanks for hint though
Create an AppImage, unpack AppImage to get an AppDir, delete files from that AppDir, turn AppDir into an AppImage again. Thanks to your help, I managed to modify the Nextcloud Client build script tp unpack the generated AppImage, delete the files and repack it. See https://github.com/nextcloud/client-building/pull/105