-
-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DBus connection terminates inside the Flatpak runtime #220
Comments
I forgot: this is the log before the crash.
|
This issue reminds me of #177. In that bug the problem was wrong/missing whitelisting for some DBus calls the application wants to do. |
Thanks for the reply! I'll give it another shot later today, however I'm pretty sure it's not a permission issue:
|
Let me add another piece of information. When I run the app with
And after this the DBus socket closes. I can't see anything obviously wrong TBH, but maybe I'm missing something |
And just for completeness, let me send the logs from both the Flatpak runtime and your library. Before this point, the DBus was open and working. Then I performed an action in the app, and this was logged:
|
Sorry for the amount of messages, but I have another question: why here and here the signal is incremented? What happens is that a message sent to a DBus after a Edit: I was able to almost confirm this is in fact the bug!
|
This allows the app to not require full session-dbus access. Will remove the workaround when hypfvieh/dbus-java#220 is fixed
This is not really a bug, because the DBus specification does not say anything (or forces you) to use consecutive serials in messages (including signals). The only important thing is that the serial is unique and that if the serial is used for a method call, it can be mapped to the return value of that call. The reason why a serial number is omitted here is that the signals received on the bus are created using reflection. This reflection call will use the Regarding I'll have a look if I can change the handling of the global serial but I'm convinced dbus-java is not doing anything wrong. |
I might be mistaken, but I don't think this is a problem of monotonicity. The problem here is that a message sent after a DBus signal will reuse the same identifier. |
…use it will conflict with the next created message
I removed the part with the serial in |
That's amazing, thank you so much! |
QQ: I see the maven version has been bumped to 4.3.1-SNAPSHOT.
Thanks again for your work! |
Hello, I'm using this library to communicate with the DBus to implement the MPRIS protocol.
Everything works in a "normal" environment (thanks BTW for making it possible), however everything starts to break down when running the app inside the Flatpak runtime.
In particular, my issue is that the Flatpak DBus proxy (
xdg-dbus-proxy
) closes the DBus connection after a few message exchanges with the errorInvalid client serial
(which is raised here).My guess is that some message got sent (or received?) out of order, and
xdg-dbus-proxy
detects something strange with the serials and will close the connection.To test my hypothesis, I tried to reduce the thread count of your library:
Surprisingly, this helped: now the connection stays open for a bit longer, but it still gets closed after a while with the same error.
Is there a way to make this library use a single thread for all operations?
The text was updated successfully, but these errors were encountered: