Failed to register: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied

Hello everybody,

I’m trying to have my app made with flutter available on snapstore (test app for now).
The app works good when launched directly by flutter, and I can compile and push the snap to the store.
But after installing it, I got this error when I want to launch it “Failed to register: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Connection “:1.177” is not allowed to own the service “com.shanuy.sasomtam” due to AppArmor policy”

Here is my yaml file :

name: sasomtam
version: 0.1.2
summary: Card rewards system
description: Card rewards system

confinement: strict
base: core18
grade: stable

command: sasomtam
extensions: [flutter-master]
- network

source: .
plugin: flutter
flutter-target: lib/main.dart # The main entry-point file of the application

thank you by advance!

You need to add and configure a slot for your dbus service:

    interface: dbus
    bus: session
    name: com.shanuy.sasomtam

    ... # the rest of your app definition
      - dbus-sasomtam
1 Like

Thank you very much Daniel, will try as soon as I can ^^

Hi Daniel,
I faced the same issue with one of my builds today.
The link to my snapcraft.yaml is here :

I added the slots declaration in the recipe and now my snap has to go through manual-review before getting released.

I am also getting these error when am running the app:

(process:28831): Gtk-WARNING **: 16:49:14.204: Locale not supported by C library.
	Using the fallback 'C' locale.
Gtk-Message: 16:49:14.209: Failed to load module "unity-gtk-module"

(kite:28831): GdkPixbuf-WARNING **: 16:49:14.341: Cannot open pixbuf loader module file '/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory

This likely means that your installation is broken.
Try running the command
  gdk-pixbuf-query-loaders > /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache
to make things work again for the time being.
Gtk-Message: 16:49:14.423: Failed to load module "canberra-gtk-module"
Gtk-Message: 16:49:14.442: Failed to load module "canberra-gtk-module"

(kite:28831): GLib-GIO-ERROR **: 16:49:14.465: No GSettings schemas are installed on the system
Trace/breakpoint trap (core dumped)