Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Selenium server fails to shut down after using grunt protractor runner 5.0.0 #186

Open
svattenky opened this issue May 12, 2017 · 2 comments

Comments

@svattenky
Copy link

We were previously using grunt-protractor-runner-4.0.0 which was working fine. We wanted to move to protractor 5 and we updated to grunt-protractor-runner 5.0.0.
When the selenium server shuts down it fails and throws an exception


Shut down Selenium server: http://localhost:4444 (<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <link rel="stylesheet" type="text/css" href="/assets/displayhelpservlet.css" media="all"/>
  <link href="/assets/favicon.ico" rel="icon" type="image/x-icon" />
  <script src="/assets/jquery-3.1.1.min.js" type="text/javascript"></script>
  <script src="/assets/displayhelpservlet.js" type="text/javascript"></script>
  <script type="text/javascript">
    var json = Object.freeze('{"version":"3.4.0","type":"Standalone","consoleLink":"/wd/hub"}');
  </script>
</head>
<body>

<div id="content">
  <div id="help-heading">
    <h1><span id="logo"></span></h1>
    <h2>Selenium <span class="se-type"></span>&nbsp;v.<span class="se-version"></span></h2>
  </div>

  <div id="content-body">
    <p>
      Whoops! The URL specified routes to this help page.
    </p>
    <p>
      For more information about Selenium <span class="se-type"></span> please see the
      <a class="se-docs">docs</a> and/or visit the <a class="se-wiki">wiki</a>.
      <span id="console-item">
        Or perhaps you are looking for the Selenium <span class="se-type"></span> <a class="se-console">console</a>.
      </span>
    </p>
    <p>
      Happy Testing!
    </p>
  </div>

  <div>
    <footer id="help-footer">
      Selenium is made possible through the efforts of our open source community, contributions from
      these <a href="https://github.com/SeleniumHQ/selenium/blob/master/AUTHORS">people</a>, and our
      <a href="http://www.seleniumhq.org/sponsors/">sponsors</a>.
   </footer>
  </div>
 </div>

</body>
</html>)
Fatal error: 22:16:10.305 WARN - Exception thrown
org.openqa.selenium.WebDriverException:
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'MacBook-Pro.local', ip: '192.168.1.23', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.4', java.version: '1.8.0_111'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=/var/folders/tc/89n0t1qs5p3fyw_n9hk1x7fc0000gn/T/rust_mozprofile.o1tUayFgomou, rotatable=false, timeouts={implicit=0.0, page load=300000.0, script=30000.0}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0.0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=52.0.2, platformVersion=16.5.0, moz:processID=58327.0, browserName=firefox, javascriptEnabled=true, platformName=darwin}]
Session ID: 29af9e7c-d820-984d-bcc0-9ddfd7928098
	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.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:150)
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:115)
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:45)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:637)
	at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:364)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:104)
	at com.sun.proxy.$Proxy4.get(Unknown Source)
	at org.openqa.selenium.support.events.EventFiringWebDriver.get(EventFiringWebDriver.java:163)
	at org.openqa.selenium.remote.server.handler.ChangeUrl.call(ChangeUrl.java:40)
	at org.openqa.selenium.remote.server.handler.ChangeUrl.call(ChangeUrl.java:25)
	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)

Not sure why this is happening
SeleniumServer:selenium-server-standalone-3.4.0.jar

@michelle-chiang
Copy link

michelle-chiang commented Jun 2, 2017

I'm getting the same error message, except that the program prints "Shut down Selenium server" and the html message twice. I'm using Protractor 4.0.14.

@john-patterson
Copy link

@angelblade27 @michelle-chiang Are you perhaps using this package? https://github.com/seckardt/grunt-protractor-webdriver

I have the same bug and I tracked it down to an issue in protractor_webdriver.js. When using a local standalone server this plugin tries to hit http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer, but the root now redirects to a help page.

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

No branches or pull requests

3 participants