WebKit2Gtk error: Failed to load module "canberra-gtk-module

I’m trying to compile and package the most simple example of a gtk/webkit use (the one from the webkit page itself). But i don’t get it going. I need core20 base image so no extensions are here to help me. Additional question: Can’t we use the gtk and webkit tutorial examples as mandatory test cases for snapcraft releases?

I followed the tip on this forum to use to get rid of the link loading error.

      bind: $SNAP/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0

But i still see this

(process:306406): Gtk-WARNING **: 01:23:37.577: Locale not supported by C library.
	Using the fallback 'C' locale.
Gtk-Message: 01:23:37.798: Failed to load module "canberra-gtk-module"
Gtk-Message: 01:23:37.806: Failed to load module "canberra-gtk-module"

and then the webview widget is white and empty.

    plugin: cmake
    source: .
      - ruby
      - gcc
      - g++
      - cmake
      - sed
      - pkg-config
      - tree

      - libgtk-3-dev
      - libwebkit2gtk-4.0-dev
      - libgdk-pixbuf2.0-dev
      - -DCMAKE_BUILD_TYPE=Release
      - libgtk-3-0
      - libwebkit2gtk-4.0-37
      - libgdk-pixbuf2.0-0
      - libcanberra-gtk3-0
      - libcanberra-gtk3-module
1 Like

And after a reinstall i now suddenly get “TLS/SSL support not available; install glib-networking”
so i added the following stage packages but it does not fix the problem. Always getting the same error

  - glib-networking
  - glib-networking-common
  - glib-networking-services
  - openssl      
  - libcurl4

My plugs are as follows. But i install with --devmode so this shouldn’t matter

  - home
  - networking
  - desktop
  - desktop-legacy
  - wayland
  - gsettings
  - x11
  - dbus-daemon