Skip to content

Takes a minute to start #159

@slavafomin

Description

@slavafomin

SDK Version

1.4.1

What happened?

The library takes a lot of time to start.

Consider the following script:

import ngrok from '@ngrok/ngrok';

ngrok.consoleLog('TRACE');

try {

  const listener = await ngrok.forward({
    addr: '8080',
    authtoken: '…',
  });

  console.log(listener.url());

} catch (error) {

  console.error(error);

}

I'm getting the following log output:

DEBUG log - add_parsable_certificates processed 1 valid and 0 invalid certs

(HANGS HERE FOR A LONG TIME)

DEBUG log - No cached session for DnsName("connect.ngrok-agent.com")
DEBUG log - Not resuming any session
DEBUG log - Using ciphersuite TLS13_AES_128_GCM_SHA256
DEBUG log - Not resuming
DEBUG log - TLS1.3 encrypted extensions: []
DEBUG log - ALPN protocol is None
DEBUG muxado::heartbeat - sending heartbeat
DEBUG muxado::heartbeat - waiting for response
DEBUG muxado::heartbeat - got response
DEBUG ngrok::internals::raw_session - decoded rpc response
INFO ngrok_javascript::session - Session created "", with auth token
DEBUG muxado::typed - read stream type
DEBUG muxado::stream_manager - got none from stream, trying to send a fin
DEBUG muxado::stream_manager - removing stream and sending fin
DEBUG ngrok::internals::raw_session - decoded rpc response
INFO ngrok_javascript::listener - Created listener "" with url "https://xxx.ngrok-free.app"
DEBUG muxado::stream_manager - got none from stream, trying to send a fin
DEBUG muxado::stream_manager - removing stream and sending fin
https://xxx.ngrok-free.app
Error logging to javascript function: Error { status: GenericFailure, reason: "Closing", maybe_raw: 0x0 }

I'm running it under Linux. The ngrok binary (installed from apt) works fine if I use it directly.

What could be the reason for this? Thank you.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions