-
Notifications
You must be signed in to change notification settings - Fork 317
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
RequestError: connect ECONNREFUSED 127.0.0.1:4040 #318
Comments
Bump +1 |
We're running into the same issue |
Same error here, with the same version: 5.0.0-beta.2 |
My recommendation to all at this point: check out Ngrok's official NPM package (still not in full version release yet, but has proven solid for me). Here's a working example for Sails.js: https://github.com/neonexus/sails-react-bootstrap-webpack/blob/release/ngrok.js |
Running ngrok in CI and tests have been failing consistently as of yesterday. Also on |
Ran in to the same issue and I could output a clearer, actionable error by trying to launch
That displayed an
After following those steps I could persist my
Of course, if the error is not |
Thanks @richtr !!!! |
Same issue here. I already have the token in my I created a small script to replicate the issue: //index.js
import ngrok from "ngrok";
const hostname = "localhost"
const port = 3000
const main = async () => {
try {
return await ngrok.connect({ addr: `${hostname}:${port}`, onLogEvent: data => {
console.log(data)
}, });
} catch (error) {
if (
typeof error.message === "string" &&
error.message.includes("`version` property is required")
) {
// await upgradeNgrokConfig(spinner);
try {
return await ngrok.connect(port);
} catch (retryError) {
console.log(
`Ngrok failed to create a tunnel for port ${port} after configuration upgrade.\n${retryError}`
);
return;
}
}
if (
typeof error.message === "string" &&
error.message.includes("connect ECONNREFUSED 127.0.0.1:4041")
) {
console.log(
`Ngrok failed to create a tunnel for port ${port} because ngrok is already running.\n You may want to use -t flag to use an existing URL that points to the local dev server.`
);
return;
}
console.log(`Ngrok failed to create a tunnel for port ${port}.\n${error.message}`);
return;
}
}
main() and this is the error:
But in my CLI I have the latest version, but if I assume correctly, this package doesn't use my global version but the local version installed in this package. |
Hello Team,
I occasionally encounter the following error. Could you please help me in resolving it?
Code:
The text was updated successfully, but these errors were encountered: