Skip to content

Fails with NoSuchMethodError with DBus-Java 5.2.0 #476

@6XGate

Description

@6XGate

There was a recent breaking change in DBus-Java, with the release of 5.2.0. It now results in a NoSuchMethodError when attempting to call up a picker.

The current workaround is to just stick with 5.1.1.

Here is a stack-trace.

Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: 'java.lang.AutoCloseable org.freedesktop.dbus.connections.impl.DBusConnection.addGenericSigHandler(org.freedesktop.dbus.DBusMatchRule, org.freedesktop.dbus.interfaces.DBusSigHandler)'
	at io.github.vinceglb.filekit.dialogs.platform.xdg.XdgFilePickerPortal.registerResponseHandler(XdgFilePickerPortal.kt:165)
	at io.github.vinceglb.filekit.dialogs.platform.xdg.XdgFilePickerPortal.openFilesPicker(XdgFilePickerPortal.kt:111)
	at io.github.vinceglb.filekit.dialogs.platform.xdg.XdgFilePickerPortal.openFilePicker(XdgFilePickerPortal.kt:53)
	at io.github.vinceglb.filekit.dialogs.platform.linux.LinuxFilePicker.openFilePicker(LinuxFilePicker.kt:30)
	at io.github.vinceglb.filekit.dialogs.FileKit_jvmKt.platformOpenFilePicker(FileKit.jvm.kt:27)
	at io.github.vinceglb.filekit.dialogs.FileKitKt.openFilePicker(FileKit.kt:14)
	at io.github.vinceglb.filekit.dialogs.compose.FileKitComposeKt$rememberFilePickerLauncher$returnedLauncher$1$1$1.invokeSuspend(FileKitCompose.kt:42)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
	at androidx.compose.ui.platform.FlushCoroutineDispatcher.flush$lambda$4(FlushCoroutineDispatcher.skiko.kt:96)
	at androidx.compose.ui.platform.FlushCoroutineDispatcher.performRun(FlushCoroutineDispatcher.skiko.kt:105)
	at androidx.compose.ui.platform.FlushCoroutineDispatcher.flush(FlushCoroutineDispatcher.skiko.kt:83)
	at androidx.compose.ui.scene.ComposeSceneRecomposer.performScheduledEffects(ComposeSceneRecomposer.skiko.kt:91)
	at androidx.compose.ui.scene.BaseComposeScene.sendPointerEvent-lDgZiSw(BaseComposeScene.skiko.kt:227)
	at androidx.compose.ui.scene.ComposeScene.sendPointerEvent-lDgZiSw$default(ComposeScene.skiko.kt:202)
	at androidx.compose.ui.scene.ComposeSceneMediator_desktopKt.onMouseEvent-d-4ec7I(ComposeSceneMediator.desktop.kt:846)
	at androidx.compose.ui.scene.ComposeSceneMediator_desktopKt.access$onMouseEvent-d-4ec7I(ComposeSceneMediator.desktop.kt:1)
	at androidx.compose.ui.scene.ComposeSceneMediator.onMouseEvent(ComposeSceneMediator.desktop.kt:454)
	at androidx.compose.ui.scene.ComposeSceneMediator.access$onMouseEvent(ComposeSceneMediator.desktop.kt:110)
	at androidx.compose.ui.scene.ComposeSceneMediator$mouseListener$1.mouseReleased(ComposeSceneMediator.desktop.kt:269)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6679)
	at java.desktop/java.awt.Component.processEvent(Component.java:6444)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5049)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4877)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:783)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:755)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:753)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:752)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.ui.scene.ComposeContainer$DesktopCoroutineExceptionHandler@120e68c0, androidx.compose.runtime.BroadcastFrameClock@339e450e, StandaloneCoroutine{Cancelling}@515e9f85, FlushCoroutineDispatcher@3ea80a30]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions