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?

13 comments
Comment actions Permalink

Do you target the exact same IDE/platform version in both cases? Exact same Java Runtime used? Any additional VM options or environment flags?

0
Comment actions Permalink

Yes, everything is the same

0
Comment actions Permalink

Do you observe this behaviour with VM-option -Dlinux.native.menu.force.disable=true ?

0
Comment actions Permalink

Yes, same problem

0
Comment actions Permalink

What platform are you targeting? Do you use bundled JBR? Are you using latest gradle-intellij-plugin?

0
Comment actions Permalink

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.

0
Comment actions Permalink

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.

0
Comment actions Permalink

Thanks, I upgraded the plugin. Unfortunately, that didn't help

0
Comment actions Permalink

Ok. Trying to investigate what could be the cause here..

0
Comment actions Permalink

I'm afraid, but we have no further ideas on this.

0
Comment actions Permalink

Ah well, that's sad to hear. Should I make a bug report then?

0
Comment actions Permalink

Ok, issue is available here

0

Please sign in to leave a comment.