Skip to content

Causes projects with the got package to fail with RequestError: connect ECONNREFUSED 127.0.0.1:443 #489

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

Closed
danwkennedy opened this issue May 22, 2020 · 2 comments
Labels
needs investigation An issue that has more questions to answer or otherwise needs work to fully understand the issue

Comments

@danwkennedy
Copy link

Description

If this package is loaded along with the got request library, requests will fail with the following error:
RequestError: connect ECONNREFUSED 127.0.0.1:443

Reproduction

You can install and run the following gist for a repro:
https://gist.github.com/danwkennedy/17c82801f19aa57a96615df2dffb4484

It looks like this lib might patch something in the http/https libraries that causes a break with got. Similar to this issue:
sindresorhus/got#951

Environment

Please provide the following:

  • Version of this library used: ^2.25.1
  • Version of the platform or framework used, if applicable: Node v14.2.0
  • Other relevant versions (language, server software, OS, browser): MacOs 10.15.4
  • Other modules/plugins/libraries that might be involved: got@^11.1.4
@mick703
Copy link

mick703 commented Aug 3, 2020

I experienced the similar errors from Got when Auth0 package is loaded BEFORE Got is loaded. That happened when using shopify-api-node which uses Got as its HTTP library. The error message was confusing, RequestError: Unexpected token < in JSON at position 0 in xxxxxx

I was using nestjs DI in modules to inject Auth0 client and hit this error. It took me some time to figure out. A workaround I tested working was to load the Auth0 lib AFTER Got is loaded. This is not ideal and I wonder if there is a proper fix.

@jimmyjames jimmyjames added the needs investigation An issue that has more questions to answer or otherwise needs work to fully understand the issue label Aug 4, 2020
@jimmyjames
Copy link
Contributor

This is the same issue as #490; closing this issue and you can follow the discussion there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation An issue that has more questions to answer or otherwise needs work to fully understand the issue
Projects
None yet
Development

No branches or pull requests

3 participants