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

Selenium server doesn't shut down while grunt is shutting down (keepalive=true; OS=Windows7SP1) #6

Open
staszekj opened this issue Sep 23, 2014 · 3 comments

Comments

@staszekj
Copy link

Hi,

Base on your code I see you try to catch SIGINT and address it to shut down selenium.

Problem is that on my Windows 7 SP1 it looks like http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer is not to be sent. but the 'exec' method is called because: i got "Shutting down Selenium server: http://127.0.0.1:4444" message however I didn't get "Shut down Selenium server: " message, so I need to manualy shut down Selenium server: http://127.0.0.1:4444 from my web browser to get "OKOK" output, Please contact with me to get more details.

@seckardt
Copy link
Owner

seckardt commented Dec 2, 2014

If you don't provide more detailed information here, I have to close this issue as unreproducible.

@chazzlabs
Copy link

I'm seeing this issue on Windows 8.1. I'm using grunt-protractor-webdriver alongside grunt-proctrator-runner. My protractor_webdriver config looks like this:

protractor_webdriver: {
        options: {
            path: 'path/to/chromedriver',
            keepAlive: true
        },
        default: {}
    }

When running my tests with only Chrome and "keepAlive" not set explicitly, the build fails after my tests have already passed. When setting "keepAlive" to true, I see this output:

Running "protractor_webdriver:default" (protractor_webdriver) task
Starting Selenium server
Started Selenium server: http://127.0.0.1:4444

Running "protractor:local" (protractor) task
[launcher] Running 2 instances of WebDriver
Session created: count=1, browserName=firefox
Session created: count=1, browserName=chrome
.Session deleted: 1 session(s) left

------------------------------------
[chrome #2] PID: 10780
[chrome #2] Specs: <pathToSpecs>
[chrome #2]
[chrome #2] Using the selenium server at http://localhost:4444/wd/hub
[chrome #2] Started
[chrome #2] *.
[chrome #2]
[chrome #2]
[chrome #2] 2 specs, 0 failures, 1 pending spec
[chrome #2] Finished in 9.075 seconds

[launcher] 1 instance(s) of WebDriver still running
.Session deleted: Keeping the Selenium server alive
Shutting down Selenium server: http://127.0.0.1:4444

Done, without errors.

However, my terminal (currently using cmder on Windows) shows that java.exe is still running in the tab, and I have to escape it manually before coming back to Windows cmd.

@chazzlabs
Copy link

It looks like the http.get call on line 117 of protractor_webdriver.js is never handling a response, I assume because grunt exits before the call returns.

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

No branches or pull requests

3 participants