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

Nightwatch hangs when Selenium fails to create a session #1141

Closed
MadaraUchiha opened this issue Aug 15, 2016 · 4 comments
Closed

Nightwatch hangs when Selenium fails to create a session #1141

MadaraUchiha opened this issue Aug 15, 2016 · 4 comments

Comments

@MadaraUchiha
Copy link

Because the module in HttpRequest.js doesn't have an option of a timeout, when Selenium fails to respond with a session, Nightwatch will wait for it indefinitely (until Selenium itself is timed out, which by default is 10 minutes).

This causes the runner to be idle for 10 minutes, and then fail the test.

I propose adding a new timeout configuration option to the HttpRequest module. I'm willing to put a PR in, I want to ask if there are existing conventions for passing config, and whether there are tests covering that part of the library.

@beatfactor
Copy link
Member

Yes, there are in test/src/http/testRequest.js and also in test/src/index/testNightwatchIndex.js.

It should probably be something like the default_path_prefix in https://github.com/nightwatchjs/nightwatch/blob/master/lib/index.js#L134. Docs will also need to be updated, at https://github.com/nightwatchjs/nightwatch-docs.

@beatfactor beatfactor changed the title Nightwatch will wait for Selenium session indefinitely Nightwatch hangs when Selenium fails to create a session Aug 15, 2016
@diegoprd
Copy link

diegoprd commented Nov 1, 2016

I dont know if you have seen it but quite a lot of people is having an issue when running Nightwatch tests in circleCi... Ive been looking into that issue for a while... to get to understand that is exactly this case....

screen shot 2016-11-01 at 14 40 45

handling request timeout would solve this issue!
+1
👍

@beatfactor
Copy link
Member

@diegoprd I don't think the timeout will help your problem with circle-ci. From what I've noticed they are running quite an old version of chrome so you might need to downgrade your chromedriver version. I suggest to post a new message on the mailing list regarding the circleci issue.

@beatfactor
Copy link
Member

Fixed as part of #1232.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants