webdriverio: I updated the selenium web driver and suddenly one test is failing.

Last night I updated selenium standalone on my machine and ran tests after it. Now it’s throwing following error and I’m not sure what causing it. When I run wdio.

java.net.SocketException: Connection reset by peer (connect failed) running chrome Error: An unknown server-side error occurred while processing the command. at Context.<anonymous> (test/specs/stats-mode.js:166:36) at Promise.F (node_modules/core-js/library/modules/_export.js:35:28) at elementIdText("0.3745145050332137-10") - getText.js:

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 18 (7 by maintainers)

Most upvoted comments

I believe this is an issue that lies with Selenium 3.5+, a simple workaround is to add the following to your wdio.conf.js file.

seleniumInstallArgs: { version: ‘3.4.0’ }, seleniumArgs: { version: ‘3.4.0’ },

This will install a working version of Selenium and all your other packages can be updated as well. This is how I worked around the issue myself and I am running the latest drivers and all which work fine with Selenium 3.4.0.

@toien44 before saying it’s still not fixed you should know that Selenium is already at version 3.7.1. I haven’t tested if this is fixed or not but it’s worth a shot to check it out. I personally am still on 3.4 and as long as that is working I do not see the problem. You are able to update your browsers, drivers and other packages etc so there’s nothing holding you back. PS: what I am trying to say is that downgrading to 3.4 does not mean that you have to revert your chromedrivers and all versions of Chrome. They can stay as they are you only have to do as described above.

@erwinheitzman seleniumInstallArgs and seleniumArgs worked like a charm. Thanks a lot.

@erwinheitzman Thank you a ton! It works like a super charm! I didn’t google to come to this after whole AM banging my head against the wall tried to figure it out but couldn’t until found this. Want to add after you modify your wdio.config.js to include selenium server version, you need to wipe out the node_modules folder to delete the current later version using ‘rm -rf node_modules’ then do ‘npm install’. then when you run wdio it would use the version you specified in the wdio.config.js

@christian-bromann We attempted upgrading selenium recently and ran into this as well. Doing some digging, it seems like this is a webdriverIO issue.

Do we have any issue/work to track fixing this in the wdio project (other than this issue) and an idea of the changes that are needed? I saw your note about throttling requests in here, is that work already complete?

@YmerejRedienhcs That’s it indeed, the wdio-selenium-standalone-service installs selenium-standalone (the npm package), which then installs Selenium itself. Running the npm install installs the wdio-selenium-standalone-service and selenium-standalone packages but since Selenium isn’t part of this it get’s installed the first time you run Webdriverio.

The folder that contains the Selenium version + the webdrivers is found in your node_modules folder: node_modules > selenium-standalone > .selenium If you remove the .selenium folder and then run Webdriverio it will recreate that folder and install the latest required drivers and the latest (or specified) Selenium version.

Hope this helps anyone else running into the same problem 😃