ngrok icon indicating copy to clipboard operation
ngrok copied to clipboard

Tunnel doesn't always open

Open JonathanSouthern opened this issue 4 years ago • 1 comments

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' }

JonathanSouthern avatar Apr 01 '20 20:04 JonathanSouthern

Any update on this?

{"error_code":103,"status_code":502,"msg":"failed to start tunnel","details":{"err":"session closed"}}

Nabute avatar May 23 '23 14:05 Nabute