-
-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: AppArmor denies access to org.freedesktop.DBus.Introspectable (installed via snap) #1466
Comments
Hi @ptandler and thanks for the report. I am using DBUS for checking if system is in Do not disturb mode, but not the one that your logs suggest, so not sure. ( stretchly/app/utils/dndManager.js Lines 44 to 78 in 68c9ce1
Does DND monitoring works for you? If you enable DND, Stretchly icon in tray should change and you should see some message upon clicking it that breaks are paused. |
No, this does not work. Nothing changes. Also, I'm pretty sure that the detection of idle times does also not work on my machine. I haven't had the need yet to understand how to configure Linux AppArmor. When I do Maybe I could try to install stretchly from a different source, not snap, and see what's happening then. |
Well to be honest I also have no idea what apparmor is and what it does. I am on Debian and installing via DEB package and all is fine for me. |
Seems like |
I tried adjusting ==> Is there anyone out there who successfully uses stretchly installed via snap? 👋 |
The AppArmor homepage says that also Debian ships with AppArmor. But I guess it doesn't use it for deb packages. |
Yeah I have apparmor on my Debian but it's not preventing anything. Looks like in Snap it does by default. Found some related discussions: |
I now installed from flathub and there DND detection works. At least a workaround. |
We could try building snap with |
Interesting - let me know if you have a version I could try |
Can you try this? https://conta.noho.st/nextcloud/s/NjZYqToetLWaPF3 |
Thanks for creating the snap version! I installed and got a warning:
Do you have an idea how to fix this? I found this documentation: https://snapcraft.io/docs/dbus-interface |
Well, I found people asking how to fix this but no answers: https://forum.snapcraft.io/t/snap-has-bad-plugs-or-slots-dbus-cannot-find-attribute-bus/38352, https://forum.snapcraft.io/t/guiscrcpy-install-error/15704 As for the documentation link, I am not editing any snap yml, as I don't have it in my code, I am using electron-builder: https://www.electron.build/configuration/snap |
Found some people using can you try those? |
Thanks for creating new versions 😃 Stretchly_1.15.1_amd64-desktop.snapJul 30 08:56:01 P14s dbus-daemon[2708]: apparmor="DENIED" operation="dbus_method_call" bus="session" path="/org/freedesktop/Notifications" interface="org.freedesktop.DBus.Introspectable" member="Introspect" mask="send" name="org.freedesktop.Notifications" pid=11108 label="snap.stretchly.stretchly" peer_pid=3146 peer_label="unconfined" Stretchly_1.15.1_amd64-bus.snap
And also: Jul 30 09:00:14 P14s dbus-daemon[2708]: apparmor="DENIED" operation="dbus_method_call" bus="session" path="/org/freedesktop/Notifications" interface="org.freedesktop.DBus.Introspectable" member="Introspect" mask="send" name="org.freedesktop.Notifications" pid=13437 label="snap.stretchly.stretchly" peer_pid=3146 peer_label="unconfined" So it seems, we have to keep trying ... very strange that there seems to be no documentation for a feature that should be pretty common. |
@ptandler I didn't change anything related to this in 1.16, but I wonder, is it still the same issue? |
With me stretchly 1.16 works fine, installed on ubu 2204 from snap. But every second I see |
@eduarddrenth so it also respects DND mode? What DE are you running? I am checking multiple ways of multiple DEs and this one is for KDE. So I guess if you use another DE, such a error can be shown. |
Hi, I don't know what DND mode is, I am running gnome. So what you mean is that the KDE check you perform (every second?) causes apparmor to log this message? |
I mean "Do not disturb" mode. If not changed by user in Preferences, Stretchly check for DND mode and respects it: when DND is on, breaks are paused. So, every second I check for DND, but as it is not standardized, I check for "Kde-way", "Gnome-way" and "XFCE-way" of setting DND. Not really sure what the error means in your case, but I guess it's because you don't have KDE running. https://github.com/hovancik/stretchly/blob/trunk/app/utils/dndManager.js#L44 |
ok, dnd works fine. So I guess I could as a workaround try to suppress this logging. |
I guess we could improve the code. Not sure whether the error comes right after the first line or later in the code. Where do you see the error messages? |
|
I could follow this excelent guide: https://ubuntu.com/tutorials/beginning-apparmor-profile-development#1-overview, but I am not sure if that can solve the extensive logging and I feel it shouldn't be fixed there. Perhaps you can do the dnd call after first detecting the DE? |
Yes, we should do this in Stretchly. I am using You can also check in Stretchly logs where I try to print it on app start. |
Cannot find any stretchly logs but perhaps this helps:
|
I've started checking for DE before checking for DND. It should prevent error messages, but I think we might loose some previously supported DEs. We'll see if users notice anything. |
Version
Known issues
Existing issues
Advanced Preferences
What operating system are you using?
Linux
Operating System Version
Ubuntu 22.04.4 LTS, KDE Framework 5.92.0, QT 5.15.5, Kernel 6.5.0-1025-oem
Reproduction steps
I installed strechtly via ubuntu snap and looked at syslog
Expected Behavior
Permissions are setup correctly - or I get I hint what I need to configure
Actual Behavior
Every second I see this message in the logs:
Relevant log output
Preferences
Additional information
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: