nightwatchjs / nightwatch

Integrated end-to-end testing framework written in Node.js and using W3C Webdriver API. Developed at @browserstack
https://nightwatchjs.org
MIT License
11.79k stars 1.31k forks source link

selenium grid-server exception during attempt to send DELETE request #32

Closed davidlinse closed 10 years ago

davidlinse commented 10 years ago

When running the following test against a selenium grid-hub/ -node setup the browser stays open and the selenium-hub logs the an exception.

 module.exports = {
    'should simply open and close': function (browser) {
        browser
          .url('http://github.com/beatfactor/nightwatch')
          .pause(1000)
          .end();
    }
 };

For the log output of the selenium-hub and nightwatch (with --verbose option) these two gits selenium-hub.log and nightwatch.log

Versions: (OSX 10.6.8)

$ node --version #=> 0.10.21
$ selenium-server-standalone.2.39.0.jar

Running nightwatch version: v0.3.1 (d942ed9)

If you need further infos please let me know. regards ~david

beatfactor commented 10 years ago

I'll look into it, but at a first glance this looks like a selenium exception.

traviscosgrave commented 10 years ago

I can confirm this is happening with the same set up as @davidlinse. Makeing the same change as suggested does not seem to have any impact.

beatfactor commented 10 years ago

could you give me some info on how to reproduce this? thanks.

davidlinse commented 10 years ago

@beatfactor what other infos do you need ?

regards ~david

traviscosgrave commented 10 years ago

@beatfactor Looking at @davidlinse logs, I experienced the same error message, and updating the empty string to and empty JSON object '{}' has fixed the problem.

We are running tests written in NightwatchJS against a Jenkins server with the Selenium Plugin (updated to 2.39.0) which then hands the tests off to a Windows XP VM running Chrome and IE8. Watching the request, I can see Nightwatch send the DELETE or POST, the Selenium Hub receives the message with data: and throws the error that @beatfactor has attached. The node never sees the request as the error is thrown by Selenium Hub (Grid2?).

If there's anything else I can help provide, please let me know. Until then, we'll be modifying line 22 of request.js.

beatfactor commented 10 years ago

I would like to try and replicate your setup. I don't have much experience with the grid-server.

On Fri, Feb 21, 2014 at 10:25 PM, David Linse notifications@github.comwrote:

@beatfactor https://github.com/beatfactor what other infos do you need ?

regards ~david

Reply to this email directly or view it on GitHubhttps://github.com/beatfactor/nightwatch/issues/32#issuecomment-35775243 .

davidlinse commented 10 years ago

I've setup a demo branch davidlinse/nightwatch@2a543c197 hope this helps.. Let me know if you need more infos.

beatfactor commented 10 years ago

thanks, I'll look into this.

davidlinse commented 10 years ago

i guess, this could be closed as well now ?

beatfactor commented 10 years ago

did the content-length header fix this also?

disciplezero commented 10 years ago

I had this issue previously and it was fixed by this commit. --  Chris Egner

On March 21, 2014 at 2:57:15 PM, David Linse (notifications@github.com) wrote:

i guess, this could be closed as well now ?

— Reply to this email directly or view it on GitHub.

brownad commented 10 years ago

I've retested this, works great.

beatfactor commented 10 years ago

alright, then let's close it.