Skip to content
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

Update ngrok package to 5.0.0 #30

Closed
jchcc opened this issue Dec 14, 2023 · 17 comments
Closed

Update ngrok package to 5.0.0 #30

jchcc opened this issue Dec 14, 2023 · 17 comments

Comments

@jchcc
Copy link

jchcc commented Dec 14, 2023

All ngrok agents version 3.1 and older will stop working on January 15th, 2024 for all free users.

@sammachin
Copy link
Owner

yes I got the email this morning too, I'll look at doing the update over the christmas break, first glance it look like a little more than just updating the package.json as some of the APIs have also changed

@Phil-b-l
Copy link

Thank you that would be really appreciated. And thanks very much for creating the Node in the first place it has proved incredibly valuable on a mobile connection with no public ip address.

@grawsom
Copy link

grawsom commented Dec 18, 2023

@sammachin And if you need help in testing - I will gladly help where I can

@twocolors
Copy link
Contributor

@sammachin mb use https://ngrok.github.io/ngrok-javascript/ ?

@sammachin
Copy link
Owner

I've just published 2.1.0 of the package, this uses the 5.0.0-beta.2 release of node ngrok, the areas that have been changed are the binding and the auth so if you use those features especially please test and report back.

I'm not totally sure how this will handle upgrading existing clients with config files in place if you have any issues please raise an issue and mention your OS and if you have ngrok installed directly as well as part of the package, I think you may need to remove the ngrok config file if its there from an older version.

It also looks like ngrok have stopped allowing unregistered access so you will need to register and set an auth token if you didn't previously, there's a free tier though.

Ideally I would like to replace this with the official ngrok pacakge as mentioned by @twocolors but thats a lot more work and basically means rewriting the node, I'll consider a 3.0.0 release using that package especially if node ngrok gets deprecated, however I'm not really using ngrok much day to day now in my work and ngrok wern't very forthcoming on giving me a discount on my renewal last year for maintaining this package so its not top of my priorities.

@twocolors
Copy link
Contributor

hi thanks for the update

@sammachin If you don’t want to support this module anymore or don’t have time, pass it to me (maintenance npm).

For example, I'm interested in supporting native integration

@WombatHollow
Copy link

Thanks for quick update, but I am afraid it is only part functional. To summarise
You will to (on a Raspi)

  1. nano /home/pi/.ngrok2/ngrok.yml
  2. add a line version : 1
  3. exit and save the file (no filename change)
  4. should run, no need to restart NR

More Detail
I just installed the update to my existing NGROK nodes, the node didn't report any issues with the old data, but sending a msg.payload = "on" produced Nothing and leaves the node on idle state. Sending a msg.payload = "off" produced the expected response and leaves the node on disconnected state. A subsequent "on" was no different than the first.
I opened and forced changes in both NGROK nodes and redeployed but no change.

But in the Log I see
Connect error: ERROR: Error reading configuration file '/home/pi/.ngrok2/ngrok.yml': versionproperty is required. ERROR: ERROR: If you're upgrading from an older version of ngrok, you can run: ERROR: ERROR: ngrok config upgrade ERROR: ERROR: to upgrade to the new format and add the version number.
ngrok doesn't run but the above .yml file exists and only contains the authtoken

I edited it with nano and added a line version : 1

that fixes it.

My system
NR 3.1.0
NPM 18
Raspi 3B running latest Raspian as of a few months ago

@sammachin sammachin reopened this Jan 2, 2024
@sammachin
Copy link
Owner

@WombatHollow thanks for the report, yeah I thought there might be something like that, 2 questions:

Did you have ngrok installed locally on the pi as well as the NR package?

Do you have an authtoken specified in the Node-RED ngrok config node?

@WombatHollow
Copy link

WombatHollow commented Jan 2, 2024 via email

@grawsom
Copy link

grawsom commented Jan 2, 2024

