Help: GDBus.Error This call is not available inside the sandbox

Hi I try to make my very first snap

This is the app that I’m trying to snap OneDriver Linux. onedriver is a network filesystem that gives your computer direct access to your files on Microsoft OneDrive is not a sync client.

I think I made some progress since the app build and I’m able to install the snap in --devmode, my problem is that when I run the snap a get the fallowing error:

(process:10023): GLib-GIO-WARNING **: 17:12:40.891: GDBus.Error:org.freedesktop.portal.Error.NotAllowed: This call is not available inside the sandbox.

This is a picture of the error:

I’m really stuck in this, I try adding the dbus slot but didn’t work.

Here is the snapcraf.yaml:

name: onedriver # you probably want to 'snapcraft register <name>'
base: core20 # the base snap is the execution environment for this snap
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary:  A native Linux filesystem for Microsoft OneDrive # 79 char long summary
description: |
  onedriver is a native Linux filesystem for Microsoft OneDrive.

  onedriver is a network filesystem that gives your computer direct access to
  your files on Microsoft OneDrive. This is not a sync client. Instead of
  syncing files, onedriver performs an on-demand download of files when your
  computer attempts to use them. onedriver allows you to use files on OneDrive
  as if they were files on your local computer.

grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
compression: lzo # this line enables LZO compression for the snap

    # See 'snapcraft plugins'
    plugin: go
    source: .
      - gcc
      - git
      - pkg-config
      - libwebkit2gtk-4.0-dev
      - libjson-glib-dev
      - libatk-bridge2.0-0
      - libatk1.0-0
      - libatspi2.0-0
      - libbrotli1
      - libcairo-gobject2
      - libcairo2
      - libdatrie1
      - libdrm2
      - libegl1
      - libenchant-2-2
      - libepoxy0
      - libfontconfig1
      - libfreetype6
      - libfribidi0
      - libgbm1
      - libgdk-pixbuf2.0-0
      - libgl1
      - libglvnd0
      - libglx0
      - libgraphite2-3
      - libgstreamer-gl1.0-0
      - libgstreamer-plugins-base1.0-0
      - libgstreamer1.0-0
      - libgtk-3-0
      - libgudev-1.0-0
      - libharfbuzz-icu0
      - libharfbuzz0b
      - libhyphen0
      - libicu66
      - libjavascriptcoregtk-4.0-18
      - libjpeg-turbo8
      - liblcms2-2
      - libnotify4
      - libopengl0
      - libopenjp2-7
      - liborc-0.4-0
      - libpango-1.0-0
      - libpangocairo-1.0-0
      - libpangoft2-1.0-0
      - libpixman-1-0
      - libpng16-16
      - libpsl5
      - libsecret-1-0
      - libsoup2.4-1
      - libthai0
      - libwayland-client0
      - libwayland-cursor0
      - libwayland-egl1
      - libwayland-server0
      - libwebkit2gtk-4.0-37
      - libwebp6
      - libwebpdemux2
      - libwoff1
      - libx11-6
      - libx11-xcb1
      - libxau6
      - libxcb-render0
      - libxcb-shm0
      - libxcb1
      - libxcomposite1
      - libxcursor1
      - libxdamage1
      - libxdmcp6
      - libxext6
      - libxfixes3
      - libxi6
      - libxinerama1
      - libxkbcommon0
      - libxml2
      - libxrandr2
      - libxrender1
      - libxslt1.1

# slots:
#   dbus-daemon:
#     interface: dbus
#     bus: session
#     name: org.freedesktop.systemd1.Manager

    interface: system-files
    - /home
    - /home

    command: bin/onedriver
      - gnome-3-38
    # slots:
    #   - dbus-daemon
      - home
      - desktop
      - desktop-legacy
      - wayland
      - x11
      - process-control
      - network
      - network-bind
      - network-observe
      - system-observe
      - config-file

Thanks for the help, this is my very first attempt to make a snap.


Just for completion and for anyone facing something similar. I use the command

snap run --gdb <>

This run the GBD debugger and run the snap using root (sudo) so after using this command my snap work, apparently for this snap to work need to run with sudo.

1 Like

Worked perfectly. However on my end. I bumped into this error and I fixed it by:

Adding the name of the snap:

For my case snap run --gdb whatsapp-for-linux image

Typed “cont” and failed because of Authorization required, but no authorization protocol specified

Ran this command xhost si:localuser:root

Re the above command with sudo snap run --gdb whatsapp-for-linux

same case! but the command xhost si:localuser:root doesnt work here message dont recognize “xhost”

The app in question is using portals, and is trying to get the HTTP proxy. This requires the snap to be connected have a desktop plug (allows access to portals) and a network-status plug (if this is not connected then the proxy resolver portal doesn’t consider you to have any network access).