ngrok icon indicating copy to clipboard operation
ngrok copied to clipboard

Migrate to ngrok v3 (potentially breaking change)

Open bubenshchykov opened this issue 2 years ago • 7 comments

From ngrok PM:

I wanted to reach out and let you know about a few breaking changes that are coming for the ngrok agent v3 which will likely release next week. You can grab a copy of the ngrok agent v3 here to test with your code: https://dl.equinox.io/ngrok/ngrok-v3/stable

Installing the authtoken is now done with the command ngrok config add-authtoken TOKEN The ngrok agent only accepts long name flags prefixed with -- and will error if a single hyphen is used. When updating your scripts, ensure things like --hostname and --host-header are using double hyphens. The following command flags have changed: -auth -> --basic-auth -bind-tls -> --scheme I have no idea if this breaks anything for you, but I wanted to let you know in case you wanted to get a head start on supporting the latest ngrok agent version. You can find a rough draft of a migration guide here (still polishing): https://ngrok.com/docs/guides/upgrade-v2-v3

Please let me know if you have any questions.

bubenshchykov avatar Mar 24 '22 03:03 bubenshchykov

@philnash or other kind volunteers, can someone take a look please

bubenshchykov avatar Mar 24 '22 03:03 bubenshchykov

I'll take a look this weekend. Doesn't seem too much of a problem.

philnash avatar Mar 24 '22 04:03 philnash

Any updates on this? I recently got stuck with this problem, as I had installed ngrok 3 globally and authenticated with it, but when trying to connect with this library, it will always show I'm not authenticated. Turned out it is because ngrok2.4.0 used by this library looks for the .yml file in ~/.ngrok2 directory (which was not present as I installed ngrok3 which stores them on ~/appdata/local/ngrok directory.).

abdatta avatar May 23 '22 19:05 abdatta

Apologies, I've been busy with work and travelling recently. There is a pull request open to fix some of the ngrok 3 things but I don't know whether it helps to handle that at all. Would you be able to try installing from that branch and see if it helps?

philnash avatar May 24 '22 00:05 philnash

As I've mentioned in #272, ngrok 3 has a different download URL to ngrok 2.

This means that upgrading to ngrok 3 for this package should be a major version change which changes the URLs in download.js and also handles the new commands and new location of config files for ngrok 3.

philnash avatar Aug 16 '22 05:08 philnash

Thanks for all your work here. It looks like the PR was merged so this can be closed?

russorat avatar Apr 10 '23 20:04 russorat

The PR is merged, there's a beta version out on npm now (npm install [email protected]). I'll close this completely when a full version is released.

But check out the beta!

philnash avatar May 08 '23 00:05 philnash