You are not logged in.

#1 2021-01-23 19:45:48

mepqfilho
Member
Registered: 2017-01-02
Posts: 32

jrnl completely unable to run after conflicting with DBus and KWallet

I have installed jrnl, but there is something going on with its dependencies that makes it unable to run properly. From the errors, it seems some problem with DBus (although python-dbus, python-dbus-common and python2-dbus are installed).

After installing from the community repo, I set up an encrypted journal, but when trying to add an entry, it incurs in an error with KWallet, NOT jrnl itself (why is KWallet brought up, I have no idea):

$ jrnl
Path to your journal file (leave blank for /home/myuser/.local/share/jrnl/journal.txt): 
Do you want to encrypt your journal? You can always change this later [y/N] y
Journal will be encrypted.
Enter password for new journal: 
Enter password again: 
Do you want to store the password in your keychain? [Y/n] n
Encrypted journal 'default' created at /home/myuser/.local/share/jrnl/journal.txt
[Writing Entry; on a blank line, press Ctrl+d to finish writing]

^C[Entry NOT saved to journal]

$ jrnl today at 1pm: An entry just to test. If this works, it will be awesome.
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/keyring/backends/kwallet.py", line 99, in connected
    self.handle = self.iface.open(self.iface.networkWallet(), wId, self.appid)
  File "/usr/lib/python3.9/site-packages/dbus/proxies.py", line 72, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python3.9/site-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
  File "/usr/lib/python3.9/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.357 was not provided by any .service files

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/jrnl", line 33, in <module>
    sys.exit(load_entry_point('jrnl==2.6', 'console_scripts', 'jrnl')())
  File "/usr/lib/python3.9/site-packages/jrnl/cli.py", line 34, in cli
    return run(args)
  File "/usr/lib/python3.9/site-packages/jrnl/jrnl.py", line 53, in run
    journal = open_journal(args.journal_name, config)
  File "/usr/lib/python3.9/site-packages/jrnl/Journal.py", line 416, in open_journal
    return EncryptedJournal.EncryptedJournal(journal_name, **config).open()
  File "/usr/lib/python3.9/site-packages/jrnl/EncryptedJournal.py", line 86, in open
    text = self._load(filename)
  File "/usr/lib/python3.9/site-packages/jrnl/EncryptedJournal.py", line 113, in _load
    return decrypt_content(keychain=self.name, decrypt_func=decrypt_journal)
  File "/usr/lib/python3.9/site-packages/jrnl/EncryptedJournal.py", line 44, in decrypt_content
    pwd_from_keychain = keychain and get_keychain(keychain)
  File "/usr/lib/python3.9/site-packages/jrnl/EncryptedJournal.py", line 178, in get_keychain
    return keyring.get_password("jrnl", journal_name)
  File "/usr/lib/python3.9/site-packages/keyring/core.py", line 55, in get_password
    return get_keyring().get_password(service_name, username)
  File "/usr/lib/python3.9/site-packages/keyring/backends/chainer.py", line 51, in get_password
    password = keyring.get_password(service, username)
  File "/usr/lib/python3.9/site-packages/keyring/backends/kwallet.py", line 110, in get_password
    if not self.connected(service):
  File "/usr/lib/python3.9/site-packages/keyring/backends/kwallet.py", line 101, in connected
    raise InitError('Failed to open keyring: %s.' % e)
keyring.errors.InitError: Failed to open keyring: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.357 was not provided by any .service files.

I then uninstalled jrnl and removed the journal file, as the traceback suggested it was something related to encryption. For some reason, after installing it again and calling the program, it didn't ask me if I wanted to set encryption like the first time (it simply assumed the journal should be encrypted). At least in this case, jrnl worked on the first entry in text mode, then again displaying the DBus error when trying to add another entry or decrypt the journal. Every time, the message error was different, referencing a different "name" with DBus when dealing with /usr/lib/python3.9/site-packages/keyring/backends/kwallet.py.

Reinstalling and adding the first entry.

$ sudo pacman -Rns jrnl
$ rm -rf /home/myuser/.local/share/jrnl
$ sudo pacman -S jrnl
$ jrnl
Enter password for new journal: 
Password can't be an empty string!
Enter password for new journal:
Enter password again: 
Do you want to store the password in your keychain? [Y/n] n
Encrypted journal 'default' created at /home/myuser/.local/share/jrnl/journal.txt
[Writing Entry; on a blank line, press Ctrl+d to finish writing]

testing. trying to find out reasons for problems.[Entry added to default journal]

Adding a new entry directly brings name :1.216 on the origin of the crash:

