Electron-based Kiosk Snap

Hi guys,

Does anyone managed to complete the “Make a HTML5/Electron-based Kiosk Snap” tutorials recently on a RPi 3 running Ubuntu Core 18 (32-bits IoT for armhf architectures)?

I’m trying to complete it, but I’ve not been being able to run the snap in my RPi 3. It fails to start with many errors. I wasn’t expecting these problems because I’m just following the tutorial step-by-step and I only added an architecture section, in order to be able to build armhf compatible snap, and made a single change in the original snapcraft.yaml (replaced the line npm install electron electron-packager && by npm install --unsafe-perm=true electron electron-packager &&. Otherwise I wouldn’t have been able to build the snap.)

The complete snapcraft.yaml is bellow:

name: electron-hello-world-kiosk
version: '0.1'
summary: Hello World Electron app for a Kiosk
description: |
  Simple Hello World Electron app as an example of a HTML5 Kiosk
base: core18
confinement: strict
grade: devel

architectures:
  - build-on: amd64
    run-on: armhf
  
apps:
  electron-hello-world-kiosk:
    command: desktop-launch xwayland-kiosk-launch "$SNAP/electron-helloworld/electron-quick-start" "--no-sandbox"
    plugs:
    - browser-support
    - network
    - network-bind
    - opengl
    - pulseaudio
    - wayland

  daemon:
    daemon: simple
    restart-condition: always
    command: desktop-launch xwayland-kiosk-launch "$SNAP/electron-helloworld/electron-quick-start" "--no-sandbox"
    plugs:
    - browser-support
    - network
    - network-bind
    - opengl
    - pulseaudio
    - wayland

environment:
  XWAYLAND_FULLSCREEN_WINDOW_HINT: window_role="browser-window"

parts:
  electron-helloworld:
    plugin: nodejs
    source: https://github.com/electron/electron-quick-start.git
    after: [desktop-gtk3, xwayland-kiosk-helper]
    override-build: |
        case $SNAPCRAFT_ARCH_TRIPLET in
          "i386-linux-gnu") ARCH="ia32";;
          "x86_64-linux-gnu") ARCH="x64";;
          "arm-linux-gnueabihf") ARCH="armv7l";;
          "aarch64-linux-gnu") ARCH="arm64";;
          *) echo "ERROR: electron does not support the '$SNAPCRAFT_ARCH_TRIPLET' architecture" && exit 1;;
        esac
        npm install --unsafe-perm=true electron electron-packager &&
        ./node_modules/.bin/electron-packager . --overwrite --platform=linux --arch=$ARCH --output=release-build --prune=true
        cp -v -R ./electron-quick-start-linux-$ARCH $SNAPCRAFT_PART_INSTALL/electron-helloworld
    stage-packages:
    - libasound2
    - libgconf-2-4
    - libnss3
    - libx11-xcb1
    - libxss1
    - libxtst6
    build-packages:
    - nodejs
    - npm
    - unzip

  # Adapted from snapcraft-desktop-helpers https://github.com/ubuntu/snapcraft-desktop-helpers/blob/master/snapcraft.yaml#L183
  desktop-gtk3:
    source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
    source-subdir: gtk
    plugin: make
    make-parameters: ["FLAVOR=gtk3"]
    build-packages:
      - build-essential
      - libgtk-3-dev
    stage-packages:
      - libxkbcommon0  # XKB_CONFIG_ROOT
      - ttf-ubuntu-font-family
      - dmz-cursor-theme
      - light-themes
      - adwaita-icon-theme
      - gnome-themes-standard
      - shared-mime-info
      - libgtk-3-0
      - libgdk-pixbuf2.0-0
      - libglib2.0-bin
      - libgtk-3-bin
      - unity-gtk3-module
      - libappindicator3-1
      - locales-all
      - xdg-user-dirs
      - ibus-gtk3
      - libibus-1.0-5

  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 ]

