Taiko引发错误:无法启动chrome没有可用的沙箱

时间:2018-11-05 12:39:14

标签: getgauge

我正在尝试运行Gauge / Taiko,但是当我仅发出openBrowser()命令时,刚开始时出现错误。我的操作系统是Debian 9 Stretch,我使用本地Gauge / Taiko安装。 该错误似乎表明我需要更新内核-我真的需要吗?我希望Taiko包括适当的铬生成,尤其是https://chromium.googlesource.com/chromium/src/+/HEAD/docs/linux_suid_sandbox.md声明第一行说“页面大多是过时的”,并且看起来像是从源头而不是使用提供的安装说明。包。

我将不胜感激,对于Taiko首选发行版的建议也很高兴;]

$ 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.
> 

2 个答案:

答案 0 :(得分:2)

有人遇到类似的问题

https://github.com/iridium-browser/tracker/issues/208#issuecomment-395619508

启用非特权名称空间可以解决此问题。 报价解决方案:

# echo kernel.unprivileged_userns_clone=1 > /etc/sysctl.d/00-local-userns.conf
# sysctl --system

答案 1 :(得分:2)

如果您在浏览器中加载完全受信任的网站,也可以通过
  <label for="dvtype">Type</label> <select id="ddlselect" style="width: 55px;"></select> 将openBrowser的参数设为 '--no-sandbox', '--disable-setuid-sandbox'