calcleaner
calcleaner copied to clipboard
Everything greyed out?
Just installed the app on flatpak, and the "add account" button is greyed out. When I click the hamburger menu, clicking "add account" does nothing, and both "about" and "quit" are also greyed out. Is there some other requirement?
Output when run from the console:
Traceback (most recent call last): File "/app/lib/python3.9/site-packages/calcleaner/application.py", line 38, in do_startup self.accounts.load() File "/app/lib/python3.9/site-packages/calcleaner/accounts.py", line 25, in load secrets = Secret.password_search_sync( gi.repository.GLib.GError: g-dbus-error-quark: org.freedesktop.DBus.Error.ServiceUnknown (2)
This is on opensuse Tumbleweed KDE.
Just solved it. The flatpak does not by default have permission to dbus,
Hello,
Is it a missing permission in the CalCleaner package or is it a misconfiguration of Flatpak on your side?
Looks like it's the flatpak package itself, the permission I had to enable was "socket=session-bus" which isn't enabled in the flatpak file
Thank you I will fix that!
Hum, the doc state that this permission should be used only for dev tools:
Access to the entire bus with --socket=system-bus or --socket=session-bus should be avoided, unless the application is a development tool.
https://docs.flatpak.org/en/latest/sandbox-permissions.html#d-bus-access
I think Flatpak already give a basic access to DBus (but only to the endpoint of the app) and that additional permission is not required.
This app is trying to connect to the secret service (gnome-keyring, etc.) over dbus, with that option disabled I was unable to do so. So maybe it's using a non standard method to do it?
The strange thing is that it works out of the box on Ubuntu... :/
In the doc I found the --talk-name=org.freedesktop.secrets
permission: https://docs.flatpak.org/en/latest/sandbox-permissions-reference.html
Maybe this permission would be enough?
EDIT: I found an interesting part in the documentation:
Portals are a mechanism through which applications can interact with the host environment from within a sandbox. In this way, they give additional abilities to interact with data, files and services without the need to add sandbox permissions.
-
https://docs.flatpak.org/en/latest/desktop-integration.html#portals
-
https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Secret
This is probably why it works for me and not for you. Maybe Portal API is not configured or available or not detected by libsecret so it fallback to a direct connection to the D-Bus service?
Anyway, adding the permission above should fix the issue for this case :)
I was able to reproduce the issue in a VM. I also found other softwares that have issue in OpenSUSE, like Pika backup that is unable to access the keyring.
Now I have to understand why on some distro it works but not on some other ones... Accessing the application own namespace on D-Bus should not require additional permission. For the keyring, on Ubuntu it seems that the portal creates a specific keyring for the app that is then stored in the main one... :thinking: