Skip to content

Linux without session dbus: Application crashes on startup #1479

Closed

Description

@darnir

Description

Cryptomator crashes on startup and cannot be used

System Setup

  • Operating system and version: Linux (No DE). Using the AppImage
  • Cryptomator version: 1.5.11
  • Volume type: FUSE

Steps to Reproduce

  1. ./cryptomator

Expected Behavior

Cryptomator starts

Actual Behavior

22:55:13.080 [JavaFX Application Thread] INFO  o.c.ui.launcher.FxApplicationStarter - JavaFX Runtime started.
Exception in thread "JavaFX Application Thread" java.util.ServiceConfigurationError: org.cryptomator.integrations.keychain.KeychainAccessProvider: Provider org.cryptomator.linux.keychain.KDEWalletKeychainAccess could not be instantiated
        at java.base/java.util.ServiceLoader.fail(Unknown Source)
        at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(Unknown Source)
        at java.base/java.util.ServiceLoader$ProviderImpl.get(Unknown Source)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
        at java.base/java.util.Iterator.forEachRemaining(Unknown Source)
        at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
        at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
        at org.cryptomator.common.keychain.KeychainModule.provideSupportedKeychainAccessProviders(KeychainModule.java:30)
        at org.cryptomator.common.keychain.KeychainModule_ProvideSupportedKeychainAccessProvidersFactory.provideSupportedKeychainAccessProviders(KeychainModule_ProvideSupportedKeychainAccessProvidersFactory.java:39)
        at org.cryptomator.common.keychain.KeychainModule_ProvideSupportedKeychainAccessProvidersFactory.get(KeychainModule_ProvideSupportedKeychainAccessProvidersFactory.java:29)
        at org.cryptomator.common.keychain.KeychainModule_ProvideSupportedKeychainAccessProvidersFactory.get(KeychainModule_ProvideSupportedKeychainAccessProvidersFactory.java:11)
        at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
        at org.cryptomator.common.keychain.KeychainModule_ProvideKeychainAccessProviderFactory.get(KeychainModule_ProvideKeychainAccessProviderFactory.java:33)
        at org.cryptomator.common.keychain.KeychainModule_ProvideKeychainAccessProviderFactory.get(KeychainModule_ProvideKeychainAccessProviderFactory.java:12)
        at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
        at org.cryptomator.common.keychain.KeychainManager_Factory.get(KeychainManager_Factory.java:27)
        at org.cryptomator.common.keychain.KeychainManager_Factory.get(KeychainManager_Factory.java:9)
        at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
        at org.cryptomator.ui.mainwindow.VaultDetailLockedController_Factory.get(VaultDetailLockedController_Factory.java:45)
        at org.cryptomator.ui.mainwindow.VaultDetailLockedController_Factory.get(VaultDetailLockedController_Factory.java:13)
        at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
        at org.cryptomator.ui.common.FXMLLoaderFactory.constructController(FXMLLoaderFactory.java:75)
        at javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:940)
        at javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(FXMLLoader.java:982)
        at javafx.fxml.FXMLLoader$Element.processStartElement(FXMLLoader.java:229)
        at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:754)
        at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2808)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2634)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548)
        at javafx.fxml.FXMLLoader$IncludeElement.constructValue(FXMLLoader.java:1156)
        at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:756)
        at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2808)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2634)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548)
        at javafx.fxml.FXMLLoader$IncludeElement.constructValue(FXMLLoader.java:1156)
        at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:756)
        at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2808)
        at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2634)
        at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2532)
        at org.cryptomator.ui.common.FXMLLoaderFactory.load(FXMLLoaderFactory.java:46)
        at org.cryptomator.ui.common.FXMLLoaderFactory.createScene(FXMLLoaderFactory.java:60)
        at org.cryptomator.ui.mainwindow.MainWindowModule.provideMainScene(MainWindowModule.java:64)
        at org.cryptomator.ui.mainwindow.MainWindowModule_ProvideMainSceneFactory.provideMainScene(MainWindowModule_ProvideMainSceneFactory.java:36)
        at org.cryptomator.ui.mainwindow.MainWindowModule_ProvideMainSceneFactory.get(MainWindowModule_ProvideMainSceneFactory.java:27)
        at org.cryptomator.ui.mainwindow.MainWindowModule_ProvideMainSceneFactory.get(MainWindowModule_ProvideMainSceneFactory.java:10)
        at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
        at org.cryptomator.ui.mainwindow.MainWindowComponent.showMainWindow(MainWindowComponent.java:28)
        at org.cryptomator.ui.fxapp.FxApplication.lambda$showMainWindow$1(FxApplication.java:104)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
        at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
        at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
        at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: Cannot Resolve Session Bus Address
        at org.freedesktop.dbus.connections.impl.DBusConnection.lambda$getConnection$1(DBusConnection.java:257)
        at org.freedesktop.dbus.connections.impl.DBusConnection.getConnection(DBusConnection.java:165)
        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.linux.keychain.KDEWalletKeychainAccess.<init>(KDEWalletKeychainAccess.java:27)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
        at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
        ... 58 more

