Run protractor test script in multiple nodes (os platform) via selenium grid - protractor

I am currently trying to run Protractor test script using selenium grid. My goal is to distribute Protractor test scripts to multiple nodes running under different flavor of OS. It should also run different parts of test script in parallel to save execution time. Current setup works when I use webdriver-manager to distribute test with multiple instances, but webdriver-manager would let me use only one node. I know it's possible to overcome this issue with selenium grid, but I am having following errors test console:
node_modules/selenium-webdriver/error.js:26
constructor(opt_error) {
^
WebDriverError: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
at WebDriverError (./node_modules/selenium-webdriver/error.js:26:26)
at Object.checkLegacyResponse (./node_modules/selenium-webdriver/error.js:580:13)
at ./node_modules/selenium-webdriver/lib/webdriver.js:64:13
at Promise.invokeCallback_ (./node_modules/selenium-webdriver/lib/promise.js:1329:14)
at TaskQueue.execute_ (./node_modules/selenium-webdriver/lib/promise.js:2790:14)
at TaskQueue.executeNext_ (./node_modules/selenium-webdriver/lib/promise.js:2773:21)
at ./node_modules/selenium-webdriver/lib/promise.js:2652:27
at ./node_modules/selenium-webdriver/lib/promise.js:639:7
at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: WebDriver.createSession()
at acquireSession (./node_modules/selenium-webdriver/lib/webdriver.js:62:22)
at Function.createSession (./node_modules/selenium-webdriver/lib/webdriver.js:295:12)
at Builder.build (./node_modules/selenium-webdriver/builder.js:458:24)
at [object Object].DriverProvider.getNewDriver (./node_modules/protractor/built/driverProviders/driverProvider.js:42:27)
at [object Object].Runner.createBrowser (./node_modules/protractor/built/runner.js:203:37)
at ./node_modules/protractor/built/runner.js:293:21
at _fulfilled (./node_modules/q/q.js:834:54)
at self.promiseDispatch.done (./node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (./node_modules/q/q.js:796:13)
at ./node_modules/q/q.js:556:49
[launcher] Process exited with error code 1
Also, selenium node that I registered complains with following messages:
$ java -jar /Users/user/Desktop/selenium-server-standalone-2.52.0.jar -role node -hub http://localhost:4444/grid/register Dwebdriver.chrome.driver="./node_modules/protractor/selenium/chromedriver_2.21" -browser "browserName=chrome,version=ANY,platform=MAC,maxInstances=20"
14:40:17.078 INFO - Launching a Selenium Grid node
14:40:17.126 INFO - Adding browserName=chrome,version=ANY,platform=MAC,maxInstances=20
14:40:17.515 INFO - Java: Oracle Corporation 25.74-b02
14:40:17.515 INFO - OS: Mac OS X 10.11.6 x86_64
14:40:17.521 INFO - v2.52.0, with Core v2.52.0. Built from revision 4c2593c
14:40:17.570 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform MAC
14:40:17.570 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform MAC
14:40:17.570 INFO - Driver class not found: com.opera.core.systems.OperaDriver
14:40:17.570 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
14:40:17.630 INFO - Selenium Grid node is up and ready to register to the hub
14:40:17.650 INFO - Starting auto registration thread. Will try to register every 5000 ms.
14:40:17.650 INFO - Registering the node to the hub: http://localhost:4444/grid/register
14:40:17.669 INFO - The node is registered to the hub and ready to use
14:41:32.968 INFO - Executing: [new session: Capabilities [{rootElement=*[ng-app], count=1, browserName=chrome, maxInstances=4, shardTestFiles=true}]])
14:41:32.977 INFO - Creating a new session for Capabilities [{rootElement=*[ng-app], count=1, browserName=chrome, maxInstances=4, shardTestFiles=true}]
14:41:32.998 WARN - Exception thrown
java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:06:42'
System info: host: 'user-M-C19J', ip: '10.128.164.26', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_74'
Driver info: driver.version: unknown
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.openqa.selenium.remote.server.DefaultSession.execute(DefaultSession.java:183)
at org.openqa.selenium.remote.server.DefaultSession.<init>(DefaultSession.java:119)
at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:95)
at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:124)
at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:59)
at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:1)
at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:111)
at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:79)
at org.openqa.selenium.remote.server.DriverServlet.handleRequest(DriverServlet.java:202)
at org.openqa.selenium.remote.server.DriverServlet.doPost(DriverServlet.java:164)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at org.openqa.selenium.remote.server.DriverServlet.service(DriverServlet.java:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.openqa.jetty.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.openqa.jetty.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:680)
at org.openqa.jetty.jetty.servlet.ServletHandler.handle(ServletHandler.java:571)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479)
at org.openqa.jetty.http.HttpServer.service(HttpServer.java:920)
at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:358)
at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:537)
Caused by: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:06:42'
System info: host: 'user-M-C19J', ip: '10.128.164.26', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_74'
Driver info: driver.version: unknown
at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:113)
at org.openqa.selenium.remote.server.DefaultDriverProvider.newInstance(DefaultDriverProvider.java:97)
at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:60)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:222)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:103)
... 9 more
Caused by: java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
at com.google.common.base.Preconditions.checkState(Preconditions.java:199)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:109)
at org.openqa.selenium.chrome.ChromeDriverService.access$0(ChromeDriverService.java:1)
at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:137)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:296)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:88)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:138)
... 14 more
14:41:33.002 WARN - Exception: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
this is my current configuration:
seleniumAddress: 'http://localhost:4444/wd/hub',
chromeDriver: './node_modules/protractor/selenium/chromedriver_2.21',
capabilities: {
'rootElement': '*[ng-app]',
'browserName': 'chrome', // chrome, firefox, or phantomjs
'shardTestFiles': true,
'maxInstances': 3
}
I ran the following command line to launch hub:
java -jar /Users/xxx/selenium-server-standalone-3.0.0-beta2.jar -role hub
and following is for running node:
java -jar /Users/xxx/selenium-server-standalone-3.0.0-beta2.jar -role node -hub http://localhost:4444/grid/register
Chrome driver is under: /node_modules/protractor/selenium/chromedriver_2.21
Has anyone successfully configure protractor with selenium grid?