@sammachin - here is my feedback, so far
I have now tested on 3 different instances, docker (NR), Raspberry Pi 3b+, Windows 11.
I use token on all instances (free)

Docker was 2.0.1 did update to 2.1.0 - NP, stille working as exspected.

RPI - new install - default settings, only added the token - working fine with stting to use localhost (NR) - using with buttom, and then copying url.

Win 11 - was updated to 2.1.0 , and is still working fine.

My yml on eg. Win11 only have the token inside.
RPI - no yml, but 8MB zip file :-)

System
Synology NAS (Docker), RPI and windows NR 3.1.3

@WombatHollow
Copy link

WombatHollow commented Jan 2, 2024 via email

@node-red-italia
Copy link

Thanks for quick update, but I am afraid it is only part functional. To summarise You will to (on a Raspi)

  1. nano /home/pi/.ngrok2/ngrok.yml
  2. add a line version : 1
  3. exit and save the file (no filename change)
  4. should run, no need to restart NR

More Detail I just installed the update to my existing NGROK nodes, the node didn't report any issues with the old data, but sending a msg.payload = "on" produced Nothing and leaves the node on idle state. Sending a msg.payload = "off" produced the expected response and leaves the node on disconnected state. A subsequent "on" was no different than the first. I opened and forced changes in both NGROK nodes and redeployed but no change.

But in the Log I see Connect error: ERROR: Error reading configuration file '/home/pi/.ngrok2/ngrok.yml': versionproperty is required. ERROR: ERROR: If you're upgrading from an older version of ngrok, you can run: ERROR: ERROR: ngrok config upgrade ERROR: ERROR: to upgrade to the new format and add the version number. ngrok doesn't run but the above .yml file exists and only contains the authtoken

I edited it with nano and added a line version : 1

that fixes it.

My system NR 3.1.0 NPM 18 Raspi 3B running latest Raspian as of a few months ago

hi, I'm in the same situation, I have install only the node by node-red palette. I have try your suggestion.

NR3.1.3
NPM18
OS Ubuntu 20.04LTS

@WombatHollow
Copy link

Thanks for quick update, but I am afraid it is only part functional. To summarise You will to (on a Raspi)

  1. nano /home/pi/.ngrok2/ngrok.yml
  2. add a line version : 1
  3. exit and save the file (no filename change)
  4. should run, no need to restart NR

More Detail I just installed the update to my existing NGROK nodes, the node didn't report any issues with the old data, but sending a msg.payload = "on" produced Nothing and leaves the node on idle state. Sending a msg.payload = "off" produced the expected response and leaves the node on disconnected state. A subsequent "on" was no different than the first. I opened and forced changes in both NGROK nodes and redeployed but no change.
But in the Log I see Connect error: ERROR: Error reading configuration file '/home/pi/.ngrok2/ngrok.yml': versionproperty is required. ERROR: ERROR: If you're upgrading from an older version of ngrok, you can run: ERROR: ERROR: ngrok config upgrade ERROR: ERROR: to upgrade to the new format and add the version number. ngrok doesn't run but the above .yml file exists and only contains the authtoken
I edited it with nano and added a line version : 1
that fixes it.
My system NR 3.1.0 NPM 18 Raspi 3B running latest Raspian as of a few months ago

hi, I'm in the same situation, I have install only the node by node-red palette. I have try your suggestion.

NR3.1.3 NPM18 OS Ubuntu 20.04LTS

And did that fix it or you still have problem?

@node-red-italia
Copy link

No, the ON or True command has no effect, the "off" or "False" command correctly disconnects. I don't know how to recover the log you mentioned.

Thanks

@WombatHollow
Copy link

WombatHollow commented Jan 4, 2024 via email

@node-red-italia
Copy link

Yes, on node-red log I haven't messagge for ngrok.

@sammachin
Copy link
Owner

versions 3.0.2 has now been published and uses the new ngrok-javascript client,
Going forward none of the older versions will be supported so please update to 3.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants