NgrokError when using Forge Tunnel

Are there any plans for a replacement for ngrok?

BTW, I am so glad I found this post as I spent hours yesterday trying to work out what was wrong with my dev environment.

On a side note, I now need to update my Forge training course on Udemy urgently as well as this will affect all of my students.

The ngrok project has been a bit unpredictable when introducing changes over the last year or so. We ran into a similar issue with Atlassian Connect Express beginning of the year.

Just as a warning, when we ran into this issue with Atlassian Connect Express, it then emerged that owners of accounts created recently were also forced to manually navigate to the ngrok URL and manually acknowledged a prompt to warn them they were accessing an ngrok site. This process is documented here: https://developer.atlassian.com/cloud/jira/platform/getting-started-with-connect/#step-4--set-up-your-local-development-environment

The warning is that the Forge CLI could be running into the same issue soon.

1 Like

any updates on this? I am facing the same problem

@JingYuan’s reply provides the current solution.

Hi everyone, here’s the new changelog for forge tunnel command. Please follow the steps from the linked doc to set up your configuration.

1 Like

So in the space of a few weeks Atlassian has told all Forge developers to use forge tunnel --ngrok-config <file> and have now killed that flag and are asking developers to use forge settings set ngrok-config-path <file>

Additionally the latest change results in an error when running forge tunnel as stated here: Cannot start a forge tunnel using ngrok

Absurd amount of collective developer time wasted on these internal decisions. Why not replace ngrok altogether?

I just checked and my tunnel connection works ok.
Did you try to add --verbose to get more info?

Here is my config

version: "2"
authtoken: blabla
connect_timeout: 30s
heartbeat_interval: 1m
heartbeat_tolerance: 5s

--ngrok-config is no longer a flag. It’s been removed in the latest CLI.

1 Like

Just updated to the latest version, make β€˜forge settings set ngrok-config-path’, all works ok.

Want to suggest maybe a strange thing but try to set runtime at the manifest (if it is not already set)

ΠΈΠ·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠ΅

1 Like

Yep runtime is the issue. Thanks mate!

@JingYuan please test the new ngrok changes using Docker (no runtime in manifest). It throws Error: Failed to start tunnel, could not establish a connection.

Additionally too in Windows it appears that the ngrok.yml file path needs to be absolute in order to work.

But also damn, just get rid of ngrok.

Seeing this same issue after the cli upgrade, ngrok file changes, and the use of runtime in the manifest. Maybe need to try the absolute path fix as well. Its completely unclear if the config file is the issue though, which is frustrating as the errors are useless and Forge team rarely updates provides statuspage updates if there is indeed an actual outage

Windows (node v18) try this @gdame:

  1. ngrok.yml
version: 2
log_level: debug
region: us
authtoken: <your-ngrok-authtoken>
  1. set absolute config path:

forge settings set ngrok-config-path "C:\foo\ngrok.yml"

  1. update manifest.yml
app:
  runtime:
    name: nodejs18.x
  1. run it (no Docker needed)

forge tunnel

1 Like

Update on the solution: please use forge settings to provide the ngrok config. It should work on both old and new runtimes. If it doesn’t:

  • ensure you don’t have any other ngrok processes
  • post the ngrok output from forge tunnel --verbose

Thank you for your patience as we’re working towards a better tunnel experience (more explanations in the other thread)!

1 Like

Got it working finally. Adding region to the ngrok config appears to have β€˜fixed’ it. :man_shrugging:

I’ve done exactly what Nathan suggested and up until Saturday morning (Sydney time) things were working. I’m now getting the following error:

@IanBradley this looks like another problem not related to the tunnel, can you please start a new topic if this persists? The error message looks like an unstable network connection though, you might have gotten unlucky that particular time.

Hi All,
As the problem outlined in the original post is now solved, I’m locking this thread. Please, continue to create new topics for specific questions using the Forge Tunnel and / or ngrok tag.
Thanks!

1 Like