Nurullah
Nurullah

Reputation: 1

Selenium exited before it could start error while running WCT in Jenkins Pipeline

I get errors while running WCT in the Jenkins pipeline. I share that errors detail on the bottom. These errors may be related to Openshift. Maybe you can share your opinion.

Note: My tests are running at Openshift.

First case: -> I running with a chrome configuration. In this case, I get the following error. This error message is clear. We must install chrome. But I don't know how to do it.

Error:

The following browsers were not found: chrome. (All installed browsers found: firefox)

Error image:

Image-1

Second case:

-> Because of the above error I changed browser configuration to firefox. But I take a different error this time. This error is complicated for me. I need more detail about this error. According to my research, there may be many reasons for this. Maybe we should add/change some options on Openshift.

Note:

Picked up JAVA_TOOL_OPTIONS: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Dsun.zip.disableMemoryMapping=true 10:12:47.767 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358 10:12:47.857 INFO [GridLauncherV3.lambda$buildLaunchers$3] - Launching a standalone Selenium Server on port 33226 2019-11-12 10:12:47.903:INFO::main: Logging initialized @385ms to org.seleniumhq.jetty9.util.log.StdErrLog 10:12:48.154 INFO [WebDriverServlet.] - Initialising WebDriverServlet 10:12:48.252 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 33226

Waiting on this line too much. After that, I aborted the manual pipeline. Because the process does not continue.

Error:

Selenium exited before it could start 

Error image:

Image-2

Upvotes: 0

Views: 4428

Answers (1)

undetected Selenium
undetected Selenium

Reputation: 193108

This error message...

10:12:48.252 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 33226
Error: Selenium exited before it could start

...implies that the Selenium Server can't be started for some reasons (e.g. port 4444 is blocked).

As per the discussion Selenium exited before it could start this error can be observed when Selenium Server is started in another process before running npm/wdio and hence selenium standalone service will fail to start.

Solution

The simplest solution would be to check for a running selenium process or try killall selenium / java processes.

Upvotes: 0

Related Questions