And the errors that I got when I run the application (sudo electron-hello-world-kiosk) are here:

 /snap/electron-hello-world-kiosk/x2/bin/desktop-launch: line 301: /snap/electron-hello-world-kiosk/x2/usr/bin/xdg-user-dirs-update: cannot execute binary file: Exec format error
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
realpath: '': No such file or directory
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
realpath: '': No such file or directory
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
realpath: '': No such file or directory
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
realpath: '': No such file or directory
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
realpath: '': No such file or directory
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
realpath: '': No such file or directory
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
realpath: '': No such file or directory
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
realpath: '': No such file or directory
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
/snap/electron-hello-world-kiosk/x2/bin/desktop-launch: line 10: /snap/electron-hello-world-kiosk/x2/usr/bin/update-mime-database: cannot execute binary file: Exec format error
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
/snap/electron-hello-world-kiosk/x2/bin/desktop-launch: line 10: /snap/electron-hello-world-kiosk/x2/usr/lib/arm-linux-gnueabihf/libgtk-3-0/gtk-query-immodules-3.0: No such file or directory
ERROR: update-mime-database /root/snap/electron-hello-world-kiosk/x2/.local/share/mime exited abnormally with status 126
ERROR: /snap/electron-hello-world-kiosk/x2/usr/lib/arm-linux-gnueabihf/libgtk-3-0/gtk-query-immodules-3.0 exited abnormally with status 127
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
##################################################################################
If you are experiencing problems with your GUI app (e.g. bad fonts), please run:
snap connect electron-hello-world-kiosk:x11-plug electron-hello-world-kiosk:x11
##################################################################################
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/snap/electron-hello-world-kiosk/x2/lib/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
/snap/electron-hello-world-kiosk/x2/bin/xwayland-kiosk-launch: line 135: /snap/electron-hello-world-kiosk/x2/usr/bin/Xwayland: cannot execute binary file: Exec format error
/snap/electron-hello-world-kiosk/x2/bin/xwayland-kiosk-launch: line 148: /snap/electron-hello-world-kiosk/x2/usr/bin/i3: cannot execute binary file: Exec format error
/snap/electron-hello-world-kiosk/x2/bin/xwayland-kiosk-launch: line 151: /snap/electron-hello-world-kiosk/x2/electron-helloworld/electron-quick-start: cannot execute binary file: Exec format error
/snap/electron-hello-world-kiosk/x2/bin/xwayland-kiosk-launch: line 1: kill: (-29356) - No such process

To build the snap I just executed the snapcraft command.

Please let me know if you have any ideas why this could be happening. Or if anyone have already faced same problems, managed to overcome them and have the solution feel free to share it.
Thank you,
João

On an armhf system ? (looks like you compiled the snap on the wrong architecture “Exec format error” is typically a sign for this)

No, I’m using an ubuntu machine, which is running ubuntu 20.04, to build the snap. So, the snapcraft command is executed on amd64 system. Once the snap is build, it is installed in the RPi 3, where the errors are occurring.

In order to be able to build and armhf snap I had to include the section bellow on snapcraft.ymal file:

architectures:
  - build-on: amd64
    run-on: armhf

this wont work if not all your code is also designed for cross compilation and if you dont use a cross compiler/toolchain …

else you just end up with x86 binaries inside a snap with armhf naming (which then results in exec format errors)

use snapcraft.io/build or build natively on your pi:

https://ograblog.wordpress.com/2020/07/10/building-snap-packages-on-ubuntu-core/

Thanks @ogra for your tips. It seems that I gave a little step further :grinning:… but the snap build failed.

After removing the architectures section from the initial yaml file. I tried to build the snap on snapcraft.io/build. (I tried the snapcraft remote build approach as well, and problems were exactly the same.)

Part of the build log is here:

