NaCl helper process running without a sandbox error using Chrome through Selenium in Linux

☆樱花仙子☆ 提交于 2020-07-23 07:50:14

问题


I am facing the following error using Chrome through Selenium in Linux:

ERROR:browser_main_loop.cc(1512)] Unable to open X display.
ERROR:nacl_helper_linux.cc(308)] NaCl helper process running without a sandbox!

Do you have solution for the below error?


回答1:


This error message...

ERROR:nacl_helper_linux.cc(308)] NaCl helper process running without a sandbox!

...implies that the setuid of the sandbox in your system is not configured, hence the program was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.


Solution

A quick solution will be, if you want to run Chrome and only use the namespace sandbox, you can set the flag:

--disable-setuid-sandbox

This flag will disable the setuid sandbox (Linux only). But if you do so on a host without appropriate kernel support for the namespace sandbox, Chrome will not spin up. As an alternative you can also use the flag:

--no-sandbox

This flag will disable the sandbox for all process types that are normally sandboxed.

Example:

chromeOptions: {
      args: ['--disable-setuid-sandbox', '--no-sandbox']
},


来源:https://stackoverflow.com/questions/60544974/nacl-helper-process-running-without-a-sandbox-error-using-chrome-through-seleniu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!