$ jrnl --decrypt /home/myuser/.local/share/jrnl/journal.txt
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/keyring/backends/kwallet.py", line 99, in connected
    self.handle = self.iface.open(self.iface.networkWallet(), wId, self.appid)
  File "/usr/lib/python3.9/site-packages/dbus/proxies.py", line 72, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python3.9/site-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
  File "/usr/lib/python3.9/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.216 was not provided by any .service files

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/jrnl", line 33, in <module>
    sys.exit(load_entry_point('jrnl==2.6', 'console_scripts', 'jrnl')())
  File "/usr/lib/python3.9/site-packages/jrnl/cli.py", line 34, in cli
    return run(args)
  File "/usr/lib/python3.9/site-packages/jrnl/jrnl.py", line 46, in run
    return args.postconfig_cmd(
  File "/usr/lib/python3.9/site-packages/jrnl/commands.py", line 96, in postconfig_decrypt
    journal = open_journal(args.journal_name, config)
  File "/usr/lib/python3.9/site-packages/jrnl/Journal.py", line 416, in open_journal
    return EncryptedJournal.EncryptedJournal(journal_name, **config).open()
  File "/usr/lib/python3.9/site-packages/jrnl/EncryptedJournal.py", line 86, in open
    text = self._load(filename)
  File "/usr/lib/python3.9/site-packages/jrnl/EncryptedJournal.py", line 113, in _load
    return decrypt_content(keychain=self.name, decrypt_func=decrypt_journal)
  File "/usr/lib/python3.9/site-packages/jrnl/EncryptedJournal.py", line 44, in decrypt_content
    pwd_from_keychain = keychain and get_keychain(keychain)
  File "/usr/lib/python3.9/site-packages/jrnl/EncryptedJournal.py", line 178, in get_keychain
    return keyring.get_password("jrnl", journal_name)
  File "/usr/lib/python3.9/site-packages/keyring/core.py", line 55, in get_password
    return get_keyring().get_password(service_name, username)
  File "/usr/lib/python3.9/site-packages/keyring/backends/chainer.py", line 51, in get_password
    password = keyring.get_password(service, username)
  File "/usr/lib/python3.9/site-packages/keyring/backends/kwallet.py", line 110, in get_password
    if not self.connected(service):
  File "/usr/lib/python3.9/site-packages/keyring/backends/kwallet.py", line 101, in connected
    raise InitError('Failed to open keyring: %s.' % e)
keyring.errors.InitError: Failed to open keyring: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.216 was not provided by any .service files.

Decrypting the journal brings name :1.225 as the origin:

$ jrnl --decrypt /home/myuser/.local/share/jrnl/journal.txt
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/keyring/backends/kwallet.py", line 99, in connected
    self.handle = self.iface.open(self.iface.networkWallet(), wId, self.appid)
  File "/usr/lib/python3.9/site-packages/dbus/proxies.py", line 72, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python3.9/site-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
  File "/usr/lib/python3.9/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.225 was not provided by any .service files

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/jrnl", line 33, in <module>
    sys.exit(load_entry_point('jrnl==2.6', 'console_scripts', 'jrnl')())
  File "/usr/lib/python3.9/site-packages/jrnl/cli.py", line 34, in cli
    return run(args)
  File "/usr/lib/python3.9/site-packages/jrnl/jrnl.py", line 46, in run
    return args.postconfig_cmd(
  File "/usr/lib/python3.9/site-packages/jrnl/commands.py", line 96, in postconfig_decrypt
    journal = open_journal(args.journal_name, config)
  File "/usr/lib/python3.9/site-packages/jrnl/Journal.py", line 416, in open_journal
    return EncryptedJournal.EncryptedJournal(journal_name, **config).open()
  File "/usr/lib/python3.9/site-packages/jrnl/EncryptedJournal.py", line 86, in open
    text = self._load(filename)
  File "/usr/lib/python3.9/site-packages/jrnl/EncryptedJournal.py", line 113, in _load
    return decrypt_content(keychain=self.name, decrypt_func=decrypt_journal)
  File "/usr/lib/python3.9/site-packages/jrnl/EncryptedJournal.py", line 44, in decrypt_content
    pwd_from_keychain = keychain and get_keychain(keychain)
  File "/usr/lib/python3.9/site-packages/jrnl/EncryptedJournal.py", line 178, in get_keychain
    return keyring.get_password("jrnl", journal_name)
  File "/usr/lib/python3.9/site-packages/keyring/core.py", line 55, in get_password
    return get_keyring().get_password(service_name, username)
  File "/usr/lib/python3.9/site-packages/keyring/backends/chainer.py", line 51, in get_password
    password = keyring.get_password(service, username)
  File "/usr/lib/python3.9/site-packages/keyring/backends/kwallet.py", line 110, in get_password
    if not self.connected(service):
  File "/usr/lib/python3.9/site-packages/keyring/backends/kwallet.py", line 101, in connected
    raise InitError('Failed to open keyring: %s.' % e)
keyring.errors.InitError: Failed to open keyring: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.225 was not provided by any .service files.

Judging from the looks of it, it probably is a small and stupid configuration that is preventing the software to run properly, but honestly I'm not sure where to look at for clues, could anyone shed a light on it?

Last edited by mepqfilho (2021-01-23 19:47:00)

Offline

Board footer

Powered by FluxBB