Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Occasionally Protractor fails to execute test using selenium grid 2 #1266

Closed
luiscspinho opened this issue Nov 17, 2015 · 3 comments
Closed

Comments

@luiscspinho
Copy link

I've been experiencing some weird errors when launching my tests using selenium grid. Context: I've a lot of suites defined on my protractor-conf.js and use grunt launch tests on the pipeline. I've a selenium server working on my grid hub ('https://path:4444/wd/hub') which is responsible to forward the tests to 20 slaves that have chromedriver installed to run the tests. I don't have any kind of problem for the most part of the time, I am able to trigger this process with success and everything works fine. However, sometimes I get the following error:

13:37:05 [chrome #1-4] Using the selenium server at http://path:4444/wd/hub

13:37:05 [chrome #1-4]
13:37:05 [chrome #1-4] /PATH/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:108

13:37:05 [chrome #1-4] var template = new Error(this.message);
13:37:05 [chrome #1-4] ^

13:37:05 [chrome #1-4] UnknownError: Error forwarding the new session Error forwarding the request Read timed out

13:37:05 [chrome #1-4] at new bot.Error (/PATH/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:108:18)
13:37:05 [chrome #1-4] at Object.bot.response.checkResponse (/PATH/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/response.js:109:9)
13:37:05 [chrome #1-4] at /PATH/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:160:24
13:37:05 [chrome #1-4] at [object Object].promise.ControlFlow.runInFrame_ (eval at (/PATH/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1124:19), :1857:20)
13:37:05 [chrome #1-4] at [object Object].goog.defineClass.notify (eval at (/PATH/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1124:19), :2448:25)
13:37:05 [chrome #1-4] at [object Object].promise.Promise.notify_ (eval at (/PATH/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1124:19), :564:12)
13:37:05 [chrome #1-4] at Array.forEach (native)
13:37:05 [chrome #1-4] at [object Object].promise.Promise.notifyAll_ (eval at (/PATH/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1124:19), :553:15)
13:37:05 [chrome #1-4] at [object Object].goog.async.run.processWorkQueue as onTimeout
13:37:05 [chrome #1-4] at Timer.listOnTimeout as ontimeout
13:37:05 [chrome #1-4] From: Task: WebDriver.createSession()
13:37:05 [chrome #1-4] at Function.webdriver.WebDriver.acquireSession
(/PATH/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:157:22)
13:37:05 [chrome #1-4] at Function.webdriver.WebDriver.createSession (/PATH/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:30)
13:37:05 [chrome #1-4] at [object Object].Builder.build (/PATH/node_modules/protractor/node_modules/selenium-webdriver/builder.js:445:22)
13:37:05 [chrome #1-4] at [object Object].DriverProvider.getNewDriver (/PATH/node_modules/protractor/lib/driverProviders/driverProvider.js:38:7)
13:37:05 [chrome #1-4] at [object Object].Runner.createBrowser (/PATH/node_modules/protractor/lib/runner.js:182:37)
13:37:05 [chrome #1-4] at driverprovider_.setupEnv.then.then.then.frameworkPath (/PATH/node_modules/protractor/lib/runner.js:263:21)
13:37:05 [chrome #1-4] at _fulfilled (/PATH/node_modules/protractor/node_modules/q/q.js:797:54)
13:37:05 [chrome #1-4] at self.promiseDispatch.done (/PATH/node_modules/protractor/node_modules/q/q.js:826:30)
13:37:05 [chrome #1-4] at Promise.promise.promiseDispatch (/PATH/node_modules/protractor/node_modules/q/q.js:759:13)
13:37:05 [chrome #1-4] at /PATH/node_modules/protractor/node_modules/q/q.js:525:49
13:37:05
13:37:05 [launcher] Runner process exited unexpectedly with error code: 1
I must say that this happens with the same codebase of a successful execution. For instance, I push something to my pipeline, the tests run and everything passes. Then I restart the job with the exact same codebase/environment and that error occurs (the error can happen first and then disappears, this doesn't follow a specific rule). I can provide more information if necessary.

Thanks in advance.

@peterbollen
Copy link

Did found a solution for your problem?

@luiscspinho
Copy link
Author

Hi.

Sorry for the delay. Yes, the problem was with the way that Chrome was launched inside a VM. There is a bug and google is working on fixing this. This can be closed now.

Thanks

@lukeis lukeis closed this as completed Jan 7, 2016
@peterbollen
Copy link

Could you share the link to the bug report? What version of Chrome was being used?

@lock lock bot locked and limited conversation to collaborators Aug 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants