0

I'm seeing java.net Exception errors when running selenium tests.

Failed: java.net.SocketException: Connection reset

and

Failed: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:28686

Current setup

  • protractor: 5.4.3
  • node: 12.14.0
  • Chrome: 80.0.3987.87
  • ChromeDriver: 80.0.3987.16
  • Webdriver-manager: 12.1.7
  • Selenium-server-standalone: 3.141.59

Config = { seleniumAddress: 'http://localhost:4444/wd/hub', SELENIUM_PROMISE_MANAGER: false, capabilities: { browserName: 'chrome', chromeOptions: { args: [ "--no-sandbox", "--disable-dev-shm-usage", "--apps-keep-chrome-alive-in-tests", "--keep-alive-for-test", "--start-maximized", "--log-level=3", "--headless" , "--disable-gpu", "--window-size=1920,1080"], } }

If I use directConnect instead of the selenium server, I'm no longer seeing these errors but i can't run the test in parallel while using directConnect.

I've looked up this issue and it seems to be due to Chrome switched over to W3C support. I tried setting w3c to false in the config file as well by using 'w3c': false in the chromeOptions property but this has no affect.

I've also tried using combinations of older chrome driver/chrome versions, still seeing the errors.

  • have you tried removing the `selenuimAddress` altogether ? – Joaquin Casco Feb 05 '20 at 19:10
  • @JoaquinCasco I didn't try that but It looks like the issue is due to the default max instances that it allows. Setting sharedTestFiles: true in the config file seems to have done the trick. Even though in the source it appears to be spelled "shardTestFiles", this value doesn't work when I spell it this way. By default this is set to false which seems to prevent parallel tests. – joshua king Feb 05 '20 at 20:21

0 Answers0