My snap works fine on the desktop, both X11 and Wayland session. It also works on UbuntuCore if I remove certain part of my program, the part that initialized a QWebEngineView.
Here is the crash log
om26er@localhost:~$ sudo xbr-dashboard
+++ cat /proc/cmdline
++ [[ BOOT_IMAGE=(loop)/kernel.img root=LABEL=writable snap_core=core_5358.snap snap_kernel=pc-kernel_144.snap ro net.ifnames=0 init=/lib/systemd/systemd console=ttyS0 console=tty1 panic=-1 = *\s\n\a\p\_\c\o\r\e\=* ]]
++ export QT_QPA_PLATFORM=wayland-egl
++ QT_QPA_PLATFORM=wayland-egl
++ python3 -u /snap/xbr-dashboard/16/main.py --no-sandbox
Using Wayland-EGL
libEGL warning: MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
WebEngine compiled with X11 support, however qpa backend is not xcb. This may fail.
Received signal 11 SEGV_MAPERR 000000000000
#0 0x7f529022095f <unknown>
#1 0x7f528ec5285d <unknown>
#2 0x7f5290220e6e <unknown>[1572:1586:0825/201740.450128:ERROR:udev_linux.cc(21)] Failed to initialize udev, possibly due to an invalid system configuration. Various device-related browser features may be broken.
#3 0x7f52a03ff390 <unknown>
#4 0x7f5286efa65d <unknown>
#5 0x7f5298b64051 <unknown>
#6 0x7f5298b67275 <unknown>
#7 0x7f5298b674ac <unknown>
#8 0x7f5298b406d6 <unknown>
#9 0x7f528ecea615 <unknown>
#10 0x7f529547924d <unknown>
#11 0x7f529547a080 <unknown>
#12 0x7f52954719f7 <unknown>
#13 0x7f52954720c4 <unknown>
#14 0x7f529547fd6b <unknown>
#15 0x7f529547fe09 <unknown>
#16 0x7f52956bc33d <unknown>
#17 0x00000053b9c6 <unknown>
#18 0x0000005416ea <unknown>
#19 0x0000004ebd23 <unknown>
#20 0x0000005c1797 <unknown>
#21 0x0000004fb9ce <unknown>
#22 0x0000005c1797 <unknown>
#23 0x000000574999 <unknown>
#24 0x00000057f03c <unknown>
#25 0x0000005c1797 <unknown>
#26 0x00000053bba6 <unknown>
#27 0x000000540199 <unknown>
#28 0x000000540e4f <unknown>
#29 0x00000060c272 <unknown>
#30 0x00000060e71a <unknown>
#31 0x00000060ef0c <unknown>
#32 0x00000063fb26 <unknown>
#33 0x0000004cfeb1 <unknown>
#34 0x7f52a0044830 <unknown>
#35 0x0000005d6049 <unknown>
r8: 00000000016e49b0 r9: 0000000000000000 r10: 0000000000000145 r11: 00007f528b1d7ed0
r12: 0000000000000000 r13: 0000000000000000 r14: 00000000016d94c0 r15: 00000000016e49b0
di: 00000000ffffffff si: 00007f52a03e8b28 bp: 00007ffc1a336260 bx: 0000000000000000
dx: 00000000016d94b0 ax: 00000000016d94b0 cx: 0000000000000000 sp: 00007ffc1a336210
ip: 00007f5286efa65d efl: 0000000000010206 cgf: 0000000000000033 erf: 0000000000000004
trp: 000000000000000e msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
Calling _exit(1). Core file will not be generated.
Here is the snapcraft.yaml
name: xbr-dashboard
version: '0.1'
summary: XBR Applets Dashboard
description: |
XBR Applets Dashboard
grade: stable
confinement: strict
apps:
xbr-dashboard:
command: desktop-launch $SNAP/start.sh
environment:
PYTHONPATH: $SNAP/pyside
XDG_RUNTIME_DIR: $SNAP_DATA/wayland
plugs:
- network
- opengl
- desktop
- x11
- wayland
- browser-support
- process-control
- system-observe
parts:
dashboard:
plugin: dump
source: .
after:
- desktop-glib-only
stage:
- main.py
- start.sh
- components/*
pyside:
plugin: nil
override-build: |
snapcraftctl build
python3 -m easy_install pip
mkdir -p ${SNAPCRAFT_PART_INSTALL}/pyside
pip install --no-cache-dir --index-url=http://download.qt.io/snapshots/ci/pyside/5.11/latest/ pyside2 --trusted-host download.qt.io -t ${SNAPCRAFT_PART_INSTALL}/pyside
rm -r ${SNAPCRAFT_PART_INSTALL}/pyside/PySide2/examples
build-packages:
- unzip
- wget
- python3-setuptools
stage-packages:
- libnss3
- libxcomposite1
- libxcursor1
- libxtst6
- libxrandr2
- libasound2
- libglu1-mesa
- libgles2-mesa
- fontconfig
- libxkbcommon0
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libgdk-pixbuf2.0-0
- locales-all
- libxslt1.1
- fonts-dejavu-core
- xfonts-base
- xfonts-scalable
after:
- dashboard
plugs:
wayland-socket-dir:
content: wayland-socket-dir
interface: content
target: $SNAP_DATA/wayland
default-provider: mir-kiosk
Here is the dmesg log of the app
[ 19.671904] audit: type=1400 audit(1535228003.880:14): apparmor="DENIED" operation="capable" profile="snap.xbr-dashboard.xbr-dashboard" pid=1465 comm="python3" capability=21 capname="sys_admin"
[ 21.503204] audit: type=1400 audit(1535228005.712:15): apparmor="DENIED" operation="open" profile="snap.xbr-dashboard.xbr-dashboard" name="/proc/1465/mem" pid=1465 comm="python3" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[ 21.754226] audit: type=1400 audit(1535228005.964:16): apparmor="DENIED" operation="open" profile="snap.xbr-dashboard.xbr-dashboard" name="/proc/1467/mem" pid=1467 comm="QtWebEngineProc" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[ 22.257040] audit: type=1326 audit(1535228006.468:17): auid=1000 uid=0 gid=0 ses=1 pid=1482 comm="Chrome_IOThread" exe="/usr/bin/python3.5" sig=0 arch=c000003e syscall=41 compat=0 ip=0x7fbf314b65a7 code=0x50000
[ 22.362200] audit: type=1400 audit(1535228006.572:18): apparmor="DENIED" operation="open" profile="snap.xbr-dashboard.xbr-dashboard" name="/usr/share/fonts/" pid=1465 comm="python3" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[ 22.367395] audit: type=1400 audit(1535228006.576:19): apparmor="DENIED" operation="open" profile="snap.xbr-dashboard.xbr-dashboard" name="/usr/share/fonts/" pid=1465 comm="python3" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[ 22.367570] audit: type=1400 audit(1535228006.576:20): apparmor="DENIED" operation="open" profile="snap.xbr-dashboard.xbr-dashboard" name="/usr/share/fonts/" pid=1465 comm="python3" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[ 22.367618] audit: type=1400 audit(1535228006.576:21): apparmor="DENIED" operation="open" profile="snap.xbr-dashboard.xbr-dashboard" name="/usr/share/fonts/" pid=1465 comm="python3" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[ 22.368215] audit: type=1400 audit(1535228006.576:22): apparmor="DENIED" operation="open" profile="snap.xbr-dashboard.xbr-dashboard" name="/usr/local/share/fonts/" pid=1465 comm="python3" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[ 22.375192] audit: type=1400 audit(1535228006.584:23): apparmor="DENIED" operation="open" profile="snap.xbr-dashboard.xbr-dashboard" name="/usr/local/share/fonts/" pid=1465 comm="python3" requested_mask="r" denied_mask="r" fsuid=0 ouid=0