WARN engine electron-notarize@1.0.0: wanted: {"node":">= 10.0.0"} (current: {"node":"8.10.0","npm":"3.5.2"})
WARN engine asar@3.0.3: wanted: {"node":">=10.12.0"} (current: {"node":"8.10.0","npm":"3.5.2"})
[17/Sep/2020:15:06:19 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 8810 "install electron electron-packager" "npm/3.5.2 node/v8.10.0 linux arm"
npm ERR! Linux 4.15.0-109-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "--unsafe-perm=true" "electron" "electron-packager"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror     at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror     at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror     at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror     at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror     at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror     at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror     at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror     at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     <http://github.com/npm/npm/issues>
[17/Sep/2020:15:06:19 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 38633 "install electron electron-packager" "npm/3.5.2 node/v8.10.0 linux arm"
[17/Sep/2020:15:06:19 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 7063 "install electron electron-packager" "npm/3.5.2 node/v8.10.0 linux arm"
[17/Sep/2020:15:06:19 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6753 "install electron electron-packager" "npm/3.5.2 node/v8.10.0 linux arm"
[17/Sep/2020:15:06:19 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 10257 "install electron electron-packager" "npm/3.5.2 node/v8.10.0 linux arm"
[17/Sep/2020:15:06:19 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 7525 "install electron electron-packager" "npm/3.5.2 node/v8.10.0 linux arm"
[17/Sep/2020:15:06:19 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 30808 "install electron electron-packager" "npm/3.5.2 node/v8.10.0 linux arm"
[17/Sep/2020:15:06:20 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 14286 "install electron electron-packager" "npm/3.5.2 node/v8.10.0 linux arm"
[17/Sep/2020:15:06:20 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 14872 "install electron electron-packager" "npm/3.5.2 node/v8.10.0 linux arm"
[17/Sep/2020:15:06:20 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 21870 "install electron electron-packager" "npm/3.5.2 node/v8.10.0 linux arm"
[17/Sep/2020:15:06:20 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 101394 "install electron electron-packager" "npm/3.5.2 node/v8.10.0 linux arm"
[17/Sep/2020:15:06:20 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 26640 "install electron electron-packager" "npm/3.5.2 node/v8.10.0 linux arm"
[17/Sep/2020:15:06:20 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 770198 "install electron electron-packager" "npm/3.5.2 node/v8.10.0 linux arm"

npm ERR! Please include the following file with any support request:
npm ERR!     /build/jbtest/parts/electron-helloworld/build/npm-debug.log
cp: cannot stat './electron-quick-start-linux-armv7l': No such file or directory
Failed to run 'override-build': Exit code was 1.
Build failed
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 258, in run
    self.build()
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 247, in build
    env=env)
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 100, in run_build_command
    return self.backend.run(args, env=full_env, **kwargs)
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/lxd.py", line 537, in run
    subprocess.check_call(cmd, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['lxc', 'exec', 'lp-bionic-armhf', '--env', 'LANG=C.UTF-8', '--env', 'SHELL=/bin/sh', '--env', 'SNAPCRAFT_BUILD_INFO=1', '--env', 'SNAPCRAFT_IMAGE_INFO={"build-request-id": "lp-59239513", "build-request-timestamp": "2020-09-17T14:47:23Z", "build_url": "https://launchpad.net/~build.snapcraft.io/+snap/9ba49fc2fc7fef99b475d95896907e3d/+build/1120242"}', '--env', 'SNAPCRAFT_BUILD_ENVIRONMENT=host', '--env', 'http_proxy=http://10.10.10.1:8222/', '--env', 'https_proxy=http://10.10.10.1:8222/', '--env', 'GIT_PROXY_COMMAND=/usr/local/bin/snap-git-proxy', '--', '/bin/sh', '-c', 'cd /build/jbtest && linux32 snapcraft']' returned non-zero exit status 2
Revoking proxy token...
RUN: /usr/share/launchpad-buildd/bin/in-target scan-for-processes --backend=lxd --series=bionic --arch=armhf SNAPBUILD-1120242
Scanning for processes to kill in build SNAPBUILD-1120242

Any tip regarding these error messages? It seems to be related with node version…

I remember that I’m trying to complete an example on a RPi3. So I wasn’t expecting to face these problems.

Thanks

Note:
For those of you who are following this thread and wondering what snapcraft remote build is, my suggestion is having a look to these links:

  1. Scrapcraft remote build video demonstration
  2. Scrapcraft remote build explanation

you might be hitting https://bugs.launchpad.net/bugs/1886861

is a workaround for this …

@ joao.belo did you manage to build the snap?
I am trying to acheave something similar but with electron-cgi. I am just on the first stage and snapcraft is killing me :slight_smile:

Hi @fairking, unfortunately not yet …

This time I followed the last @ogra suggestions, so I included the workaround lines.

# workaround for build.snapcraft.io builds
# https://bugs.launchpad.net/bugs/1886861
if [ -n "$http_proxy" ]; then
  export ELECTRON_GET_USE_PROXY=1
  export GLOBAL_AGENT_HTTP_PROXY="${http_proxy}"
  export GLOBAL_AGENT_HTTPS_PROXY="${http_proxy}"
fi

which only per si doesn’t not solved the problem. I also had a deeper look into this yaml file and this link, so I also set the nodejs-version) and nodejs-package.manager properties (in electron-helloworld part).

nodejs-version: 12.18.2
nodejs-package-manager: npm

But still, the build is not successful in any architecture.

The errors that I got this time were:

[18/Sep/2020:14:13:26 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 38058 "install" "npm/3.5.2 node/v8.10.0 linux arm"
WARN engine type-fest@0.13.1: wanted: {"node":">=10"} (current: {"node":"8.10.0","npm":"3.5.2"})
[18/Sep/2020:14:13:26 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 35613 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:27 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6563 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:27 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 7912 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:27 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 7249 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:27 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 34576 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:27 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 11289 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:27 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 7680 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:27 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 13876 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:28 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 323886 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:28 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 11152 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:28 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 11236 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:29 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 10474 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:29 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 7513 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:29 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 5804 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:29 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 8336 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:29 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6515 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:29 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 8339 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:30 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 7582 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:30 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 12343 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:30 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 10514 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:30 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6758 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:30 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 11677 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:30 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6252 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:30 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 13957 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:30 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 29719 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:30 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 8192 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:30 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 20889 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:30 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 20598 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:30 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6384 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:31 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 5868 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:31 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 8475 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:31 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 7236 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:31 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6284 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:31 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6287 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:31 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 7886 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:31 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 5988 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:31 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 15244 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:31 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 10384 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:31 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 7063 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:31 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 12764 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:32 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6881 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:32 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 7901 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:32 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 16498 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:32 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 8805 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:32 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 17348 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:32 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 7903 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:32 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 21238 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:32 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 5959 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:33 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 9614 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:33 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6611 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:33 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 15569 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:33 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6699 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:33 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 9749 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:33 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 8993 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:34 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 7658 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:34 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 9731 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:34 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6959 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:34 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6807 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:34 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6370 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:35 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 5810 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:35 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6067 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:36 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 7698 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:36 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 7103 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:36 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 8163 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:37 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6079 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:37 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 5969 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:38 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6654 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:38 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6136 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:39 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6612 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:39 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 18248 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:39 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 12302 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:39 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 4268 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:39 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 19387 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:40 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 7438 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:40 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 8252 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:40 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 21221 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:40 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 23465 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:40 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 8058 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:40 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 8465 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:40 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6097 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:40 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 34268 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:41 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6451 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:41 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6711 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:41 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 11987 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:41 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 30603 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:41 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 16405 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:41 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 7416 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:41 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 9863 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:41 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 8090 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:41 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 5412 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:41 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6283 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:42 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6045 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:42 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6412 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:42 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 14386 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:42 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 9308 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:42 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 11523 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:42 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6666 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:42 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 4268 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:43 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 7288 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:43 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 16108 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:44 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 12786 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:44 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 9631 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:44 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 7639 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:44 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 8615 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:44 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 12051 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:45 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 5929 "install" "npm/3.5.2 node/v8.10.0 linux arm"
[18/Sep/2020:14:13:45 +0000] "CONNECT registry.npmjs.org:443 HTTP/1.1" 200 6729 "install" "npm/3.5.2 node/v8.10.0 linux arm"

> core-js@3.6.5 postinstall /build/jbtest/parts/electron-helloworld/build/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> electron@10.1.2 postinstall /build/jbtest/parts/electron-helloworld/build/node_modules/electron
> node install.js

[18/Sep/2020:14:13:57 +0000] "CONNECT github.com:443 HTTP/1.1" 200 7040 "-" "-"

[18/Sep/2020:14:14:32 +0000] "CONNECT github-production-release-asset-2e65be.s3.amazonaws.com:443 HTTP/1.1" 200 65083955 "-" "-"
[18/Sep/2020:14:14:32 +0000] "CONNECT github.com:443 HTTP/1.1" 200 7005 "-" "-"
[18/Sep/2020:14:14:33 +0000] "CONNECT github-production-release-asset-2e65be.s3.amazonaws.com:443 HTTP/1.1" 200 9993 "-" "-"
electron-quick-start@1.0.0 /build/jbtest/parts/electron-helloworld/build
└─┬ electron@10.1.2 
  ├─┬ @electron/get@1.12.2 
  │ ├─┬ debug@4.1.1 
  │ │ └── ms@2.1.2 
  │ ├── env-paths@2.2.0 
  │ ├─┬ fs-extra@8.1.0 
  │ │ ├── graceful-fs@4.2.4 
  │ │ ├── jsonfile@4.0.0 
  │ │ └── universalify@0.1.2 
  │ ├─┬ global-agent@2.1.12 
  │ │ ├── boolean@3.0.1 
  │ │ ├── core-js@3.6.5 
  │ │ ├── es6-error@4.1.1 
  │ │ ├─┬ matcher@3.0.0 
  │ │ │ └── escape-string-regexp@4.0.0 
  │ │ ├─┬ roarr@2.15.4 
  │ │ │ ├── detect-node@2.0.4 
  │ │ │ ├─┬ globalthis@1.0.1 
  │ │ │ │ └─┬ define-properties@1.1.3 
  │ │ │ │   └── object-keys@1.1.1 
  │ │ │ ├── json-stringify-safe@5.0.1 
  │ │ │ ├── semver-compare@1.0.0 
  │ │ │ └── sprintf-js@1.1.2 
  │ │ ├── semver@7.3.2 
  │ │ └─┬ serialize-error@7.0.1 
  │ │   └── type-fest@0.13.1 
  │ ├─┬ global-tunnel-ng@2.7.1 
  │ │ ├── encodeurl@1.0.2 
  │ │ ├── lodash@4.17.20 
  │ │ ├─┬ npm-conf@1.1.3 
  │ │ │ ├─┬ config-chain@1.1.12 
  │ │ │ │ ├── ini@1.3.5 
  │ │ │ │ └── proto-list@1.2.4 
  │ │ │ └── pify@3.0.0 
  │ │ └── tunnel@0.0.6 
  │ ├─┬ got@9.6.0 
  │ │ ├── @sindresorhus/is@0.14.0 
  │ │ ├─┬ @szmarczak/http-timer@1.1.2 
  │ │ │ └── defer-to-connect@1.1.3 
  │ │ ├─┬ cacheable-request@6.1.0 
  │ │ │ ├── clone-response@1.0.2 
  │ │ │ ├── get-stream@5.2.0 
  │ │ │ ├── http-cache-semantics@4.1.0 
  │ │ │ ├─┬ keyv@3.1.0 
  │ │ │ │ └── json-buffer@3.0.0 
  │ │ │ ├── lowercase-keys@2.0.0 
  │ │ │ ├── normalize-url@4.5.0 
  │ │ │ └── responselike@1.0.2 
  │ │ ├── decompress-response@3.3.0 
  │ │ ├── duplexer3@0.1.4 
  │ │ ├─┬ get-stream@4.1.0 
  │ │ │ └─┬ pump@3.0.0 
  │ │ │   ├── end-of-stream@1.4.4 
  │ │ │   └─┬ once@1.4.0 
  │ │ │     └── wrappy@1.0.2 
  │ │ ├── lowercase-keys@1.0.1 
  │ │ ├── mimic-response@1.0.1 
  │ │ ├── p-cancelable@1.1.0 
  │ │ ├── to-readable-stream@1.0.0 
  │ │ └─┬ url-parse-lax@3.0.0 
  │ │   └── prepend-http@2.0.0 
  │ ├── progress@2.0.3 
  │ ├─┬ sanitize-filename@1.6.3 
  │ │ └─┬ truncate-utf8-bytes@1.0.2 
  │ │   └── utf8-byte-length@1.0.4 
  │ └── sumchecker@3.0.1 
  ├── @types/node@12.12.62 
  └─┬ extract-zip@1.7.0 
    ├─┬ concat-stream@1.6.2 
    │ ├── buffer-from@1.1.1 
    │ ├── inherits@2.0.4 
    │ ├─┬ readable-stream@2.3.7 
    │ │ ├── core-util-is@1.0.2 
    │ │ ├── isarray@1.0.0 
    │ │ ├── process-nextick-args@2.0.1 
    │ │ ├── safe-buffer@5.1.2 
    │ │ ├── string_decoder@1.1.1 
    │ │ └── util-deprecate@1.0.2 
    │ └── typedarray@0.0.6 
    ├─┬ debug@2.6.9 
    │ └── ms@2.0.0 
    ├─┬ mkdirp@0.5.5 
    │ └── minimist@1.2.5 
    └─┬ yauzl@2.10.0 
      ├── buffer-crc32@0.2.13 
      └─┬ fd-slicer@1.1.0 
        └── pend@1.2.0 


Usage: npm <command>

where <command> is one of:
    access, add-user, adduser, apihelp, author, bin, bugs, c,
    cache, completion, config, ddp, dedupe, deprecate, dist-tag,
    dist-tags, docs, edit, explore, faq, find, find-dupes, get,
    help, help-search, home, i, info, init, install,
    install-test, issues, it, la, link, list, ll, ln, login,
    logout, ls, outdated, owner, pack, ping, prefix, prune,
    publish, r, rb, rebuild, remove, repo, restart, rm, root,
    run-script, s, se, search, set, show, shrinkwrap, star,
    stars, start, stop, t, tag, team, test, tst, un, uninstall,
    unlink, unpublish, unstar, up, update, upgrade, v, verison,
    version, view, whoami

npm <cmd> -h     quick help on <cmd>
npm -l           display full usage info
npm faq          commonly asked questions
npm help <term>  search for help on <term>
npm help npm     involved overview

Specify configs in the ini-formatted file:
    /root/.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

npm@3.5.2 /usr/share/npm
Failed to run 'override-build': Exit code was 1.
Build failed
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 258, in run
    self.build()
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 247, in build
    env=env)
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 100, in run_build_command
    return self.backend.run(args, env=full_env, **kwargs)
  File "/usr/lib/python2.7/dist-packages/lpbuildd/target/lxd.py", line 537, in run
    subprocess.check_call(cmd, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['lxc', 'exec', 'lp-bionic-armhf', '--env', 'LANG=C.UTF-8', '--env', 'SHELL=/bin/sh', '--env', 'SNAPCRAFT_BUILD_INFO=1', '--env', 'SNAPCRAFT_IMAGE_INFO={"build-request-id": "lp-59256206", "build-request-timestamp": "2020-09-18T13:58:12Z", "build_url": "https://launchpad.net/~build.snapcraft.io/+snap/9ba49fc2fc7fef99b475d95896907e3d/+build/1121621"}', '--env', 'SNAPCRAFT_BUILD_ENVIRONMENT=host', '--env', 'http_proxy=http://10.10.10.1:8222/', '--env', 'https_proxy=http://10.10.10.1:8222/', '--env', 'GIT_PROXY_COMMAND=/usr/local/bin/snap-git-proxy', '--', '/bin/sh', '-c', 'cd /build/jbtest && linux32 snapcraft']' returned non-zero exit status 2
Revoking proxy token...
RUN: /usr/share/launchpad-buildd/bin/in-target scan-for-processes --backend=lxd --series=bionic --arch=armhf SNAPBUILD-1121621
Scanning for processes to kill in build SNAPBUILD-1121621

The snapcraft.yaml file that I’m using to build the snap is available here, in case anyone wants to check. Following the commints you can track my build’s attempt history. None of them have been succeeded.

The problem continues to be related with node version. Any tips about what’s going on?

Hi guys, any suggestions?

@ogra any additional tip?

Thanks

I believe the problem is due to electron-packager version not being pinned. v15.0.0 dropped support for node<10, which breaks the tutorial. The tutorial needs to be updated for sure…

Here’s a version I just built for armhf & aarch64, though untested:

I’m going to refine that further and will update the tutorial accordingly.

2 Likes

Hi @cjp256, thanks for you help.

I’ve adapted my snapcraf.yaml using your as reference. I leave it here for those who are facing a similar problem and the build was successful, but although it’s successful there were some missing libraries log messages.

Priming desktop-gtk3 
This part is missing libraries that cannot be satisfied with any available stage-packages known to snapcraft:
- libgdk-x11-2.0.so.0
- libgtk-x11-2.0.so.0
These dependencies can be satisfied via additional parts or content sharing. Consider validating configured filesets if this dependency was built.
Priming electron-helloworld 
The 'electron-helloworld' part is missing libraries that are not included in the snap or base. They can be satisfied by adding the following entries to the existing stage-packages for this part:
- libdrm2
- libgbm1
- libwayland-server0
- libxcb-dri3-0

To remove these messages from build log, I’ve updated some of the yaml file section this way:

...

parts:
  electron-helloworld:
    ...
    stage-packages:
    ...
    - libdrm2
    - libgbm1
    - libwayland-server0
    - libxcb-dri3-0

    ...

  desktop-gtk3:
    ...
    stage-packages:
     ...
      - libgtk2.0-0

After rebuilding the snap the previous messages disappeared.

I haven’t had opportunity to install and test the snap, yet. But I will do it and as soon as I have more details I let you know.

Hi @cjp256, I was looking through the “kiosk” tutorials following some improvements to the support for X11 in kiosk environments.

I see that you’ve been planning to update the tutorial and, as I’ve no knowledge of nodejs (yet) will happily let you fix that up if that’s imminent. How is it going?

1 Like

Excellent!

I couldn’t get the tutorial working at all. :frowning: There are some critical pieces that I think are missing (mir-kiosk snap isn’t mentioned, for example).

Here are the logs for my latest attempt which mostly matches the yaml found in the tutorial:

2020-10-09T11:29:20Z electron-hello-world-kiosk.daemon[10603]: Fatal server error:
2020-10-09T11:29:20Z electron-hello-world-kiosk.daemon[10603]: (EE) wl_display@1: error 2: no memory
2020-10-09T11:29:20Z electron-hello-world-kiosk.daemon[10603]: (EE)
2020-10-09T11:29:21Z electron-hello-world-kiosk.daemon[10603]: i3: Cannot open display
2020-10-09T11:29:21Z electron-hello-world-kiosk.daemon[10603]: The futex facility returned an unexpected error code./snap/electron-hello-world-kiosk/x1/bin/xwayland-kiosk-launch: line 151: 10815 Aborted                 "$@"

Beyond that, I experimented with trying to use gnome extension (probably terrible idea :wink: in an effort to have a more succinct YAML), and using command-chain for the launcher scripts.

With regards to the electron parts, here is a tidy example, though using the gnome extension:

It’s on my agenda to make an electron-packager plugin for core20 to further simplify that, but am waiting until there’s a desktop option (for core20) to use it with.

FWIW, I’m testing in the QEMU instance, launched with kvm -smp 4 -m 4096 -netdev user,id=mynet0,hostfwd=tcp::8022-:22,hostfwd=tcp::8090-:80 -device virtio-net-pci,netdev=mynet0 -vga qxl -drive file=ubuntu-core-18-amd64.img,format=raw.

1 Like

That doesn’t build for me:

npm WARN lifecycle The node binary used for scripts is /snap/bin/node but npm is using /snap/node/3134/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

> core-js@3.6.5 postinstall /root/parts/electron-quick-start/build/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> electron@10.1.3 postinstall /root/parts/electron-quick-start/build/node_modules/electron
> node install.js

internal/modules/cjs/loader.js:883
  throw err;
  ^

Error: Cannot find module '/var/lib/snapd/void/install.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@10.1.3 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the electron@10.1.3 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-10-09T14_50_32_270Z-debug.log
Failed to run 'override-build': Exit code was 1.

Adding --scripts-prepend-node-path to the npx command suppresses first the warning, but otherwise doesn’t help.


[edit]

Googling got it building and running, but is this actually good?

parts:
  electron-quick-start:
    plugin: nil
    source: https://github.com/electron/electron-quick-start.git
    override-build: |
      npm config set scripts-prepend-node-path true
      npm install electron electron-packager --unsafe-perm=true
      npx electron-packager . --overwrite --platform=linux --output=release-build --prune=true
      cp -rv ./electron-quick-start-linux-* $SNAPCRAFT_PART_INSTALL/electron-quick-start
    build-snaps:
      - node/14/stable
    build-packages:
      - unzip
      - libc6-dev
    stage-packages:
      - libnss3
      - libnspr4

Are you using destructive mode by chance?

No, just the default multipass based build

if your build runs as root --unsafe-perm is a hard requirement of npm … this can also be set as environment variable … i have been wondering since a long time if we should not make that a default env setting for the nodejs plugin …

Ah yes, --unsafe-perm is required when using sudo, as in the case of multipass.

In the case of LXD I did not have issues. npm is detecting use of sudo and changing it’s behavior accordingly. We can probably drop --unsafe-perm as long we scrub SUDO_UID and SUDO_GID from Multipass’ command environment. At least a quick test showed that worked.

I’ve still got runtime errors to resolve (and some build cleanup) but there’s a WIP branch here:

Thanks for the help - will get back to it next week.

[Update]

This morning I’ve got this mostly working on a Classic desktop. Except that on the first run after installation the app crashes. (Have yet to try on a Core system.)

1 Like