Reproducibility

Always

Additional Information

Activity

  1. overheadhunter commented on Dec 27, 2020

    @overheadhunter
    Member

    Thanks for the report! Related to #1345. The ServiceProvider should check this beforehand.

  2. Liboicl commented on Dec 29, 2020

    @Liboicl

    I was having the same issue and it was due to my system not running a session DBUS, but only a system-wide bus. Changing the integrations-linux code to DBusConnection.DBusBusType.SYSTEM and compiling it solves my issue. I would recommend a check for this situation. I'll work on a basic pull request that would fix it.

  3. overheadhunter commented on Dec 30, 2020

    @overheadhunter
    Member

    @purejava Is that hint from @Liboicl something that you think might be helping?

  4. purejava commented on Dec 30, 2020

    @purejava
    Contributor

    I reviewed and commented on the PR.

  5. Liboicl commented on Dec 30, 2020

    @Liboicl

    @darnir Please post the output of the following commands
    ls ~/.dbus/session-bus
    echo $DISPLAY
    cat /var/lib/dbus/machine-id

  6. darnir commented on Dec 30, 2020

    @darnir
    Author
    $ echo $DISPLAY
    :0
    
    $  cat /var/lib/dbus/machine-id
    82c9c3fdd98d4b73b79e0102d0bc0b0c
    

    There is no directory called .dbus in my $HOME. Nor any directory called dbus anywhere else deeper in $HOME

  7. Liboicl commented on Dec 30, 2020

    @Liboicl

    @darnir That's interesting and what I expected after looking at the dbus-java code. Try to run the AppImage like this
    DISPLAY=:0.0 ./cryptomator-1.5.11-x86_64.AppImage

  8. darnir commented on Dec 30, 2020

    @darnir
    Author

    I still see the same stacktrace:

    $  DISPLAY=:0.0 ./cryptomator-1.5.11-x86_64.AppImage
    Exception in thread "JavaFX Application Thread" java.lang.ExceptionInInitializerError
            at org.cryptomator.linux.keychain.SecretServiceKeychainAccess.isSupported(SecretServiceKeychainAccess.java:18)
            at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
            at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
            at java.base/java.util.Iterator.forEachRemaining(Unknown Source)
            at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source)
            at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
            at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
            at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
            at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
            at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
            at org.cryptomator.common.keychain.KeychainModule.provideSupportedKeychainAccessProviders(KeychainModule.java:30)
            at org.cryptomator.common.keychain.KeychainModule_ProvideSupportedKeychainAccessProvidersFactory.provideSupportedKeychainAccessProviders(KeychainModule_ProvideSupportedKeychainAccessProvidersFactory.java:39)
            at org.cryptomator.common.keychain.KeychainModule_ProvideSupportedKeychainAccessProvidersFactory.get(KeychainModule_ProvideSupportedKeychainAccessProvidersFactory.java:29)
            at org.cryptomator.common.keychain.KeychainModule_ProvideSupportedKeychainAccessProvidersFactory.get(KeychainModule_ProvideSupportedKeychainAccessProvidersFactory.java:11)
            at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
            at org.cryptomator.common.keychain.KeychainModule_ProvideKeychainAccessProviderFactory.get(KeychainModule_ProvideKeychainAccessProviderFactory.java:33)
            at org.cryptomator.common.keychain.KeychainModule_ProvideKeychainAccessProviderFactory.get(KeychainModule_ProvideKeychainAccessProviderFactory.java:12)
            at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
            at org.cryptomator.common.keychain.KeychainManager_Factory.get(KeychainManager_Factory.java:27)
            at org.cryptomator.common.keychain.KeychainManager_Factory.get(KeychainManager_Factory.java:9)
            at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
            at org.cryptomator.ui.mainwindow.VaultDetailLockedController_Factory.get(VaultDetailLockedController_Factory.java:45)
            at org.cryptomator.ui.mainwindow.VaultDetailLockedController_Factory.get(VaultDetailLockedController_Factory.java:13)
            at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
            at org.cryptomator.ui.common.FXMLLoaderFactory.constructController(FXMLLoaderFactory.java:75)
            at javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:940)
            at javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(FXMLLoader.java:982)
            at javafx.fxml.FXMLLoader$Element.processStartElement(FXMLLoader.java:229)
            at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:754)
            at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2808)
            at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2634)
            at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548)
            at javafx.fxml.FXMLLoader$IncludeElement.constructValue(FXMLLoader.java:1156)
            at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:756)
            at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2808)
            at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2634)
            at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548)
            at javafx.fxml.FXMLLoader$IncludeElement.constructValue(FXMLLoader.java:1156)
            at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:756)
            at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2808)
            at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2634)
            at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2532)
            at org.cryptomator.ui.common.FXMLLoaderFactory.load(FXMLLoaderFactory.java:46)
            at org.cryptomator.ui.common.FXMLLoaderFactory.createScene(FXMLLoaderFactory.java:60)
            at org.cryptomator.ui.mainwindow.MainWindowModule.provideMainScene(MainWindowModule.java:64)
            at org.cryptomator.ui.mainwindow.MainWindowModule_ProvideMainSceneFactory.provideMainScene(MainWindowModule_ProvideMainSceneFactory.java:36)
            at org.cryptomator.ui.mainwindow.MainWindowModule_ProvideMainSceneFactory.get(MainWindowModule_ProvideMainSceneFactory.java:27)
            at org.cryptomator.ui.mainwindow.MainWindowModule_ProvideMainSceneFactory.get(MainWindowModule_ProvideMainSceneFactory.java:10)
            at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
            at org.cryptomator.ui.mainwindow.MainWindowComponent.showMainWindow(MainWindowComponent.java:28)
            at org.cryptomator.ui.fxapp.FxApplication.lambda$showMainWindow$1(FxApplication.java:104)
            at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
            at java.base/java.security.AccessController.doPrivileged(Unknown Source)
            at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
            at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
            at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
            at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
            at java.base/java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.RuntimeException: Cannot Resolve Session Bus Address
            at org.freedesktop.dbus.connections.impl.DBusConnection.lambda$getConnection$1(DBusConnection.java:257)
            at org.freedesktop.dbus.connections.impl.DBusConnection.getConnection(DBusConnection.java:165)
            at org.freedesktop.dbus.connections.impl.DBusConnection.getConnection(DBusConnection.java:228)
            at org.freedesktop.dbus.connections.impl.DBusConnection.getConnection(DBusConnection.java:184)
            at org.freedesktop.secret.simple.SimpleCollection.<clinit>(SimpleCollection.java:39)
            ... 58 more
    
  9. darnir commented on Dec 30, 2020

    @darnir
    Author

    I will try to rebuild it locally with the new PR and try it later this evening

  10. Liboicl commented on Dec 30, 2020

    @Liboicl

    Thanks. It does seem you don't have a session DBus running, so this pull request should fix it. If that command worked, it would have just been a configuration issue. It still may be, but the missing .dbus folder is where the session information should be stored.

  11. Liboicl commented on Dec 30, 2020

    @Liboicl
  12. darnir commented on Dec 30, 2020

    @darnir
    Author

    That looks like it works. Thanks!

    Now I'll get to evaluating it for my usecase. Leaving the issue open until the PR is actually merged

  13. changed the title [-]Crash on startup[/-] [+]Linux without session dbus: Application crashes on startup[/+] on Jan 25, 2021
  14. added this to the 1.5.12 milestone on Jan 27, 2021
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

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions