flatpak / xdg-dbus-proxy

GNU Lesser General Public License v2.1
53 stars 21 forks source link

Jetbrains toolbox: Invalid client serial #45

Closed mid-kid closed 2 years ago

mid-kid commented 2 years ago

When setting up xdg-dbus-proxy like this:

xdg-dbus-proxy "$DBUS_SESSION_BUS_ADDRESS" "$HOME/dbus" --filter

And running the Jetbrains Toolbox app like this:

DBUS_SESSION_BUS_ADDRESS="unix:path=$HOME/dbus" ./jetbrains-toolbox

dbus-proxy spits out the following message:

** (process:10596): WARNING **: 21:28:17.026: Invalid client serial

And the program hangs for 5-10 minutes before finally picking back up and getting the tray icon to display.

This program uses libayatana-appindicator for its tray icon, but it seems to have awkward behavior regarding this. When it's ran with an invalid DBUS_SESSION_BUS_ADDRESS, the tray icon never appears, but when it's ran against the system bus or a dbus proxy without --filter, the icon appears fine. Running it against the proxy with filtering, but waiting out the timer makes it start up properly and display the tray icon in the end, but it takes a while. All of this is probably a fallback behavior, as there's no StatusNotifier connected to my dbus.

I'm wondering if there's a way to get it to display the tray icon using its fallback GtkStatusIcon functionality, using a dummy proxy to trigger its fallback functionality.

mid-kid commented 2 years ago

Turns out the problem lies in dbus-java. Running the following makes it work properly:

./jetbrains-toolbox --appimage-extract && cd squashfs-root
rm lib/dbus-java-transport-native-unixsocket-4.0.0.jar
APPDIR="$PWD" APPIMAGE="$HOME/.local/share/JetBrains/Toolbox/bin/jetbrains-toolbox" DBUS_SESSION_BUS_ADDRESS="unix:path=$HOME/dbus" ./AppRun

I wonder if there's an easy way to shadow this jar without modifying the appimage...

mid-kid commented 2 years ago

Ended up reporting this to dbus-java's upstream as well, hopefully the final destination of this cross-project bug sleuthing: https://github.com/hypfvieh/dbus-java/issues/177

mid-kid commented 2 years ago

The particular issue I had ended up being fixed in the dbus-java issue linked in the previous message, though the "Invalid client serial" message is still curious.