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

Windows 10 process creation appears to need a time delay before attempting to create tunnels #248

Open
jamesaduncan opened this issue Sep 13, 2021 · 1 comment

Comments

@jamesaduncan
Copy link

I am, unfortunately, having to write code on Windows 10 at the moment. When I try to connect() ngrok fails:

(node:24516) UnhandledPromiseRejectionWarning: NgrokClientError at NgrokClient.request (C:\Users\James Duncan\Dev\laddr\node_modules\ngrok\src\client.js:47:23)

This seems to occur because the web server is not up and listening in time before the post to api/tunnels is fired.

With a 500ms delay after the call to spawn, everything seems to work.

@philnash
Copy link
Collaborator

Hi @jamesaduncan, this module waits 200ms between each attempt to connect and tries up to 100 times. Is there some underlying problem, like an error being thrown that isn't expected. Or are you calling connect from somewhere else? I know it's been a while since you posted this, but if you could share the code you were using, that would help.

If you worked around this or fixed it in some other way, please do let me know and I will close this issue.

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