Mir-kiosk electron stopped workomg

Hi,

I have a very strange problem. My working snap stopped working after a fresh build. The old build still works. But the new build gives this error.

What happened?

name: pam-app
version: VERSION
summary: Digital signage app
description: Digital signage app
base: core18
confinement: strict
grade: devel
compression: lzo

apps:
  pam-app:
    daemon: simple
    stop-timeout: 1m
    extensions: [gnome-3-28]
    restart-condition: always
    command: snap/command-chain/desktop-launch xwayland-kiosk-launch $SNAP/pam/PAMApp --no-sandbox
    plugs:
      - network
      - network-bind
      - opengl
      - pulseaudio
      - wayland

layout:
  /usr/share/fonts:
    bind: $SNAP/usr/share/fonts

environment:
  XWAYLAND_FULLSCREEN_WINDOW_HINT: window_role="browser-window"

parts:
  pam-app-source:
    plugin: nil
    source: out
    override-build: |
      mkdir -p $SNAPCRAFT_PART_INSTALL/pam
      cp -R PAMApp-linux-x64/* $SNAPCRAFT_PART_INSTALL/pam
    stage-packages:
      - libnspr4
      - libasound2
      - libgconf-2-4
      - libnss3
      - libx11-xcb1
      - libxss1
      - libxtst6
    build-snaps:
      - node/14/stable

  xwayland-kiosk-helper:
    plugin: cmake
    source: https://github.com/MirServer/xwayland-kiosk-helper.git
    build-packages: [build-essential]
    stage-packages: [xwayland, i3, libegl1-mesa, libgl1-mesa-glx]
ov 09 22:20:24 SydneyDemo2 pam-app.pam-app[45892]: ##################################################################################
Nov 09 22:20:24 SydneyDemo2 pam-app.pam-app[45892]: If you are experiencing problems with your GUI app (e.g. bad fonts), please run:
Nov 09 22:20:24 SydneyDemo2 pam-app.pam-app[45892]:   snap connect pam-app:x11-plug pam-app:x11
Nov 09 22:20:24 SydneyDemo2 pam-app.pam-app[45892]: ##################################################################################
Nov 09 22:20:24 SydneyDemo2 pam-app.pam-app[46072]: _XSERVTransSocketCreateListener: failed to bind listener
Nov 09 22:20:24 SydneyDemo2 pam-app.pam-app[46072]: _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
Nov 09 22:20:24 SydneyDemo2 pam-app.pam-app[46072]: _XSERVTransMakeAllCOTSServerListeners: failed to create listener for local
Nov 09 22:20:24 SydneyDemo2 pam-app.pam-app[46072]: could not connect to wayland server
Nov 09 22:20:24 SydneyDemo2 pam-app.pam-app[46072]: (EE)
Nov 09 22:20:24 SydneyDemo2 pam-app.pam-app[46072]: Fatal server error:
Nov 09 22:20:24 SydneyDemo2 pam-app.pam-app[46072]: (EE) Couldn't add screen
Nov 09 22:20:24 SydneyDemo2 pam-app.pam-app[46072]: (EE)
Nov 09 22:20:25 SydneyDemo2 pam-app.pam-app[46074]: i3: Cannot open display
Nov 09 22:20:25 SydneyDemo2 pam-app.pam-app[46075]: Failed to generate minidump.
Nov 09 22:20:25 SydneyDemo2 pam-app.pam-app[45892]: /snap/pam-app/x2/bin/xwayland-kiosk-launch: line 151: 46075 Segmentation fault      "$@"
Nov 09 22:20:25 SydneyDemo2 systemd[1]: snap.pam-app.pam-app.service: Succeeded.

I’ve no knowledge of any Electron changes which might cause problems.

I do know that xwayland-kiosk-helper has been untouched for a couple of years. And deprecated: It won’t have changed, but I’d recommend mir-kiosk-x11 as that is simpler to use.

Do you see these same errors in the log with the working snap?

That looks like Xwayland is failing to start (after which your application hasn’t much chance).

There have been changes to the snapd x11 interface over this time but, if that were the cause, I would expect that to also affect the old build.

Thank you. I followed https://github.com/ogra1/electron-kiosk-uc20 example and got it working.

But I am having trouble with taking desktop screenshot. I will create another thread for it.