Unable to start Chrome Driver - Alpine Linux - java

i am setting up a selenium based testing application. I am using chrome driver for testing.
I have set up a docker image as in the below URL.
https://github.com/Leafney/alpine-selenium-chrome/blob/master/Dockerfile
I have configured the chrome driver property as follows.
System.setProperty("webdriver.chrome.driver", "/usr/lib/chromium/chromedriver");
However, I get the below error informing that chrome failed to start.
Command duration or timeout: 60.07 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'c34db8dbfca2', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.27-moby', java.version: '1.8.0_151'
Driver info: driver.version: ChromeDriver
unknown error: Chrome failed to start: crashed
Any pointers on this will be helpful.

I had the same issue with Chromedriver and Alpine, Chromedriver is not executable at all, even I had tried to install and run almost every version of the Chromedriver, no luck.
And then I had to use Debian Linux in order to execute Chromedriver properly for e2e testing in docker and CI.

Related

Selenium Webdriver Problem cannot open google chrome

chrome driver 77
chrome version 77
Starting ChromeDriver 77.0.3865.40 (f484704e052e0b556f8030b65b953dce96503217-refs/branch-heads/3865#{#442}) on port 38929
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created
from disconnected: unable to send message to renderer
(Session info: chrome=77.0.3865.90)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
System info: host: 'DESKTOP-JCFLT7B', ip: '192.168.1.113', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '10.0.2'
Driver info: driver.version: ChromeDriver
remote stacktrace: Backtrace:
Versions of driver and of Chrome should match.
In Chrome, disable autoupdates. Otherwise after launching Chrome will be updated and can became incompatible with Java driver.

FAILED CONFIGURATION: #BeforeTest setup org.openqa.selenium.TimeoutException: timeout while sign in with Selenium ChromeDriver and Chrome

could anyone please tell me , why i get timeout out issue intermittently while sign in on web page after browsing the URL . i get it intermittently , it works fine after i close all the web browser and run the program . the below error message , i want to know the root cause , can anyone help me please !
FAILED CONFIGURATION: #BeforeTest setup
org.openqa.selenium.TimeoutException: timeout
(Session info: chrome=71.0.3578.98)
(Driver info: chromedriver=2.42.591088 (7b2b2dca23cca0862f674758c9a3933e685c27d5),platform=Windows NT 6.1.7601 SP1 x86) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:13:22.693Z'
System info: host: '01HW596115', ip: '10.29.124.26', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_201'
Driver info: org.openqa.selenium.chrome.ChromeDriver
This error message...
FAILED CONFIGURATION: #BeforeTest setup
org.openqa.selenium.TimeoutException: timeout
(Session info: chrome=71.0.3578.98)
(Driver info: chromedriver=2.42.591088 (7b2b2dca23cca0862f674758c9a3933e685c27d5),platform=Windows NT 6.1.7601 SP1 x86) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:13:22.693Z'
System info: host: '01HW596115', ip: '10.29.124.26', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_201'
Driver info: org.openqa.selenium.chrome.ChromeDriver
...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
You are using chromedriver=2.42
Release Notes of chromedriver=2.42 clearly mentions the following :
Supports Chrome v68-70
You are using chrome=71.0
Release Notes of ChromeDriver v2.45 clearly mentions the following :
Supports Chrome v70-72
So there is a clear mismatch between the ChromeDriver v2.42 and the Chrome Browser v71.0
Solution
Upgrade ChromeDriver to current ChromeDriver v2.45 level.
Keep Chrome version between Chrome v70-72 levels. (as per ChromeDriver v2.45 release notes)
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
Take a System Reboot.
Execute your #Test.

Web driver exception on robot framework tests on jenkins

I have robot framework tests that when run locally, run fine. But when run on jenkins, after a fixed number of tests(nearly 14), start giving exceptions.
WebDriverException: Message: Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'xxxx', ip: 'xxxx', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-327.10.1.el7.x86_64', java.version: '1.8.0_131'
Driver info: driver.version: unknown
Stacktrace:
What might be causing this? Do i need to breakdown big suites to smaller ones?
The error says it all :
WebDriverException: Message: Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'xxxx', ip: 'xxxx', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-327.10.1.el7.x86_64', java.version: '1.8.0_131'
Driver info: driver.version: unknown
The error clearly says the following :
Your Selenium Java Client details is not getting detected back as in revision: 'unknown', time: 'unknown'
Your WebDriver variant details is not getting detected back as in Driver info: driver.version: unknown
Your main issue is the version compatibility between the binaries you are using as follows :
Your Selenium Java Client version is 3.4.0 of Apr 21, 2017 which is almost a year older.
Your JDK version is 1.8.0_131 which is pretty ancient.
Your WebDriver variant version is unknown to us.
Your Web Client variant version is unknown to us.
So there is a clear mismatch between the JDK v8u131 , Selenium Client v2.4.0.
Solution
Upgrade JDK to recent levels JDK 8u162.
Upgrade Selenium to current levels Version 3.11.0.
Upgrade WebDriverDriver variant version to recent levels.
Upgrade Web Client version to recent levels.
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
Use CCleaner tool to wipe off all the OS chores before and after the execution of your test Suite.
If your base Web Client base version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
Execute your #Test.

Problems executing selenium on ubuntu server

I am trying to execute Selenium on Ubuntu Server but I have always problem with driver version. I don't know more options to check it so I am here to try to solve this.
First the environment:
Maven : Apache Maven 3.3.9
Java : 1.8
Chrome : Google Chrome 59.0.3071.115
Chrome driver : ChromeDriver 2.30.477691
When I try to execute mvn clean test, it returns this ERROR:
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'ubuntu-2gb-lon1-01', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-81-generic', java.version: '1.8.0_131'
Driver info: driver.version: ChromeDriver
The simple java code is this:
System.setProperty("webdriver.chrome.driver", "chromedriver");
WebDriver driver = new ChromeDriver();
driver.get("https://google.es");
driver.quit();
Could anyone help to me to install a Chrome driver version to solve this?
I think that I am not doing this correctly.
Regards!
System.setProperty("webdriver.chrome.driver", "Driver Path");
Here you have to pass the path where your driver is located in your disk.

detected broken kqueue; not using.: Undefined error: 0 while using selenium on mac

Not sure why we are getting this error on mac 10.12.4 while running the selenium, My chrome is running on latest version i.e. Version 58.0.3029.110 (64-bit) and Chrome driver is 2.9 and Selenium_java version is 2.53.
Anyone facing the same issue, is something i'm missing here or selenium is currently not supporting these configurations on mac Sierra. Any help much appreciated.
After this warning I'm getting this message, I'm running scripts using docker
[testng] Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
[testng] Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:58'
[testng] System info: host: 'vbabu-in-la01', ip: '10.40.17.78', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.4', java.version: '1.8.0_121'
[testng] Driver info: driver.version: RemoteWebDriver

Categories