webdriver-manager: webdriver-manager start --detach do not detach the server on Windows 8

using --detach option with start command do not put the server in background

output of webdriver-manager start --detach

$ webdriver-manager --detach start
[10:26:28] I/start - java -Dwebdriver.chrome.driver=C:\Users\dnoliver\AppData\Roaming\nvm\v6.7.0\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.27.exe -Dwebdriver.ie.driver=C:\Users\dnoliver\AppData\Roaming\nvm\v6.7.0\node_modules\protractor\node_modules\webdriver-manager\selenium\IEDriverServer3.1.0.exe -Dwebdriver.gecko.driver=C:\Users\dnoliver\AppData\Roaming\nvm\v6.7.0\node_modules\protractor\node_modules\webdriver-manager\selenium\geckodriver-v0.14.0.exe -jar C:\Users\dnoliver\AppData\Roaming\nvm\v6.7.0\node_modules\protractor\node_modules\webdriver-manager\selenium\selenium-server-standalone-3.1.0.jar -port 4444
[10:26:28] I/start - seleniumProcess.pid: 596
10:26:28.356 INFO - Selenium build info: version: '3.1.0', revision: '86a5d70'
10:26:28.357 INFO - Launching a standalone Selenium Server
2017-02-20 10:26:28.375:INFO::main: Logging initialized @293ms
10:26:28.454 INFO - Driver class not found: com.opera.core.systems.OperaDriver
10:26:28.454 INFO - Driver provider com.opera.core.systems.OperaDriver registration is skipped:
Unable to create new instances on this machine.
10:26:28.454 INFO - Driver class not found: com.opera.core.systems.OperaDriver
10:26:28.455 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
10:26:28.464 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped:
 registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform WIN8_1
2017-02-20 10:26:28.517:INFO:osjs.Server:main: jetty-9.2.15.v20160210
2017-02-20 10:26:28.556:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@4520ebad{/,null,AVAILABLE}
2017-02-20 10:26:29.072:INFO:osjs.ServerConnector:main: Started ServerConnector@4497bf4c{HTTP/1.1}{0.0.0.0:4444}
2017-02-20 10:26:29.073:INFO:osjs.Server:main: Started @991ms
10:26:29.073 INFO - Selenium Server is up and running

System info:

OS: Windows 8 Node Version: v6.7.0 NPM version: v4.2.0 java version “1.8.0_102” Java™ SE Runtime Environment (build 1.8.0_102-b14) Java HotSpot™ 64-Bit Server VM (build 25.102-b14, mixed mode) Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true webdriver-manager 12.0.2 Working in a network with proxy configuration

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 23
  • Comments: 38 (10 by maintainers)

Commits related to this issue

Most upvoted comments

I reproduced this issue as well. Any workarounds to start/stop the process in one test script?

OS: ProductName: Mac OS X ProductVersion: 10.12.3 BuildVersion: 16D32 Node: v6.9.4 Webdriver-manager: 12.0.2

Since fix for this doesn’t seem to be merged (--detach and stop commands) and our tests doesn’t work anymore with older drivers and newer chrome, I had to came up with new workaround for this.

Now I use pm2 to manage webdriver manager like this:

# start webdriver
pm2 start webdriver-manager --name=webdriver -- start

# wait for it to start
for i in $(seq 10); do echo Waiting start...;sleep 2;  nc -z localhost 4444 && break; done

# stop webdriver
pm2 delete webdriver

Nice thing with this workaround is that it also fixes the problem, that webdriver manager hangs due to stream buffer overflow or something like that if quiet mode is used and selenium outputs debug messages too fast rate (like when polling stuff in javascript side). And another bonus is that I don’t have to relay on webdriver-manager’s --detach / stop implementation even if it gets fixed some day.

Hi guys, any update on this issue?

@duffman03 my workaround was to downgrade to version webdriver-manager@11.1.1

Looks like #266 and #268 were already closed by #228. PR fixing shutting down the server afterwards is #274.

Anyways using pm2 to handle starting/stopping process has worked fine for me lately so I haven’t even checked out if #228 did fix those #266/#268 problems.

@sahbi-ktifa you still cannot shut it down if started like that + there is no need to add any extra cmd options if you are using & for starting program to background… I would say that better work around is to keep in version 11.1.1 until this is fixed properly.

So in the master branch this has been fixed. I’ve tested this on Windows, Mac, and Linux. https://github.com/angular/webdriver-manager/blob/master/lib/provider/selenium_server.ts#L122

Closing this issue as fixed. This is sort of released in version 13 although it will not work on Protractor 5.4.2 (this has to do with driver providers: direct connect and local). I am still working on fixes to Protractor 6.

I’m still seeing this problem with webdriver-manager 12.1.0 on Mac OS 10.13.6

@felipecardona this has already been implemented and PRs had been sent months ago, but maintainers just haven’t merged them.

@elhigu please check the fix provided to PR #268 and #266, not the comments.

The code appears to wait on the appium port instead of the selenium port. All the PR does is wait on the selenium port instead.

The symptoms you, others and I have observed likely stem from the same issue - the code is waiting on a port that is never opened because we don’t have Android SDK installed or enabled on the command line so the process never detaches.

w.r.t. specifying “–seleniumPort=80” I agree - that won’t help at all.