sammachin / node-red-contrib-ngrok

ngrok node for node-red
MIT License
7 stars 10 forks source link

Update ngrok package to 5.0.0 #30

Closed jchcc closed 9 months ago

jchcc commented 11 months ago

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

sammachin commented 11 months ago

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 commented 11 months ago

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 commented 11 months ago

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

twocolors commented 11 months ago

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

sammachin commented 11 months ago

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 commented 11 months ago

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 commented 11 months ago

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 commented 11 months ago

@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 commented 11 months ago

No, Ngrok is not locally installed on my pi as far as I can determine. It doesn't recognise ngrok as a command (with or without sudo). In the pi director there are two relevant sub directories, .ngrok1 that has 2 compressed files, and .ngrok2 that has at least the configuration file I edited.

Both fields in the ngrok configuration node are filled. Not checked if the authtoken are the same, but I have only ever had one.

On Tue, 2 Jan 2024, 20:27 Sam Machin, @.***> wrote:

@WombatHollow https://github.com/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?

— Reply to this email directly, view it on GitHub https://github.com/sammachin/node-red-contrib-ngrok/issues/30#issuecomment-1873782661, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGDP7BR3WVJR6QFAEK7ZM63YMPHH3AVCNFSM6AAAAABAUBGGBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZTG44DENRWGE . You are receiving this because you were mentioned.Message ID: @.***>

grawsom commented 11 months ago

@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 commented 11 months ago

Ok. On Rpi the .yml file was in pi/.ngrok2 directory, the big zip file (2 of) were in .ngrok1 directory. Maybe mine is different as I update the node (through pallette) rather than new Install.

At least works in all 3 environments, some may need the .yml update but that will be a clear from the error in the NR log (but not on debug pane).

Anyway, thanks again.

On Wed, 3 Jan 2024, 00:33 Ivan Sørensen, @.***> wrote:

@sammachin https://github.com/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

— Reply to this email directly, view it on GitHub https://github.com/sammachin/node-red-contrib-ngrok/issues/30#issuecomment-1874031538, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGDP7BSSFAVZXQRCLD6BOBDYMQEBLAVCNFSM6AAAAABAUBGGBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZUGAZTCNJTHA . You are receiving this because you were mentioned.Message ID: @.***>

node-red-italia commented 11 months ago

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 commented 11 months ago

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 commented 11 months ago

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 commented 11 months ago

If you go into the pi command line and type node-red-log, you can then see you logs.

Or

At command line stop and start node red with node-red-stop node-red-start

Then it will start and display logs (don't ctrl-c to get back to command line), once started go back to NR Web interface and initiate a on command, check log for response.

On Fri, 5 Jan 2024, 00:47 node-red-italia, @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/sammachin/node-red-contrib-ngrok/issues/30#issuecomment-1877121286, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGDP7BSTPOJCGCEV5HIELKLYM2XF5AVCNFSM6AAAAABAUBGGBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZXGEZDCMRYGY . You are receiving this because you were mentioned.Message ID: @.***>

node-red-italia commented 10 months ago

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

sammachin commented 9 months ago

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