mrvladus / Errands

Todo application for those who prefer simplicity.
MIT License
288 stars 66 forks source link

Cannot configure sync, gi.repository.GLib.GError: g-io-error-quark: user interaction failed (0) #330

Open v6ak opened 1 month ago

v6ak commented 1 month ago

Environment

Reproduction

  1. Freshly install Errands
  2. Configure sync – use CalDAV
  3. Test Connection
  4. Exit settings

Expected results

  1. Errands contacts the server to test the connection
  2. Connection details are stored

Actual results

  1. No connection attempt is made. (Verified with Wireshark.)
  2. I can no longer open settings
  3. Errands shows the following error in console:
Traceback (most recent call last):
  File "/app/share/errands/errands/widgets/preferences.py", line 130, in <lambda>
    self.sync_providers.connect("notify::selected", lambda *_: self._setup_sync())
                                                               ^^^^^^^^^^^^^^^^^^
  File "/app/share/errands/errands/widgets/preferences.py", line 195, in _setup_sync
    password: str = GSettings.get_secret(account)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/share/errands/errands/lib/gsettings.py", line 47, in get_secret
    return Secret.password_lookup_sync(SECRETS_SCHEMA, {"account": account}, None)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gi.repository.GLib.GError: g-io-error-quark: user interaction failed (0)
Traceback (most recent call last):
  File "/app/share/errands/errands/widgets/preferences.py", line 130, in <lambda>
    self.sync_providers.connect("notify::selected", lambda *_: self._setup_sync())
                                                               ^^^^^^^^^^^^^^^^^^
  File "/app/share/errands/errands/widgets/preferences.py", line 195, in _setup_sync
    password: str = GSettings.get_secret(account)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/share/errands/errands/lib/gsettings.py", line 47, in get_secret
    return Secret.password_lookup_sync(SECRETS_SCHEMA, {"account": account}, None)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gi.repository.GLib.GError: g-io-error-quark: user interaction failed (0)
mrvladus commented 1 month ago

Do you have libsecret installed? Seems like it errors when trying to call libsecret function. Another cause can be that you don't have keyring setup. Like gnome-keyring.

v6ak commented 1 month ago

Fedora

I've restarted the VM, which has affected list of installed packages. After the restart, it works well. I can't tell what packages have changed.

Debian

I have libsecret installed, but the issue persists:

~% apt search libsecret
Sorting... Done
Full Text Search... Done
gir1.2-secret-1/stable,now 0.20.5-3 amd64 [installed,automatic]
  Secret store (GObject-Introspection)

libsecret-1-0/stable,now 0.20.5-3 amd64 [installed,automatic]
  Secret store

libsecret-1-dev/stable 0.20.5-3 amd64
  Secret store (development files)

libsecret-common/stable,now 0.20.5-3 all [installed,automatic]
  Secret store (common files)

libsecret-tools/stable 0.20.5-3 amd64
  tool for storing and retrieving GObject passwords

I test it in a fresh VM:

flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak install --user flathub io.github.mrvladus.List
flatpak run io.github.mrvladus.List