Webdriver_manager is bundled in npm as a quick solution for starting server and is not a comprehensive solution as Selenium Grid. Grid should be used for all professional distributed execution environment.
Check this link for response from Julie
Webdriver-Manager doesn't have options for hub & node
And regarding Protractor with Selenium Grid, I did use local Grid and also Sauce Labs.
You should pass the chrome driver property when initializing the node.
java -jar /Users/xxx/selenium-server-standalone-3.0.0-beta2.jar -role node -hub http://*******:4444/grid/register/ -Dwebdriver.chrome.driver=C:/Users/<>/AppData/Roaming/npm/node_modules/protractor/selenium/chromedriver.exe
The protractor Conf - chromedriver option is not passed over grid and it works for only webdriver-manager.

Related

Tomcat Service not starting with elastic APM java agent

I am trying to start tomcat service in linux with elastic APM agent (java). But every time I start the service, getting these errors
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/mis-all-1.0.0]]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1007)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:983)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:639)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1296)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2037)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.VerifyError: (class: javax/servlet/GenericServlet, method: init signature: (Ljavax/servlet/ServletConfig;)V) invokedynamic bytecode is not supported in this class file version
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2509)
at java.lang.Class.getDeclaredFields(Class.java:1819)
at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)
at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:270)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:138)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:70)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:417)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:891)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:388)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5536)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 10 more
May 20, 2021 5:48:15 AM org.apache.catalina.startup.HostConfig deployDirectory
SEVERE: Error deploying web application directory []
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/mis-all-1.0.0]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1011)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:983)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:639)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1296)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2037)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
at java.lang.Thread.run(Thread.java:745)
I am using below commands to set Environmental variables for APM agent
export CATALINA_OPTS="$CATALINA_OPTS -javaagent:/app/elastic-apm-agent-1.23.0.jar"
export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.service_name=Stage-pricing"
export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.application_packages=org,com,com.qr.jadu"
export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.server_url=http://ip:8200"
export CATALINA_OPTS="$CATALINA_OPTS -Delastic.apm.global_labels='env=Stage'"
and logback-classic version 1.0.6
Please suggest a solution or any steps I am missing, thanks in advance.
Update by kriegaex, copied from the OP's comment:
Server version: Apache Tomcat/7.0.106 Server
built: Sep 16 2020 08:33:41 UTC
Server number: 7.0.106.0 OS
OS: Linux OS Version: 4.14.35-2047.502.4.1.el7uek.x86_64
Architecture: amd64
JVM Version: 1.7.0_301-b09
JVM Vendor: Oracle Corporation APM
Server version: 7.12.1
APM Agent language and version: java, 1.23. Also apm agent supports 7u60+, 8u40+, 9, 10, 11.
Caused by: java.lang.VerifyError: (
class: javax/servlet/GenericServlet,
method: init
signature: (Ljavax/servlet/ServletConfig;)V)
invokedynamic bytecode is not supported in this class file version
Piotr is right. Your Elastic APM Agent - whatever that thing does - transforms the byte code of void GenericServlet.init(ServletConfig) in such a way as to utilise invokedynamic byte code instructions, not checking or expecting that the code it weaves into is from an ancient Java version. Invokedynamic was introduced in Java 7, therefore your JAR must contain older versions. Either exclude it from transformation, if the agent can be configured that way, or upgrade the JAR, either using a more recent version or recompiling the API sources to a more recent (Java 7+) byte code version. Most agents probably rather expect Java 8+, but I am not sure about yours.

