Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ETIMEDOUT on running protractor tests on a remote selenoid grid #8129

Closed
baudren opened this issue Mar 23, 2020 · 4 comments
Closed

ETIMEDOUT on running protractor tests on a remote selenoid grid #8129

baudren opened this issue Mar 23, 2020 · 4 comments
Labels

Comments

@baudren
Copy link

baudren commented Mar 23, 2020

🐛 Bug Report

When running a large suite of tests from protractor v5.4.2 or 5.4.3 (so selenium-webdriver 3.6.0), I frequently get random errors that read:

ETIMEDOUT connect ETIMEDOUT xx.xx.xx.xx:443
          at ClientRequest.<anonymous> (/workdir/node_modules/selenium-webdriver/http/index.js:238:15)
          at emitOne (events.js:116:13)
          at ClientRequest.emit (events.js:211:7)
          at TLSSocket.socketErrorListener (_http_client.js:387:9)
          at emitOne (events.js:116:13)
          at TLSSocket.emit (events.js:211:7)
          at emitErrorNT (internal/streams/destroy.js:64:8)
          at _combinedTickCallback (internal/process/next_tick.js:138:11)
          at process._tickCallback (internal/process/next_tick.js:180:9)Error 

Following the recommendation found here, I added e.code === 'ETIMEDOUT' to the index.js file, and now the issue is gone.

I see that in this file you consider only ECONNRESET to be worthy of a retry. I also see that in the master branch, you expanded the list to include other error statuses, but not yet ETIMEDOUT. I guess the problem I'm facing will therefore still persist with the upcoming version 4.0.0.

Any reason why you left out ETIMEDOUT from this list?

To Reproduce

Detailed steps to reproduce the behavior:

  • have a remote grid (I guess selenium or selenoid would make no difference) deployed on the network, but not on your machine.
  • have a large set of tests
  • running those tests should from time to time display errors about ETIMEDOUT

Expected behavior

I would except the selenium library to attempt a retry in case it fails to communicate with a remote browser grid with a timeout.

Alternatively, I should have a hand on defining this timeout value to accomodate for my network conditions.

Similar tests done with a Java binding on the exact same selenoid grid (with the same chrome browser version) are working without these timeouts, so I have the impression this is a javascript only problem.

Test script or set of commands reproducing this issue

Due to the setup needed, this is more complicated to provide. Do you need something?

Environment

OS: Windows 10, Ubuntu 18.04, CentOS
Browser: Chrome (from this image and that image)
Browser version: 73.0.3683.75-1 and 80.0.3987.132-1
Browser Driver version: ?
Language Bindings version: Javascript 3.6.0
Selenium Grid version (if applicable): Moon 1.3.9

@AutomatedTester
Copy link
Member

Looking at the code adding ETIMEOUT should be fine.

@baudren
Copy link
Author

baudren commented Apr 1, 2020

Hello, thanks for the fix! Do you know which version will get this fix, and for when it's planned, roughly?

I think there's a typo in the fix on master:
https://github.com/SeleniumHQ/selenium/blob/master/javascript/node/selenium-webdriver/http/index.js#L299-L300

err.code === 'EPIPE',
err.code === 'ETIMEDOUT';

should be

err.code === 'EPIPE' ||
err.code === 'ETIMEDOUT';

right?

@AutomatedTester
Copy link
Member

AutomatedTester commented Apr 1, 2020 via email

@lock
Copy link

lock bot commented May 5, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants