Brave (and other apps) don't launch on Arch

Updated my Antergos (Arch) VM and then tried running some snaps. Brave fails. It works on 16.04.

[alan@antergos-amd64 ~]$ brave
Can not open /var/lib/snapd/seccomp/profiles//snap.brave.brave (No such file or directory)
aborting: No such file or directory
[alan@antergos-amd64 ~]$ snap version
snap    2.27.3-1
snapd   2.27.3-1
series  16
arch    
kernel  4.12.13-1-ARCH

node-red seems similarly broken.

  Process: 12082 ExecStart=/usr/bin/snap run node-red (code=exited, status=1/FAILURE)
 Main PID: 12082 (code=exited, status=1/FAILURE)

Nov 10 14:44:00 antergos-amd64 systemd[1]: snap.node-red.node-red.service: Main process exited, code=exited, status=1/FAILURE
Nov 10 14:44:00 antergos-amd64 systemd[1]: snap.node-red.node-red.service: Failed with result 'exit-code'.
Nov 10 14:44:00 antergos-amd64 systemd[1]: snap.node-red.node-red.service: Service hold-off time over, scheduling restart.
Nov 10 14:44:00 antergos-amd64 systemd[1]: snap.node-red.node-red.service: Scheduled restart job, restart counter is at 5.
Nov 10 14:44:00 antergos-amd64 systemd[1]: Stopped Service for snap application node-red.node-red.
Nov 10 14:44:00 antergos-amd64 systemd[1]: snap.node-red.node-red.service: Start request repeated too quickly.
Nov 10 14:44:00 antergos-amd64 systemd[1]: snap.node-red.node-red.service: Failed with result 'exit-code'.
Nov 10 14:44:00 antergos-amd64 systemd[1]: Failed to start Service for snap application node-red.node-red.
[alan@antergos-amd64 ~]$ snap run node-red
Can not open /var/lib/snapd/seccomp/profiles//snap.node-red.node-red (No such file or directory)
aborting: No such file or directory

Thanks for reporting this. We’re currently working on updating the packaging for Arch as well as fixing various checks that would fail specifically on Arch. There are some details in this topic: Updates to snapd package on Arch

If you’re willing to experiment, can you pull the PKGBUILD from this review: https://github.com/snapcore/snapd/pull/4174 and try makepkg --nocheck -i? This will build and install snapd-git package. You may need to systemctl stop snapd snapd.socket before installing the package and systemctl daemon-reload after.

BTW. is this the node-red-amd64 node-red snap you’re using?

Awesome. I’ll test your package on my Antergos setup over the weekend. I’ve spent enough time testing today :smiley:

It’s node-red in the beta channel, so snap install node-red --beta.

Thanks, got it installed now.

maciek@corsair:~ snap version
snap    2.29.3.r432.g40d506d3c-1
snapd   2.29.3.r432.g40d506d3c-1
series  16
arch
kernel  4.13.11-1-ARCH
maciek@corsair:~ SNAPD_DEBUG=1 snap run node-red
2017/11/10 16:11:05.558319 cmd.go:70: DEBUG: re-exec not supported on distro "arch" yet
DEBUG: security tag: snap.node-red.node-red
DEBUG: executable:   /usr/lib/snapd/snap-exec
DEBUG: confinement:  non-classic
DEBUG: base snap:    core
DEBUG: checking if the current process shares mount namespace with the init process
DEBUG: re-associating is not required
DEBUG: creating lock directory /run/snapd/lock (if missing)
DEBUG: opening lock directory /run/snapd/lock
DEBUG: opening lock file: /run/snapd/lock/.lock
DEBUG: sanity timeout initialized and set for three seconds
DEBUG: acquiring exclusive lock (scope (global))
DEBUG: sanity timeout reset and disabled
DEBUG: ensuring that snap mount directory is shared
DEBUG: unsharing snap namespace directory
DEBUG: creating namespace group directory /run/snapd/ns
DEBUG: namespace group directory does not require intialization
DEBUG: releasing lock (scope: (global))
DEBUG: creating lock directory /run/snapd/lock (if missing)
DEBUG: opening lock directory /run/snapd/lock
DEBUG: opening lock file: /run/snapd/lock/node-red.lock
DEBUG: sanity timeout initialized and set for three seconds
DEBUG: acquiring exclusive lock (scope node-red)
DEBUG: sanity timeout reset and disabled
DEBUG: initializing mount namespace: node-red
DEBUG: opening namespace group directory /run/snapd/ns
DEBUG: found base snap filesystem device 7:7
DEBUG: attempting to re-associate the mount namespace with the namespace group node-red
DEBUG: successfully re-associated the mount namespace with the namespace group node-red
DEBUG: found root filesystem inside the mount namespace 7:7
DEBUG: releasing resources associated with namespace group node-red
DEBUG: moved process 3734 to freezer cgroup hierarchy for snap node-red
DEBUG: releasing lock (scope: node-red)
DEBUG: resetting PATH to values in sync with core snap
DEBUG: snappy_udev_init
DEBUG: creating user data directory: /home/maciek/snap/node-red/52
DEBUG: loading bpf program for security tag snap.node-red.node-red
DEBUG: read 5936 bytes from /var/lib/snapd/seccomp/bpf//snap.node-red.node-red.bin
DEBUG: raising privileges to load seccomp profile
DEBUG: dropping privileges after loading seccomp profile
DEBUG: execv(/usr/lib/snapd/snap-exec, /usr/lib/snapd/snap-exec...)
DEBUG:  argv[1] = node-red
STARTING NODE-RED : /snap/node-red/52/bin/node-red -u /home/maciek/snap/node-red/52 on port 1880
10 Nov 16:11:06 - [info]

