When I am trying to run webdriver (chrome) I gets error "unknown error: Chrome failed to start: exited abnormally". I have this error only on linux, on my PC (windows) I don't have this error.
google-chrome version: 73.0.3683.86
chromedriver version: ChromeDriver 73.0.3683.68
Ubuntu version: 18.04
I have tried running Xvfb, and exporting screen.
Xvfb :0 -ac -screen 0 1024x768x24 &
export DISPLAY=:0
Chrome options:
var chromeDesktop = {
"browserName": "chrome",
"javascriptEnabled": true,
"acceptSslCerts": true,
"chromeOptions": {
"args": [/*`--proxy-server=${proxyUrl}`,*/'user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36"','--disable-web-security','--allow-running-insecure-content'],
"prefs": {
"profile.managed_default_content_settings.images": 2
},
"extensions": [
encode('./anti-captcha.crx')
]
}
};
I can not run code in headless, beacuse I must load extension. What can I do?