cypress icon indicating copy to clipboard operation
cypress copied to clipboard

yarn start FATAL:setuid_sandbox_host for contributors on ubuntu 24.04

Open MikeMcC399 opened this issue 1 year ago • 3 comments

Current behavior

Executing yarn start as described in the CONTRIBUTING > Getting Started section results in an error message similar to the following:

$ cypress open --dev --global [9406:0427/165943.833191:FATAL:setuid_sandbox_host.cc(158)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /home/mike/cypress/packages/electron/dist/Cypress/chrome-sandbox is owned by root and has mode 4755.

This is an issue only for Ubuntu 24.04 LTS (Noble Numbat) (also 24.04.1) and affecting only contributors, not end-users. Lower versions of Ubuntu do not exhibit this problem.

Using the npm module cypress from the npm registry together with the Cypress binary from https://download.cypress.io is not affected.

Desired behavior

Contributors of PRs to Cypress should be able to build and run Cypress from source on Ubuntu 24.04 LTS (Noble Numbat) in order to test their contributions.

yarn start should allow starting Cypress on Ubuntu 24.04 after using yarn to install dependencies and carry out a preliminary build.

Test code to reproduce

Clean install Ubuntu 24.04.1 Desktop

In a terminal window, execute the following:

sudo apt update && sudo apt upgrade -y

and reboot.

Continue with:

sudo apt install git g++ make curl
curl -L https://bit.ly/n-install | bash
. ~/.bashrc

Install Python 3.11 by executing the following commands:

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.11

Add the environment variable NODE_GYP_FORCE_PYTHON to ~/.bashrc:

export NODE_GYP_FORCE_PYTHON=/usr/bin/python3.11

and execute

. ~/.bashrc

Clone and build Cypress with:

cd ~
git clone https://github.com/cypress-io/cypress --depth 1
cd cypress
n auto
npm install yarn@latest -g
yarn
yarn start

Cypress Version

First reported on version: 13.8.1 Reproducible also on version: 13.14.1

Node version

v18.17.1

Operating System

Ubuntu 24.04 LTS (Noble Numbat), 24.04.1 and Ubuntu 24.10 (Oracular Oriole)

Debug Logs

$ yarn start
yarn run v1.22.22
$ yarn ensure-deps
$ ./scripts/ensure-dependencies.sh
success Folder in sync.
$ cypress open --dev --global
[9406:0427/165943.833191:FATAL:setuid_sandbox_host.cc(158)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /home/mike/cypress/packages/electron/dist/Cypress/chrome-sandbox is owned by root and has mode 4755.

Other

Related

  • https://github.com/electron/electron/issues/41066

cc: @AtofStryker

MikeMcC399 avatar Apr 27 '24 17:04 MikeMcC399

MikeMcC399 avatar May 02 '24 07:05 MikeMcC399