Cannot start DBus service

Anyway to fix this?

(audio-recorder:11646): GLib-GIO-CRITICAL **: g_dbus_server_start: assertion 'G_IS_DBUS_SERVER (server)' failed
Error:Cannot create server address unix:abstract=audiorecorder for DBus. Error binding to address: Permission denied

Relevant source: ~audio-recorder/audio-recorder/trunk : contents of src/dbus-server.c at revision 1413

Recipe: audio-recorder-snap/snapcraft.yaml at master · Lin-Buo-Ren/audio-recorder-snap

Hello

Can you please run dmesg | grep DENIED and snap version and provide the output below?

Sure:

Jun 26 19:31:05 Lin-Buo-Ren-SSD480 kernel: [50310.746885] audit: type=1400 audit(1530012665.819:803): apparmor="DENIED" operation="bind" profile="snap.audio-recorder.audio-recorder" pid=23783 comm="audio-recorder" family="unix" sock_type="stream" protocol=0 requested_mask="bind" denied_mask="bind" addr="@audiorecorder"
Jun 26 19:31:06 Lin-Buo-Ren-SSD480 kernel: [50310.969316] audit: type=1400 audit(1530012666.041:804): apparmor="DENIED" operation="open" profile="snap.audio-recorder.audio-recorder" name="/run/udev/data/c81:0" pid=23783 comm="audio-recorder" requested_mask="r" denied_mask="r" fsuid=12345 ouid=0
Jun 26 19:31:06 Lin-Buo-Ren-SSD480 dbus[3426]: apparmor="DENIED" operation="dbus_method_call"  bus="session" path="/org/mpris/MediaPlayer2" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.76" pid=23783 label="snap.audio-recorder.audio-recorder" peer_pid=8066 peer_label="unconfined"
Jun 26 19:31:06 Lin-Buo-Ren-SSD480 dbus[3426]: apparmor="DENIED" operation="dbus_method_call"  bus="session" path="/org/mpris/MediaPlayer2" interface="org.freedesktop.DBus.Properties" member="Get" mask="send" name=":1.76" pid=23783 label="snap.audio-recorder.audio-recorder" peer_pid=8066 peer_label="unconfined"
snap    2.32.9
snapd   2.32.9
series  16
neon    16.04
kernel  4.13.0-45-generic

Edit: Ignore the below, it looks like you’re actually trying to connect, not bind.

Original Message:

You haven’t defined a “slot” for the dbus listener to bind to:

slots:
  audio-recorder-dbus:
    interface: dbus
    bus: session # session is the most likely
    name: <dbus-socket-name> # replace with the proper name.
    # e.g. for Corebird the name is 'org.baedert.corebird'.

I think this one might be solved with network-bind plug, but I am not certain because I’ve not worked with abstract sockets before…

And I think these two can be solved with mpris plug.

1 Like

This works, however I’m slightly concerned about the output of snap interfaces:

-                          audio-recorder:mpris

I tried to run snap connect audio-recorder:mpris but it returns:

error: snap "core" has no "mpris" interface slots

This doesn’t work at my end

The mpris slot is in the player, the plug is in the snap connecting to it, if any:

% snap interface mpris
name:    mpris
summary: allows operating as an MPRIS player
slots:
  - spotify:spotify-mpris
  - vlc
1 Like