Welcome to Node-RED
===================

10 Nov 16:11:06 - [info] Node-RED version: v0.17.5
10 Nov 16:11:06 - [info] Node.js  version: v6.11.3
10 Nov 16:11:06 - [info] Linux 4.13.11-1-ARCH x64 LE
10 Nov 16:11:06 - [info] Loading palette nodes
10 Nov 16:11:07 - [info] Dashboard version 2.5.0-beta started at /ui
10 Nov 16:11:07 - [warn] ------------------------------------------------------
10 Nov 16:11:07 - [warn] [rpi-gpio] Info : Ignoring Raspberry Pi specific node
10 Nov 16:11:07 - [warn] ------------------------------------------------------
10 Nov 16:11:07 - [info] Settings file  : /home/maciek/snap/node-red/52/settings.js
10 Nov 16:11:07 - [info] User directory : /home/maciek/snap/node-red/52
10 Nov 16:11:07 - [info] Flows file     : /home/maciek/snap/node-red/52/flows.json
10 Nov 16:11:07 - [info] Creating new flow file
10 Nov 16:11:07 - [info] Starting flows
10 Nov 16:11:07 - [info] Started flows
10 Nov 16:11:07 - [info] Server now running at http://127.0.0.1:1880/

Note, you may need to snap stop node-red before staring it with snap run node-red.

1 Like

Small update. Tried locally and brave too seems to work with snapd-git.

1 Like

Ok, tried to build and got to this. Please be gentle, I’m not an Arch user :slight_smile:

checking for mkdir... yes
checking for regcomp... yes
checking for setenv... yes
checking for strdup... yes
checking for strerror... yes
checking for secure_getenv... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for glib-2.0... yes
checking for libseccomp... yes
configure: WARNING:
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    X                                                     X
    X Apparmor is disabled, all snaps will run in devmode X
    X                                                     X
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
checking for libudev... yes
checking for udev... yes
checking for rst2man... /usr/bin/rst2man
checking for valgrind... no
configure: WARNING: "cannot find the valgrind tool, will not run unit tests through valgrind"
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
make: *** empty string invalid as file name.  Stop.
==> ERROR: A failure occurred in build().
    Aborting...
[alan@antergos-amd64 arch]$ 


I think I know what’s the problem. Can you set MAKEFLAGS in /etc/makepkg.conf to something meaningful, eg:

maciek@corsair:~ cat /etc/makepkg.conf|grep MAKEFLAGS
MAKEFLAGS="-j3"

IIRC it may be unset by default, so the build() script calls make "", hence the error.

Edit: i’ll fix this in another commit to https://github.com/snapcore/snapd/pull/4174

1 Like

Nice one, that built and installed. Thanks for helping me get this built.

$ snap version
snap    2.29.3.r434.ge6837824d-1
snapd   2.29.3.r434.ge6837824d-1
series  16
arch    
kernel  4.13.11-1-ARCH

I tested Brave, Pycharm-Community, Nextcloud Server, Node Red and Snapcraft, all of which failed to launch in some way previously.

Teleconsole is the only one that still fails to launch, but errors differently, so that’s good :smiley: Need to dig further into that, and I’ll start a separate thread, but if you’re interested, here’s the error.

[ 2964.437593] traps: teleconsole[12336] trap invalid opcode ip:7fb1cae5e45c sp:7ffeb24c97b8 error:0 in ld-2.26.so[7fb1cae41000+25000]

Are you testing this in a VM by any chance?

I tried Brave on 14.04 and it also failed but more like hanged than crashed / exited. I’ll investigate more and report.

Yeah, I don’t have a native Arch machine.

If you’re using VirtualBox, could you try qemu/kvm instead?

1 Like

I can, but I have also tested the same snap on Ubuntu 14.04, Linux Mint 18.2 and OpenSUSE Tumbleweed under VirtualBox on the same computer, and it works there.