Ngrok Error: Unable to Run Quickstart Guide

I am trying to run this particular guide: Quickstart Guide: Views & Widgets, I am getting a Ngrok tunnel link but on opening this link directly or importing it onto Monday.com, i get this particular error from Ngork:

I have tried adding the authentication token from ngrok as instructed but doesn’t seem that is helping out. Please let me know what i can do to solve this, thanks!

1 Like

Did you get the solution ?
I am also getting same error
Pls help if you had solved
Thankd

Hello @monishb,

Welcome to the community! We hope you like it here :rocket:

Could you please share the custom URL that you’re using in this case?

I got the same issue and finally solved it after 2 hours.

I installed ngrok separately on windows, ran the command to add the auth token to the default configuration file, plus the command to add my token for the session, still didn’t work. So the problem is that after running “npx @mondaydotcomorg/monday-cli scaffold run ./ quickstart-react”, the ngrok url it outputs for you is incorrect. Stop running the program now. Run “npm start”. It starts the program now. Then in your browser, type “http://localhost:4040/status”, and right under the “command_line” section, copy paste the url. You can open that url in a new tab and see you app running. And copy that url into the monday.com app url. For some reason the actual ngrok url is different than what the original output says. Or there’s some funky authentication issue. Idk why running the program with npx, makes the url live, but doesn’t recognize your credentials. So you gotta start it normally with npm to fix that issue.

@alessandra I spent 2 hours trying to figure out the issue and only now did I find it. If you could escalate this and get the monday.com devs to update the guide as multiple people are experiencing it, that would be great.

1 Like

Hi @easyascake!

Firstly, I’m really sorry you had this experience! This is not the kind of experience we want anyone to have while developing on our platform. Rest assured we are working on phasing out the use of ngrok in favor of a more user-friendly server. You should see the updated guides and projects soon as we make the updates.

Also, thank you for providing this solution to our community! We really appreciate your feedback and will be improving our guides based on it.

1 Like

There’s various problems when using ngrok which I’ve found and here’s some answers that may come in useful.

Problem 1: Installing the authtoken

On a Mac, I’d already installed ngrok using homebrew, so thought I could just add the authtoken on the command line using

ngrok authtoken ********

…where ******** is your actual authtoken.

This works fine when I run ngrok on the command line, but it seems that if you’ve used the monday
react starter, then ngrok is actually installed again in an additional place.

I tried looking, but couldn’t find it, so the easiest way I found for adding the authtoken was to update package.json:

{
  ...
  "scripts": {
    ...
    "expose": "ngrok http 8301",
    "ngrok:install:authtoken": "ngrok authtoken ********",
	...
  }
  ...
}

Then run

npm run ngrok:install:authtoken

…where ******** is your actual authtoken.

This will install the authtoken and should mean that ngrok now works nicely and behaves itself.

Don’t forget to remove the real authtoken from the file before you commit it to git :wink:

Problem 2: Persisting the same ngrok subdomain

With a free ngrok account, each time you restart the web server, you have to update the base URL in the monday.com UI. This gets tiresome quickly.

As I’d already purchased a paid ngrok plan, that allows me to persist the subdomain.

Update your package.json with your own subdomain:

{
  ...
  "scripts": {
    ...
    "expose": "ngrok http 8301 --subdomain=monday-dev-for-david",
    "expose:default": "ngrok http 8301",
	...
  }
  ...
}

I’ve renamed expose to expose:default and added my own subdomain, so that when I run:

npm run start

… I can always access my app at https://monday-dev-for-david.ngrok.io even after restarting.

I hope this helps a little.

1 Like

What I do is just deploy my code to Heroku, quick and easy!