Selenium Error MainClientExec:103 - Connection discarded Selenium Error MainClientExec:103 - Connection discarded selenium selenium

Selenium Error MainClientExec:103 - Connection discarded


My guess is that what you are seeing is due to a maven dependency issue. I ran into a similar problem at one point where the Chrome WebDriver would just crash due to a NumberFormatException whenever we tried to access it's cookies. The root there was an incompatible transitive dependency (e.g. it needed a particular version of a dependency and our project was pulling in an older version and maven thought it was all ok). In our case the fix was to explicitly add the dependency on the correct version in our test project that was running the selenium tests. Unfortunately, I can't be more clear than that since I don't know the maven dependency structure of the projects in question. Try looking at:

mvn dependency:tree

and then check the versions of the web driver dependencies.

Also it looks like you are using chrome web driver 2.21 and chrome 51. The current chrome web driver is 2.22 and the release notes state it fixes a lot of issues with chrome 51

https://sites.google.com/a/chromium.org/chromedriver/downloads

Edit (adding): Also, not sure if the code execution is getting to perform any code at all, but it sounds like that exception can happen if the dev tools are open as that will disconnect the Chrome WebDriver from the Chrome browser.getting selenium error - disconnected: received Inspector.detached event using chrome driver version 2.20.x


As chrome releases their latest version 2.22(2016-06-06) which supports Chrome v49-52, they have fixed some areas. Changes include many bug fixes, particularly for Chrome 51+.

For change details, please refer to the notes.

They have resolved a session related issue issue#1355

So Please update your chrome driver version and use updated selenium version.