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

Fixed handling ECONNRESET errors (fixes #1936) #2455

Closed

Conversation

marian-r
Copy link
Contributor

  • fixed handling of session creation errors during test case run to be reported as test errors
  • fixed retries for session creation - errors are now reported only after retry limit is reached
  • covered with test

- fixed handling of sesion creation errors during test case run to be reported as test errors
- fixed retries for session creation - errors are now reported only after retry limit is reached
@marian-r marian-r force-pushed the issue/1936-session-econnreset-fix branch from dd9f041 to aaa730d Compare July 18, 2020 15:36
@drabelo
Copy link

drabelo commented Aug 25, 2020

Whats up with this pull request? I really need this fix

@marian-r
Copy link
Contributor Author

@beatfactor by any chance, would you be able to look at this PR? It is fixing a long-lasting issue and it is covered with tests.

@beatfactor
Copy link
Member

@marian-r yes, the issue will be addressed in the next release, but in a slightly different manner, so I'm not sure yet if the PR will still be needed. But we'll see once the new version is out, which should be this week.

@marian-r
Copy link
Contributor Author

@beatfactor cool, would you be able to share more details (commit, PR, ...) so I could take a look? We are currently using my fork and the ECONNRESET errors are gone.

@beatfactor
Copy link
Member

Your PR covers these ECONNRESET errors only for the session create command, but they could arise for any type of requests, so I covered those as well (like api commands). I will push the master but the npm publish needs to wait until the docs update is done.

@VikasGhorpade
Copy link

@beatfactor When can we expect this PR to be merged and published?

@npapagna
Copy link

Hi! Any plans to integrate this fix in the short term? Thanks!

@marian-r
Copy link
Contributor Author

The maintainer of this project decided not to accept this PR and implement the fix in a different way. I am not sure what is the state of that work, but if you urgently need the fix you can replace Nightwatch version in your package.json with my branch marian-r/nightwatch#issue/1936-session-econnreset-fix. That's what I've been doing and it makes ECONNRESET errors to go away.

@beatfactor
Copy link
Member

@VikasGhorpade @npapagna @marian-r The fix is already implemented. As I mentioned earlier, this PR only addresses the errors from the session create command, but this kind of errors could arise from other commands as well, so I didn't feel this fix was completely adequate.

However, for the retries to work you first need to set timeout_options accordingly, it isn't enabled by default.

E.g.:

timeout_options: {
  {
    timeout: 15000, 
    retry_attempts: 3
  }
}

More info

We can of course look at this again if you are still seeing issues.

Base automatically changed from master to main March 11, 2021 10:56
@beatfactor beatfactor closed this May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants