giorgiosironi / phpunit-selenium

Selenium RC integration for PHPUnit
http://www.phpunit.de/
Other
600 stars 271 forks source link

Bad Request error #274

Open Venorcis opened 11 years ago

Venorcis commented 11 years ago

When running any PHPUnit Selenium2TestCase on my Linux server (using latest firefox/xvfb combination and of course fully up-to-date selenium/phpunit/phpunit-selenium), I instantly get the following error: "PHPUnit_Extensions_Selenium2TestCase_WebDriverException: Bad request Command duration or timeout: 30 milliseconds Build info: version: '2.37.0', revision: 'a7c61cb', time: '2013-10-18 17:14:00' System info: host: 'intern.chainels.com', ip: '176.58.112.133', os.name: 'Linux', os.arch: 'i386', os.version: '3.11.6-x86-linode54', java.version: '1.7.0_45' Driver info: org.openqa.selenium.firefox.FirefoxDriver"

I cannot find any other error information, and the created firefox process remains running. Moreover, exactly the same tests using exactly the same versions of everything but then on Windows does work like expected.

How can I solve this error or get more information on the exception? Thanks in advance for any help!

giorgiosironi commented 11 years ago

You should take a look at the log of the java process that starts the selenium-server.jar. It can also be started with debug/verbose options IIRC.

On Mon, Nov 18, 2013 at 3:26 PM, Venorcis notifications@github.com wrote:

When running any PHPUnit Selenium2TestCase on my Linux server (using latest firefox/xvfb combination and of course fully up-to-date selenium/phpunit/phpunit-selenium), I instantly get the following error: "PHPUnit_Extensions_Selenium2TestCase_WebDriverException: Bad request Command duration or timeout: 30 milliseconds Build info: version: '2.37.0', revision: 'a7c61cb', time: '2013-10-18 17:14:00' System info: host: 'intern.chainels.com', ip: '176.58.112.133', os.name: 'Linux', os.arch: 'i386', os.version: '3.11.6-x86-linode54', java.version: '1.7.0_45' Driver info: org.openqa.selenium.firefox.FirefoxDriver"

I cannot find any other error information, and the created firefox process remains running. Moreover, exactly the same tests using exactly the same versions of everything but then on Windows does work like expected.

How can I solve this error or get more information on the exception? Thanks in advance for any help!

— Reply to this email directly or view it on GitHubhttps://github.com/sebastianbergmann/phpunit-selenium/issues/274 .

Giorgio Sironi (@giorgiosironi) http://giorgiosironi.com http://giorgiosironi.blogspot.com/

Venorcis commented 11 years ago

The selenium server log gives me this large and unhelpful (to me) output: "10:29:22.831 WARN - Exception thrown java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException Build info: version: '2.37.0', revision: 'a7c61cb', time: '2013-10-18 17:14:00' System info: host: 'intern.chainels.com', ip: '176.58.112.133', os.name: 'Linux', os.arch: 'i386', os.version: '3.11.6-x86-linode54', java.version: '1.7.0_45' Driver info: driver.version: unknown at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:188) at org.openqa.selenium.remote.server.DefaultSession.execute(DefaultSession.java:176) at org.openqa.selenium.remote.server.DefaultSession.(DefaultSession.java:112) at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:89) at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:104) at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:63) at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:205) at org.openqa.selenium.remote.server.JsonHttpRemoteConfig.handleRequest(JsonHttpRemoteConfig.java:192) at org.openqa.selenium.remote.server.DriverServlet.handleRequest(DriverServlet.java:201) at org.openqa.selenium.remote.server.DriverServlet.doPost(DriverServlet.java:167) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.openqa.selenium.remote.server.DriverServlet.service(DriverServlet.java:139) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.openqa.jetty.jetty.servlet.ServletHolder.handle(ServletHolder.java:428) at org.openqa.jetty.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:677) at org.openqa.jetty.jetty.servlet.ServletHandler.handle(ServletHandler.java:568) at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526) at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479) at org.openqa.jetty.http.HttpServer.service(HttpServer.java:914) at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820) at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986) at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837) at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243) at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:357) at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:534) Caused by: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException Build info: version: '2.37.0', revision: 'a7c61cb', time: '2013-10-18 17:14:00' System info: host: 'intern.chainels.com', ip: '176.58.112.133', os.name: 'Linux', os.arch: 'i386', os.version: '3.11.6-x86-linode54', java.version: '1.7.0_45' Driver info: driver.version: unknown at org.openqa.selenium.remote.server.DefaultDriverFactory.callConstructor(DefaultDriverFactory.java:72) at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:56) at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:215) at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:169) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.openqa.selenium.remote.server.DefaultDriverFactory.callConstructor(DefaultDriverFactory.java:62) ... 8 more Caused by: org.openqa.selenium.UnsupportedCommandException: Bad request

Command duration or timeout: 286 milliseconds Build info: version: '2.37.0', revision: 'a7c61cb', time: '2013-10-18 17:14:00' System info: host: 'intern.chainels.com', ip: '176.58.112.133', os.name: 'Linux', os.arch: 'i386', os.version: '3.11.6-x86-linode54', java.version: '1.7.0_45' Driver info: org.openqa.selenium.firefox.FirefoxDriver at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:111) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:197) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:190) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:108) ... 13 more 10:29:22.848 WARN - Exception: Bad request"

The output of my original post was already done using verbose and/or debug settings

Venorcis commented 10 years ago

I have just updated to Selenium Server 2.38 (on CentOS 6.5 x86), but the problem persists. Any help would be much appreciated! -Vincent

PS. Some more stack trace that might help: 18:48:05 [exec] Stack trace: 18:48:05 [exec] #0 /usr/share/pear/PHPUnit/Extensions/Selenium2TestCase/Driver.php(72): PHPUnit_Extensions_Selenium2TestCase_Driver->curl('POST', Object(PHPUnit_Extensions_Selenium2TestCase_URL), Array) 18:48:05 [exec] #1 /usr/share/pear/PHPUnit/Extensions/Selenium2TestCase/SessionStrategy/Isolated.php(67): PHPUnit_Extensions_Selenium2TestCase_Driver->startSession(Array, Object(PHPUnit_Extensions_Selenium2TestCase_URL)) 18:48:05 [exec] #2 /usr/share/pear/PHPUnit/Extensions/Selenium2TestCase.php(244): PHPUnit_ExtensionsSelenium2TestCase in /usr/share/pear/PHPUnit/Extensions/Selenium2TestCase/Driver.php on line 143

Venorcis commented 10 years ago

And again this issue persist with Selenium 2.40. Any help would be much appreciated!

deepsheera commented 9 years ago

I am also getting same issue with Selenium 2.45. Any help would be much appreciated!