I am trying to build a snap containing just a simple PureBasic app that opens a WebViewGadget(). It does nothing apart from showing a website. I added the needed libs and the command to open the app.
I can run snapcraft and the snap builds without any problems. But when i install it and try to run snap-test, it opens an emtpy window and prints following errors to the console:
Gtk-Message: 11:57:37.998: Failed to load module "canberra-gtk-module"
Gtk-Message: 11:57:38.014: Failed to load module "canberra-gtk-module"
Gtk-Message: 11:57:39.193: Failed to load module "canberra-gtk-module"
Gtk-Message: 11:57:39.194: Failed to load module "canberra-gtk-module"
Could not create default EGL display: EGL_BAD_PARAMETER. Aborting...
I first thought it was a permission Problem. I already tried adding multiple plugs but none of them solved the problem so far. I had to manually redirect a path, that is why i am using layout and bind.
The following is my snap-test.yaml .
name: snap-test # you probably want to 'snapcraft register <name>'
base: core24 # 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: Snapcraft test for example purebasic application with webview # 79 char long summary
description: |
Simple PureBasic application that uses a WebViewGadget. Test to see if
we have the sae Problems as with flatpak.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
apps:
snap-test:
command: snap-test
plugs:
- browser-support
- x11
- wayland
- alsa
- audio-playback
- audio-record
- network
- network-observe
- opengl
layout:
/usr/lib/x86_64-linux-gnu/webkit2gtk-4.1:
bind: $SNAP/usr/lib/x86_64-linux-gnu/webkit2gtk-4.1
parts:
snap-test:
source: .
plugin: dump
source-type: local
stage-packages:
- libx11-6
- libcairo2
- libgtk-3-0t64
- libcanberra-gtk3-module
- libjavascriptcoregtk-4.1-0
- libwebkit2gtk-4.1-0
- libegl1
- libegl-mesa0
Does anyone have an Idea where to go from this or what typically causes this error ?