Search code examples
getgauge

Taiko throws Error: Failed to launch chrome No usable sandbox


I am trying to run Gauge/Taiko however I am getting an error just at the very beginning when I only issue openBrowser() command. My OS is Debian 9 Stretch and I use local Gauge/Taiko installation. The error seems to suggest I need to update my kernel - do I really need that? I would hope Taiko includes appropriate build of chromium, especially that https://chromium.googlesource.com/chromium/src/+/HEAD/docs/linux_suid_sandbox.md states ate the very first line that "page is mostly out-of-date" and it looks like a set of instructions for installation from source rather than using provided packages.

I'd appreciate any help, I am also happy for a suggestion of Taiko's preferred distro ;]

$ npm --version
6.4.1
$ ./node_modules/.bin/taiko
Version: 0.3.0 (Chromium:71.0.3563.0)
Type .api for help and .exit to quit

> openBrowser()
 ✘ Error: Failed to launch chrome!
[12296:12296:1105/121525.023333:FATAL:zygote_host_impl_linux.cc(116)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
#0 0x55e22767dcac base::debug::StackTrace::StackTrace()
#1 0x55e2275f7670 logging::LogMessage::~LogMessage()
#2 0x55e228afb050 service_manager::ZygoteHostImpl::Init()
#3 0x55e2272c0d7e content::ContentMainRunnerImpl::Initialize()
#4 0x55e2272f43e8 service_manager::Main()
#5 0x55e2272bf5c1 content::ContentMain()
#6 0x55e2255ff1b3 ChromeMain
#7 0x7fc5c46222e1 __libc_start_main
#8 0x55e2255ff02a _start

Received signal 6
#0 0x55e22767dcac base::debug::StackTrace::StackTrace()
#1 0x55e22767d821 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#2 0x7fc5ca7b10c0 <unknown>
#3 0x7fc5c4634fff gsignal
#4 0x7fc5c463642a abort
#5 0x55e22767c645 base::debug::BreakDebugger()
#6 0x55e2275f7ae8 logging::LogMessage::~LogMessage()
#7 0x55e228afb050 service_manager::ZygoteHostImpl::Init()
#8 0x55e2272c0d7e content::ContentMainRunnerImpl::Initialize()
#9 0x55e2272f43e8 service_manager::Main()
#10 0x55e2272bf5c1 content::ContentMain()
#11 0x55e2255ff1b3 ChromeMain
#12 0x7fc5c46222e1 __libc_start_main
#13 0x55e2255ff02a _start
  r8: 0000000000000000  r9: 00007ffde9ca88e0 r10: 0000000000000008 r11: 0000000000000246
 r12: 00007ffde9ca90f8 r13: 000000000000016d r14: 00007ffde9ca9100 r15: 00007ffde9ca9108
  di: 0000000000000002  si: 00007ffde9ca88e0  bp: 00007ffde9ca8b20  bx: 0000000000000006
  dx: 0000000000000000  ax: 0000000000000000  cx: 00007fc5c4634fff  sp: 00007ffde9ca8958
  ip: 00007fc5c4634fff efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
Calling _exit(1). Core file will not be generated.
, run `.trace` for more info.
> 

Solution

  • If you loading fully trusted site in the browser, alternatively you can also pass
    '--no-sandbox', '--disable-setuid-sandbox' args to openBrowser like await openBrowser({args:['--no-sandbox', '--disable-setuid-sandbox']})