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

Incompatible with Node.js > 10 #29

Open
ianrenauld opened this issue Dec 4, 2020 · 2 comments
Open

Incompatible with Node.js > 10 #29

ianrenauld opened this issue Dec 4, 2020 · 2 comments

Comments

@ianrenauld
Copy link

Hi, first of all, many thanks for proxy-login-automator it is a god send for doing E2E automation with an environment available only behind a proxy that requires authentication, which Selenium can't handle at the moment. I'm sure I could find a similar big proxy tool to do that, but the convenience of being able to simply install it through npm and run it through node is truly wonderful!

Having said, that I discovered yesterday that proxy-login-automator doesn't work with Node.js LTS 12.20.0 and Node.js LTS 14.15.1. It's only working for me with Node.js version 10.x LTS.

The behavior is that proxy-login-automator starts correctly and waits for connections. As soon as some network connections are made, it errors out, with two possible outcome (Node.js 12 gives a bit more stack trace, while Node.js 14 is pretty silent about what went wrong):

We get either this error:

[LocalProxy(:8081)] OK: forward http://localhost:8081 to  to http://10.194.20.100:8080
[LocalProxy(:8081)][Incoming connection] Error: read ECONNRESET
Segmentation fault: 11

Or this one:

[LocalProxy(:8081)] OK: forward http://localhost:8081 to  to http://10.194.20.100:8080
[LocalProxy(:8081)][Incoming connection] Error: read ECONNRESET
node(7206,0x10a70adc0) malloc: can't allocate region
:*** mach_vm_map(size=7205759404062232576, flags: 40000100) failed (error code=3)
node(7206,0x10a70adc0) malloc: *** set a breakpoint in malloc_error_break to debug
libc++abi.dylib: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc
Abort trap: 6

This is on a MacBook Pro, running MacOS 10.15.7, in case this has an impact.

Node.js 10 LTS is ending maintenance in April 2021 and we are seeing more and more dependency packages start to move to newer required versions. I would hope we can get proxy-login-automator to work with Node.js 12 and 14 so I don't have to keep a spare Node.js version 10 just to run it.

@ianrenauld
Copy link
Author

For those looking for a fix to this, because it seems this package is not really maintained anymore, there is a fork from this repo that does work with Node.js 12 at least (haven't tried newer versions, but I assume they would work as well): https://github.com/carvalhonm/proxy-login-automator

@Gravityzwell
Copy link

Thanks ianrenauld, fork by carvalhonm also works with Node 14.5. Fork by yadaaut doesn't fix buffer and has a hard coded path which needs to be editted for Windows. I didn't try other forks. I'll stay with carvalhonm's fork.

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