Used Selenium Webdriver(V2.29), selenium-api version(3.4.0), Chrome Version (62.0.3202.94) 64 bit and tried to run chrome browser in linux machine with the below code.
WebDriver driver;
String chromeBinaryPath = "/data/Package/CHROME_NEW";
String driverPath = "/data/Package/Selenium/WebDrivers/ChromeDrivers/chromedriver_linux32/chromedriver";
System.setProperty("webdriver.chrome.driver", driverPath);
System.setProperty("webdriver.chrome.verboseLogging","true");
System.setProperty("webdriver.chrome.logfile","/data/Package/log/chromedriver.log");
ChromeOptions optionsLinux64 = new ChromeOptions();
optionsLinux64.setBinary(chromeBinaryPath);
optionsLinux64.addArguments("--headless");
optionsLinux64.addArguments("--no-sandbox");
optionsLinux64.addArguments("--disable-gpu");
optionsLinux64.addArguments("--headless");
driver = new ChromeDriver(optionsLinux64);
When tried to create a chrome session, getting below exception:
unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5),platform=Linux 3.10.0-693.5.2.el7.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 60.10 seconds Build info: version: '3.4.0', revision: 'unknown', time: 'unknown' System info: host: 'el4014.bc', ip: '10.120.94.70', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-693.5.2.el7.x86_64', java.version: '1.8.0_151' Driver info: driver.version: ChromeDriver
Installed Chrome at /data/Package/CHROME_NEW folder using rpm file.
Message in chromedriver.log:
[0.204][DEBUG]: DevTools request: http://localhost:12111/json/version
LaunchProcess: failed to execvp:
/data/Package/CHROME_NEW/
[0.379][DEBUG]: DevTools request failed
Can anyone help me in resolving with the above issue.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/d9672b93-8c42-4108-933a-5db09745f908%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/73c8e871-81b7-4633-b218-1faf8da2e874%40googlegroups.com.
Ok, just to check if your installation is all fine (Chrome installation and Chromedriver setup), can you please do the following on your linux machine ?
2. Open up another command terminal and type: curl -X POST http://0.0.0.0:9515/session -d '{"desiredCapabilities":{"browserName":"chrome","goog:chromeOptions":{"args":["--headless", "disable-gpu"]}}}'
This should basically show you a terminal that looks like [2]
[1] - Terminal output
Starting ChromeDriver 2.34.522913 (36222509aa6e819815938cbf2709b4849735537c) on port 9515
Only local connections are allowed.
[2] - Terminal output
curl -X POST http://0.0.0.0:9515/session -d '{"desiredCapabilities":{"browserName":"chrome","goog:chromeOptions":{"args":["--headless", "disable-gpu"]}}}'
{"sessionId":"9b2a946c039085399229ac5376e44687","status":0,"value":{"acceptSslCerts":true,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome":{"chromedriverVersion":"2.34.522913 (36222509aa6e819815938cbf2709b4849735537c)","userDataDir":"/tmp/.org.chromium.Chromium.fI40F8"},"cssSelectorsEnabled":true,"databaseEnabled":false,"handlesAlerts":true,"hasTouchScreen":false,"javascriptEnabled":true,"locationContextEnabled":true,"mobileEmulationEnabled":false,"nativeEvents":true,"networkConnectionEnabled":false,"pageLoadStrategy":"normal","platform":"Linux","rotatable":false,"setWindowRect":true,"takesHeapSnapshot":true,"takesScreenshot":true,"unexpectedAlertBehaviour":"","version":"63.0.3239.108","webStorageEnabled":true}}
If you don’t see both, then you first need to sort out your chrome browser installation and your chromedriver path.
Thanks & Regards
Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/1b906ccf-8e73-4fc4-9c2f-3a98d1e819ff%40googlegroups.com.
{"message":"unknown error: cannot find Chrome binary\n (Driver info: chromedriver=2.34.522913 (36222509aa6e819815938cbf2709b4849735537c),platform=Linux 3.10.0-693.5.2.el7.x86_64 x86_64)"}}
Request: curl -X POST http://0.0.0.0:9515/session -d '{"desiredCapabilities":{"browserName":"chrome","goog:chromeOptions":{"args":["--headless", "disable-gpu"],"binary":"/data/Package/CHROME_NEW"}}}'
Response: {"sessionId":"4c62ded584afc51b08fd55be7568c88c","status":13,"value":{"message":"unknown error: Chrome failed to start: exited abnormally\n (Driver info: chromedriver=2.34.522913 (36222509aa6e819815938cbf2709b4849735537c),platform=Linux 3.10.0-693.5.2.el7.x86_64 x86_64)"}}