Skip to content

Running the develop branch in an IDE on an OS other than Linux prints a DbusException #1345

Closed

Description

@purejava

It looks like this

19:32:40.452 [main] INFO  org.cryptomator.launcher.Cryptomator - Starting Cryptomator SNAPSHOT on Mac OS X 10.15.6 (x86_64)
19:32:40.697 [JavaFX Application Thread] INFO  o.c.ui.launcher.FxApplicationStarter - JavaFX Runtime started.
19:32:40.744 [JavaFX Application Thread] ERROR o.f.secret.simple.SimpleCollection - org.freedesktop.dbus.exceptions.DBusException: Cannot Resolve Session Bus Address: MachineId file can not be found
org.freedesktop.dbus.exceptions.DBusException: Cannot Resolve Session Bus Address: MachineId file can not be found
	at org.freedesktop.dbus.connections.impl.DBusConnection.lambda$determineMachineIdFile$5(DBusConnection.java:320)
	at java.base/java.util.Optional.orElseThrow(Optional.java:401)
	at org.freedesktop.dbus.connections.impl.DBusConnection.determineMachineIdFile(DBusConnection.java:320)
	at org.freedesktop.dbus.connections.impl.DBusConnection.getDbusMachineId(DBusConnection.java:303)
	at org.freedesktop.dbus.connections.impl.DBusConnection.getConnection(DBusConnection.java:149)
	at org.freedesktop.dbus.connections.impl.DBusConnection.getConnection(DBusConnection.java:169)
	at org.freedesktop.dbus.connections.impl.DBusConnection.getConnection(DBusConnection.java:228)
	at org.freedesktop.dbus.connections.impl.DBusConnection.getConnection(DBusConnection.java:184)
	at org.cryptomator.keychain.LinuxKDEWalletKeychainAccessImpl.<init>(LinuxKDEWalletKeychainAccessImpl.java:23)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
	at org.cryptomator.keychain.LinuxSystemKeychainAccess.constructKeychainAccess(LinuxSystemKeychainAccess.java:32)
	at org.cryptomator.keychain.LinuxSystemKeychainAccess.<init>(LinuxSystemKeychainAccess.java:22)
	at org.cryptomator.keychain.LinuxSystemKeychainAccess_Factory.get(LinuxSystemKeychainAccess_Factory.java:16)
	at org.cryptomator.keychain.LinuxSystemKeychainAccess_Factory.get(LinuxSystemKeychainAccess_Factory.java:6)
	at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
	at dagger.internal.SetFactory.get(SetFactory.java:126)
	at dagger.internal.SetFactory.get(SetFactory.java:37)
	at org.cryptomator.keychain.KeychainModule_ProvideSupportedKeychainFactory.get(KeychainModule_ProvideSupportedKeychainFactory.java:25)
	at org.cryptomator.keychain.KeychainModule_ProvideSupportedKeychainFactory.get(KeychainModule_ProvideSupportedKeychainFactory.java:10)
	at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
	at org.cryptomator.keychain.KeychainModule_ProvideKeychainManagerFactory.get(KeychainModule_ProvideKeychainManagerFactory.java:24)
	at org.cryptomator.keychain.KeychainModule_ProvideKeychainManagerFactory.get(KeychainModule_ProvideKeychainManagerFactory.java:9)
	at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
	at org.cryptomator.ui.common.VaultService_Factory.get(VaultService_Factory.java:28)
	at org.cryptomator.ui.common.VaultService_Factory.get(VaultService_Factory.java:10)
	at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
	at org.cryptomator.ui.fxapp.FxApplication_Factory.get(FxApplication_Factory.java:73)
	at org.cryptomator.ui.fxapp.FxApplication_Factory.get(FxApplication_Factory.java:20)
	at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
	at org.cryptomator.launcher.DaggerCryptomatorComponent$FxApplicationComponentImpl.application(DaggerCryptomatorComponent.java:1055)
	at org.cryptomator.ui.launcher.FxApplicationStarter.lambda$start$0(FxApplicationStarter.java:47)
	at com.sun.javafx.application.PlatformImpl.lambda$startup$5(PlatformImpl.java:271)
	at com.sun.glass.ui.Application.invokeAndWait(Application.java:464)
	at com.sun.javafx.tk.quantum.QuantumToolkit.runToolkit(QuantumToolkit.java:366)
	at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$startup$10(QuantumToolkit.java:280)
	at com.sun.glass.ui.Application.lambda$run$1(Application.java:153)
19:32:46.550 [JavaFX Application Thread] INFO  o.cryptomator.ui.fxapp.UpdateChecker - Current version: null, lastest version: 1.5.8

and is due to the fact that the decision to provide a KeychainManager is done early on startup.
and is due to the fact that a stacktrace is printed instead of a simple error message on initialization of LinuxKDEWalletKeychainAccessImpl().

LinuxKDEWalletKeychainAccessImpl() opens a Dbus-Connection, which throws the Exception above. As this does not break anything, it's quite ugly, but can be prevented with an easy fix.

Edit: corrected root cause.

Activity

  1. github-actions commented on Sep 14, 2020

    @github-actions
  2. purejava commented on Sep 14, 2020

    @purejava
    Author
  3. added this to the 1.5.9 milestone on Sep 15, 2020
  4. changed the title [-]Running the develop branch in an IDE on an OS other than Linux throws a DbusException[/-] [+]Running the develop branch in an IDE on an OS other than Linux prints a DbusException[/+] on Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions