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

Failing unit test in Node 10+ (connection timeout) #75

Closed
jancurn opened this issue Sep 7, 2019 · 2 comments
Closed

Failing unit test in Node 10+ (connection timeout) #75

jancurn opened this issue Sep 7, 2019 · 2 comments

Comments

@jancurn
Copy link

jancurn commented Sep 7, 2019

The unit test of the https-proxy-agent package fails on Node 10+:

  1) HttpsProxyAgent "http" module should work over an HTTP proxy:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
  
  2) HttpsProxyAgent "http" module should work over an HTTPS proxy:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
  
  3) HttpsProxyAgent "after all" hook:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

I suspect this is related to the following change introduced in Node 10: nodejs/node#19981

Unfortunately, this issue makes it impossible to use web sockets over HTTPS proxy, since that depends on https-proxy-agent. For example, unit tests of https://github.com/apifytech/proxy-chain fail for this reason (see https://github.com/apifytech/proxy-chain/blob/master/test/server.js#L612)

@jancurn
Copy link
Author

jancurn commented Sep 7, 2019

For a reference: As a workaround, rather than using ws + https-proxy-agent package to connect web socket via HTTPS proxy, one can use the faye-websocketpackage.

@TooTallNate
Copy link
Owner

Fixed by #73.

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