ngrok
ngrok copied to clipboard
Tunnel doesn't always open
I'm not running multiple tunnels at the same time or anything, yet I recieve this error without further details. Using the same code I was able to open a tunnel only half the time.
Specs
- Node Version: v10.19.0
- Ngrok Version: 3.2.7
- NPM Version: 6.13.4
- Operating System: WSL (Ubuntu)
Code
const localhostOptions = {
port: 2000,
authtoken: process.env.NGROK_TOKEN
}
async function create() {
localhostURL = await ngrok.connect(localhostOptions)
.catch(err => console.error(err))
console.log('Tunnel open at ', localhostURL)
}
create();
Error
status_code: 502,
msg: 'failed to start tunnel',
details: { err: 'session closed' }
Any update on this?
{"error_code":103,"status_code":502,"msg":"failed to start tunnel","details":{"err":"session closed"}}