Can't connect to session dbus on linux
Answered
I am developing a plugin for Linux where I want to connect to the session bus via dbus-java
on app frame creation. When I run the IDE with that plugin, the task endlessly spins, and I see the following messages in the console:
2022-05-12T18:12:18.941+0200 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2022-05-12T18:12:18.942+0200 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2022-05-12T18:12:18.942+0200 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2022-05-12T18:12:18.942+0200 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2022-05-12T18:12:18.942+0200 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2022-05-12T18:12:18.942+0200 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2022-05-12T18:12:20.948+0200 [DEBUG] [sun.rmi.transport.tcp] RMI TCP Connection(70)-127.0.0.1: (port 40771) connection closed
2022-05-12T18:12:20.948+0200 [DEBUG] [sun.rmi.transport.tcp] RMI TCP Connection(70)-127.0.0.1: close connection
2022-05-12T18:12:21.047+0200 [DEBUG] [sun.rmi.transport.tcp] RMI TCP Connection(71)-127.0.0.1: (port 40771) connection closed
2022-05-12T18:12:21.048+0200 [DEBUG] [sun.rmi.transport.tcp] RMI TCP Connection(71)-127.0.0.1: close connection
2022-05-12T18:12:21.121+0200 [DEBUG] [sun.rmi.transport.tcp] RMI TCP Connection(72)-127.0.0.1: (port 40771) connection closed
2022-05-12T18:12:21.121+0200 [DEBUG] [sun.rmi.transport.tcp] RMI TCP Connection(72)-127.0.0.1: close connection
2022-05-12T18:12:24.487+0200 [DEBUG] [sun.rmi.transport.tcp] RMI TCP Connection(73)-127.0.0.1: (port 40771) connection closed
2022-05-12T18:12:24.488+0200 [DEBUG] [sun.rmi.transport.tcp] RMI TCP Connection(73)-127.0.0.1: close connection
2022-05-12T18:12:28.941+0200 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
I know it's the DBUS connection which causes this, since when I comment that line out, everything works. Also, this only happens in the runIde
task, in tests the connection works without any issue.
Has anyone an idea how to solve this or what I could try out?
Please sign in to leave a comment.
Do you target the exact same IDE/platform version in both cases? Exact same Java Runtime used? Any additional VM options or environment flags?
Yes, everything is the same
Do you observe this behaviour with VM-option -Dlinux.native.menu.force.disable=true ?
Yes, same problem
What platform are you targeting? Do you use bundled JBR? Are you using latest gradle-intellij-plugin?
We are targeting Idea 221 to 222, I use the bundled JBR and all plugins are up-to-date.
If it helps, the source code where this happens is available here.
Please try upgrading Gradle IntelliJ Plugin to 1.6.0 https://github.com/weisJ/auto-dark-mode/blob/master/gradle.properties#L19
It is crucial to use latest version, especially when targeting recent IDE releases.
Thanks, I upgraded the plugin. Unfortunately, that didn't help
Ok. Trying to investigate what could be the cause here..
I'm afraid, but we have no further ideas on this.
Ah well, that's sad to hear. Should I make a bug report then?
Yes, please do https://youtrack.jetbrains.com/issues/IDEA
Ok, issue is available here