Issues using dbus in strict
Sergey Borovkov
serge.borovkov at gmail.com
Mon Apr 3 19:57:03 UTC 2017
So once the interfaces are connected the following happens:
1. In websocket service (the one that just calls methods over dbus) I can
get system bus without any issues.
2. In the second service, the one that exposes dbus interface I get
following exception when running this code:
try:
bus = SystemBus()
bus.publish("com.screenly.playlist", playlist_service)
except:
log = logging.getLogger('screenly.PlaylistService')
log.exception("Unable to register on system bus: ")
Apr 03 19:53:49 localhost.localdomain python3[1246]: screenly.PlaylistService
Unable to register on system bus:
Traceback (most recent
call last):
File
"/snap/screenly-client/x1/lib/python3.5/site-packages/pydbus/bus.py", line
43, in dbus
return self._dbus
AttributeError: 'Bus'
object has no attribute '_dbus'
During handling of the
above exception, another exception occurred:
Traceback (most recent
call last):
File
"/snap/screenly-client/x1/lib/python3.5/site-packages/screenly/client/playlist.py",
line 605, in main
bus.publish("com.screenly.playlist",
playlist_service)
File
"/snap/screenly-client/x1/lib/python3.5/site-packages/pydbus/publication.py",
line 42, in publish
return
Publication(self, bus_name, *objects)
File
"/snap/screenly-client/x1/lib/python3.5/site-packages/pydbus/publication.py",
line 35, in __init__
self._at_exit(bus.request_name(bus_name,
allow_replacement=allow_replacement, replace=replace).__exit__)
File
"/snap/screenly-client/x1/lib/python3.5/site-packages/pydbus/request_name.py",
line 29, in request_name
return
NameOwner(self, name, allow_replacement, replace)
File
"/snap/screenly-client/x1/lib/python3.5/site-packages/pydbus/request_name.py",
line 8, in __init__
res =
bus.dbus.RequestName(name, flags)
File
"/snap/screenly-client/x1/lib/python3.5/site-packages/pydbus/bus.py", line
45, in dbus
self._dbus =
self.get(".DBus")[""]
File
"/snap/screenly-client/x1/lib/python3.5/site-packages/pydbus/proxy.py",
line 47, in get
0,
timeout_to_glib(timeout), None)
GLib.GError:
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="
More information about the Snapcraft
mailing list