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

ECONNRESET not handled #155

Closed
ipetrovic11 opened this issue Nov 2, 2021 · 10 comments
Closed

ECONNRESET not handled #155

ipetrovic11 opened this issue Nov 2, 2021 · 10 comments

Comments

@ipetrovic11
Copy link

We are using module https://github.com/mulesoft-labs/js-client-oauth2 which is using popsicle for requests.

ECONNRESET is not well handled with popsicle.

We tested this by using fetch instead of popsicle.

Issue is tested on Node 12+

@blakeembrey
Copy link
Member

blakeembrey commented Nov 8, 2021

What is the expected behavior of a connection reset? This library doesn't come with retries built-in, it seems like the request in the OAuth2 library could just be retried.

@ipetrovic11
Copy link
Author

Hi @blakeembrey

I don't think that we are looking for retries here.

We just don't want the application to crash(unhandledException) if ECONNRESET happens. It is not well handled.

Just as showcase we tried using the different request libraries, and for example node-fetch worked just fine.

@blakeembrey
Copy link
Member

Can you share the version and stack trace?

@blakeembrey
Copy link
Member

It might also help to provide whether it’s HTTP1 or 2, or the domain if you’re unsure and I can check.

@blakeembrey
Copy link
Member

By node 12+ does that mean you tested on a version later than 12, or just that you tested on 12 and assume it’s broken on later versions. I believe I have a node 12 related hunch that could cause this related to pipelining when this package was migrated to the native node.js utility instead of an NPM module.

@ipetrovic11
Copy link
Author

@blakeembrey you get read more info here: mulesoft-labs/js-client-oauth2#182 (comment)

We tried with Node 12, 14 ,16

@blakeembrey
Copy link
Member

OK, I think I can reproduce it. If you share the installed versions this can be confirmed, but this was fixed in April here: https://github.com/serviejs/popsicle-transport-http/releases/tag/v1.1.4. If you re-install it should have installed the latest version of that package without any issues, unless something has pinned the release specifically to 1.1.3.

@blakeembrey
Copy link
Member

Have you tried doing npm rm client-oauth2 && npm install client-oauth2 to get the latest version?

@blakeembrey
Copy link
Member

FWIW, here's the original report with the information that resolved it that matches the same bug you've pointed out: serviejs/popsicle-transport-http#8.

@ipetrovic11
Copy link
Author

@blakeembrey this could be it, I can see that in our yarn.lock file there is version 1.1.3

I will keep you posted as soon as it is tested, probably early next week.

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

No branches or pull requests

2 participants