Mpris interface - snap unable to receive PropertiesChanged events


I’m working on an snap that registers to receive and handle PropertiesChanged events from Spotify over the mpris DBus interface. The app inspects and processes track metadata as tracks are played and skipped by the user in Spotify. I believe this is the last hurdle to overcome before my snap can finally work in strict confinement. I am hoping someone can help me out.

The mpris plug is in place and connected. And the snap is able to access Spotify’s mpris interface without any problems:

$ snap connections testapp

Interface       Plug                      Slot                   Notes
audio-playback  testapp:audio-playback  :audio-playback        -
desktop         testapp:desktop         :desktop               -
mpris           testapp:mpris           spotify:spotify-mpris  manual

… except receive PropertiesChanged events as reported in the logs:

dbus-daemon[2438]: apparmor="DENIED" operation="dbus_signal" bus="session" path="/org/mpris/MediaPlayer2" interface="org.freedesktop.DBus.Properties" member="PropertiesChanged" name=":1.179" mask="receive" pid=363757 label="snap.testapp.testapp" peer_pid=10453 peer_label="snap.spotify.spotify"

Looking at interfaces/builtin/mpris.go, I only see (send) policies for PropertiesChanged:

dbus (send)

Would it be possible for the mpris interface to allow snaps to receive PropertiesChanged events? My problem seems similar to the one reported in the following link, but for (receive) rather than (send): Error trying to comunicate with Spotify via DBus

Thank you.

Is there anyone that can help me with this post? Even if it’s just to let me know if I didn’t include enough info or posted in the wrong section. I am new to snapscraft, but I think this is a reasonable request (unless there is a security issue I missed). The only alternative I have at this point is to code my app to poll the properties on the mpris interface periodically and detect the changes myself. But that feels counterproductive, knowing that the PropertiesChanged signal exists for that purpose. Thank you very much.