IE intstances is not working with protractor e2e

I have version :-
protractor 5.4.2
webdriver-manager version is 12.1.7
angular 7.2.4
Steps to run our app on IE:
run webdriver-manager update --ie
IEdriverserver.exe is 3.150.1 ,
standalone service is 3.14.59 jar
geckodriver-v0.26.0.exe
chromedriver_79.0.3945.36.zip
run webdriver-manager start --ie
open another terminal and run ng e2e
the error was:
Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
i 「wdm」: Compiled successfully.
[12:05:28] I/launcher - Running 1 instances of WebDriver
[12:05:28] I/local - Starting selenium standalone server...
[12:05:29] I/local - Selenium standalone server started at http://10.154.204.250:52076/wd/hub
[12:05:29] E/launcher - Unable to create new service: InternetExplorerDriverService
os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_201'
Driver info: driver.version: unknown
[12:05:29] E/launcher - SessionNotCreatedError: Unable to create new service: InternetExplorerDriverService
can you help me why I am receiving this error and how I can fix this?

I am running protractor on a chromebook : the error message tells me error:cannot find Chrome Binary?

While attempting to run protractor i get an error where it cant find chrome binary. Its a chromebook so the binary should already exist right?
why am i getting this error ?
Been looking around there doesnt seem to be any info.
[23:57:28] I/launcher - Running 1 instances of WebDriver
[23:57:28] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[23:57:29] E/launcher - unknown error: cannot find Chrome binary
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'penguin', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.44-04933-g0fb17cd4e23f', java.version: '11.0.4'
Driver info: driver.version: unknown
remote stacktrace: #0 0x5bad641316e9 <unknown>
[23:57:29] E/launcher - WebDriverError: unknown error: cannot find Chrome binary
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'penguin', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.44-04933-g0fb17cd4e23f', java.version: '11.0.4'
Driver info: driver.version: unknown
remote stacktrace: #0 0x5bad641316e9 <unknown>
at Object.checkLegacyResponse (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:546:15)
at parseHttpResponse (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:509:13)
at doSend.then.response (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:441:30)
at process._tickCallback (internal/process/next_tick.js:68:7)
From: Task: WebDriver.createSession()
at Function.createSession (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
at Function.createSession (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/chrome.js:761:15)
at createDriver (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:170:33)
at Builder.build (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:626:16)
at Hosted.getNewDriver (/usr/lib/node_modules/protractor/built/driverProviders/driverProvider.js:53:33)
at Runner.createBrowser (/usr/lib/node_modules/protractor/built/runner.js:195:43)
at q.then.then (/usr/lib/node_modules/protractor/built/runner.js:339:29)
at _fulfilled (/usr/lib/node_modules/protractor/node_modules/q/q.js:834:54)
at /usr/lib/node_modules/protractor/node_modules/q/q.js:863:30
at Promise.promise.promiseDispatch (/usr/lib/node_modules/protractor/node_modules/q/q.js:796:13)
[23:57:29] E/launcher - Process exited with error code 199
It is looking for chrome browser to run the test. In windows and Mac , if you have chrome browser version, which you are passing in protractor capability, installed in your system, then test run on it by default.
But You can set the chrome binary path as desired also by adding below property in your protractor.conf.js file
"chromeOptions": {
binary: 'Path_to_Chrome_binaries',
args: [],
extensions: [],
}
Note, binary: 'Path_to_Chrome_binaries' , here 'Path_to_Chrome_binaries' should be the path to Chrome.exe
You also need to make sure the webdriver-manager version is compatible with the chrome browser you are using to tun your test upon.
If this does not solves your issue then please provide the protractor.conf.js file while will help in answering rh2 question/debughing the issue.

Unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.34.522913

I am trying to run Protractor tests on centOS with headless chrome.
When I run the tests with "protractor conf.js" the system throws strange error:
[root#stage conf]# protractor conf.js
[10:17:16] I/launcher - Running 1 instances of WebDriver
[10:17:16] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[10:18:18] E/launcher - unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.34.522913 (36222509aa6e819815938cbf2709b4849735537c),platform=Linux 3.10.0-6 93.5.2.el7.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.12 seconds
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
System info: host: 'stage', ip: '10.10.19.203', 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: unknown
[10:18:18] E/launcher - WebDriverError: unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.34.522913 (36222509aa6e819815938cbf2709b4849735537c),platform=Linux 3.10.0-6 93.5.2.el7.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.12 seconds
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
System info: host: 'stage', ip: '10.10.19.203', 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: unknown
at WebDriverError (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:27:5)
at Object.checkLegacyResponse (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/err or.js:546:15)
at parseHttpResponse (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:509: 13)
at doSend.then.response (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:4 41:30)
at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: WebDriver.createSession()
at Function.createSession (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriv er.js:769:24)
at Function.createSession (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/chrome.js:7 61:15)
at createDriver (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:170:33)
at Builder.build (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:626:16)
at Hosted.getNewDriver (/usr/lib/node_modules/protractor/built/driverProviders/driverProvider.js:53:33)
at Runner.createBrowser (/usr/lib/node_modules/protractor/built/runner.js:195:43)
at q.then.then (/usr/lib/node_modules/protractor/built/runner.js:339:29)
at _fulfilled (/usr/lib/node_modules/protractor/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/usr/lib/node_modules/protractor/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/usr/lib/node_modules/protractor/node_modules/q/q.js:796:13)
[10:18:18] E/launcher - Process exited with error code 199
I am using:
Chromedriver v 2.34.522913,
CentOS Linux release 7.4.1708 (Core),
Protractor Version 5.2.0
I believe that this might be CentosOS issue with chrome.
If i would be you - i would check if chrome is actually installed normally: https://www.tecmint.com/install-google-chrome-on-redhat-centos-fedora-linux/
And also you might consider using Chromium instead Chrome, since i heard that Chrome might not work well on CentosOS:
https://www.hiroom2.com/2017/08/11/centos-7-chromium-en/
Chromedriver would be same for Chrome and Chromium
Another option might be to run Chrome in Docker Container

Protractor: setSize() failing with "WebDriverError: disconnected: unable to connect to renderer"

Starting October 18th upon upgrading to Chrome 62 my protractor suite started failing with:
WebDriverError: disconnected: unable to connect to renderer
when I called
WebDriver.manage().window().setSize(1280, 1480)
Full stack trace:
Stack Trace:
Running "protractor:default" (protractor) task
[10:48:23] I/launcher - Running 1 instances of WebDriver
[10:48:23] I/direct - Using ChromeDriver directly...
protractor startup failure: WebDriverError: disconnected: unable to connect to renderer
(Session info: chrome=62.0.3202.62)
(Driver info: chromedriver=2.32.498537 (cb2f855cbc7b82e20387eaf9a43f6b99b6105061),platform=Mac OS X 10.12.6 x86_64)
[10:48:24] E/launcher - Error: WebDriverError: disconnected: unable to connect to renderer
(Session info: chrome=62.0.3202.62)
(Driver info: chromedriver=2.32.498537 (cb2f855cbc7b82e20387eaf9a43f6b99b6105061),platform=Mac OS X 10.12.6 x86_64)
at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: WebDriver.manage().window().setSize(1280, 1480)
at setWindowDimensions (/Users/kyle/projects/c/web/build/config/protractor-conf.js:95:43)
at onPrepare (/Users/kyle/projects/c/web/build/config/protractor-conf.js:71:12)
at Function.promise (/Users/kyle/projects/c/web/node_modules/q/q.js:682:9)
at _fulfilled (/Users/kyle/projects/c/web/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/Users/kyle/projects/c/web/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/Users/kyle/projects/c/web/node_modules/q/q.js:796:13)
at /Users/kyle/projects/c/web/node_modules/q/q.js:556:49
at runSingle (/Users/kyle/projects/c/web/node_modules/q/q.js:137:13)
at flush (/Users/kyle/projects/c/web/node_modules/q/q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
[10:48:24] E/launcher - Process exited with error code 100
Env Info:
ChromeDriver: chromedriver=2.32.498537 (cb2f855cbc7b82e20387eaf9a43f6b99b6105061), platform=Mac OS X 10.12.6 x86_64
Chrome : 62.0.3202.62
Protractor: 5.1.2 (connecting directly to chromedriver)
Node: v6.9.5
Upgrading to chromedriver 2.33 fixed my issue.
To specify a version when running webdriver-manager :
webdriver-manager update --versions.chrome 2.33