Ngrok issue ERR_NGROK_6022

I’m having an issue with ngrok forwarding and able to run the plugin in Jira cloud.
From the http://localhost:4040/inspect/http I get 200 OK on GET request for /hello-world.
However when I try to visit the [https://cb42------106-138.ngrok.io] is showing me the following error: ERR_NGROK_6022.
And on Atlassian JIRA cloud the app is listed but when I try to run it gets the following error:
"Something’s gone wrong

Our team has been notified. If the problem persists, please contact Atlassian Support."

Troubleshooting steps taken:

  1. Uninstall and install ngrok version 3.0.3
  2. Install new atlas-connect new -t jira app
  3. Revoke and create new accounts in ngrok dashboard
  4. Disabled firewall
  5. grok diagnose
    Testing ngrok connectivity…

Internet Connectivity
Name Resolution [ OK ]
TCP [ OK ]
TLS [ OK ]
Ngrok Connectivity
Name Resolution [ OK ]
TCP [ OK ]
TLS [ OK ]
Tunnel Protocol [ OK ]

Successfully established ngrok connection! (region: ‘eu’, latency: 42.94032ms)

I’m trying to run just hello-world jira app with connect. None of the above solved the problem.
Running a MacOS Monterey.
Do I need to upgrade my ngrok account or I’m doing something wrong?

Any help is appreciated. :pray:

This definitely leads me to believe this is an issue with how your ngrok account is configured: ERR_NGROK_6022 | ngrok documentation.

And, just to confirm, you’ve followed these steps? What are ngrok Secure Tunnels? | ngrok documentation

Yes, every single bit - step-by-step. Tried several times to delete and create a new account. Name it. As you can see from the troubleshooting steps I considered all aspects. But still not working. I even think should I get the paid subscription?
Or maybe should setup new account with different email. :crossed_fingers:t3:

Any suggestions are more than welcome.

For me it helps to move the ngrok config from ~/Library/… to ~/.ngrok/.

1 Like

In case anyone like me reaches this page while having the same problem:
image

What I did to fix it was:

  • Opened ngrok page: https://dashboard.ngrok.com/
  • Created one account
  • Checked my AuthToken
  • Registered my AuthToken using the command ngrok authtoken <your AuthToken here>
  • Worth check that this command will create a yaml file at %HOMEPATH%\.ngrok2
  • Back to the folder where the hello world plugin is installed, ran npm install & npm start again
  • Created a new page (had to have a different page name) and now the plugin appears differently.
  • You have to scroll down and click “visit site”
  • Finally…

I ran into this problem. I have signed up for an ngrok account and setup the auth token using the CLI.
I’d recommend running the following debugging steps:

  • Login into the ngrok portal to see if your endpoints are listed when your server starts up (ngrok - Online in One Line)
  • If you see your tunnel there, then my solution wont work for you. If your tunnel is not shown in that list, but the Atlassian app logs that it has started a tunnel it means, that the ngrok library used by the Atlassian app is unable to read your auth token from your file system to be able to associate the tunnel with your id. Without this, the tunnel wont allow external traffic to come to your local machine and you get the ERR_NGROK_6022 error.

If you goto the github page for this library , the config section shows that the file must reside at the following locations:

OS X /Users/example/.ngrok2/ngrok.yml
Linux /home/example/.ngrok2/ngrok.yml
Windows C:\Users\example.ngrok2\ngrok.yml

For some reason the ngrok set auth token command creates the ngrok.yaml file in a different location (/Users/user/Library/Application\ Support/ngrok/ngrok.yml for me). I copied this file over to ~/.ngrok2 folder and restarted my app and it started working totally fine. I can verify that the ngrok portal shows my tunnel once i startup the Jira app.

2 Likes

@PrasadPrabhu1 In your system, you might have multiple binaries of ngrok (one installed globally and other one is installed by the ACE framework inside the node_modules directory).

I was also facing the same issue and wrote an article to resolve this ngrok 6022 error. This may be helpful for others.
https://optimizory.atlassian.net/l/cp/eghqELAA

2 Likes

I can confirm @DheerajKumarAggarwal 's article.

I navigated to the npm ngrok module in my plugin directory at

.../node_modules/ngrok/bin

From there I ran:

ngrok authtoken <AUTH_TOKEN>

That command created a new folder in my user folder:

Users/<username>/.ngrok2

In there, the command placed the ngrok.yaml file with my token. After that, I ran npm start again and the plugin loaded fine.
All I had to do afterwards on my Confluence page where the macro was loaded, was to confirm that I want to load content from that ngrok source.

3 Likes