unity7 interface does not work with libnotify

Bug #1602845 reported by Pavel Rojtberg
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snappy
Fix Released
High
Jamie Strandboge

Bug Description

using libnotify through gir1.2-notify-0.7 I get the following error:

GLib.Error: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.160" (uid=1000 pid=24558 comm="python3 /snap/teatime/x2/usr/share/teatime/teatime") interface="org.freedesktop.Notifications" member="GetServerInformation" error name="(unset)" requested_reply="0" destination=":1.142" (uid=1000 pid=15532 comm="/usr/lib/x86_64-linux-gnu/notify-osd ") (9)

snap works if installed with --devmode.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Thank you for reporting a bug. Can you please provide steps to reproduce? (eg, a snapcraft.yaml file or a snap). Thanks!

tags: added: snapd-interface
Changed in snapd (Ubuntu):
status: New → Incomplete
Revision history for this message
Pavel Rojtberg (rojtberg) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

what version of snapd do you have installed?

Revision history for this message
Pavel Rojtberg (rojtberg) wrote :

2.0.10

Revision history for this message
Sebastien Bacher (seb128) wrote :

weird, it should work with that version and it works on my system...

Revision history for this message
Pavel Rojtberg (rojtberg) wrote :

did you try to build the teatime snap? if so the error only occurs once a timer finishes, since it only then tries to display a notification.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

If I do:
$ sudo snap install teatime

then launch with:
$ teatime

I see:
** (process:28769): WARNING **: Failed to load shared library 'libunity.so.9' referenced by the typelib: libunity-protocol-private.so.0: cannot open shared object file: No such file or directory
**
ERROR:../../gi/gimodule.c:426:_wrap_pyg_hook_up_vfunc_implementation: assertion failed: (G_TYPE_IS_CLASSED (implementor_gtype))
Aborted (core dumped)

and this denial:
Jul 26 08:51:09 lily kernel: [402040.074656] audit: type=1400 audit(1469541069.069:424): apparmor="DENIED" operation="open" profile="snap.teatime.teatime" name="/usr/share/glib-2.0/schemas/" pid=28805 comm="desktop-launch" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

Is this the teatime I should be testing?

Changed in snapd (Ubuntu):
assignee: nobody → Jamie Strandboge (jdstrand)
importance: Undecided → High
Revision history for this message
Jamie Strandboge (jdstrand) wrote :
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

https://launchpad.net/~rojtberg/+snap/teatime/+build/1819/+files/teatime_16.07_amd64.snap had the same problem. Can you provide a working snap or otherwise give the exact steps to reproduce?

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

I gave it one more try and did:

$ git clone git://git.launchpad.net/teatime
$ cd ./teatime
$ snapcraft
$ sudo snap install ./teatime_16.07_amd64.snap
$ teatime

This time it doesn't crash (I guess the launchpad buildd's don't have an up to date snapcraft? </guess>).

I can now confirm the apparmor denial,

Changed in snapd (Ubuntu):
status: Incomplete → Confirmed
Changed in snapd (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks Jamie, I was going to try to build the snap now but looks like you beat me to it. I had tried with a command line and gdbus send the other day which worked, I guess the code is doing something different there...

Changed in snapd (Ubuntu):
status: In Progress → Fix Committed
affects: snapd (Ubuntu) → snappy
Revision history for this message
Pavel Rojtberg (rojtberg) wrote :

mind sharing the commit? I would be intrested in the fix.

Revision history for this message
Pavel Rojtberg (rojtberg) wrote :
Revision history for this message
Pavel Rojtberg (rojtberg) wrote :

but when is this going to be deployed?

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This is fixed in 2.12 upstream and 2.12+0.16.04 in Ubuntu 16.04.

Changed in snappy:
status: Fix Committed → Fix Released
Zygmunt Krynicki (zyga)
Changed in snappy:
milestone: none → 2.12
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.