chuckd
chuckd

Reputation: 14600

Ngrok not working correctly

I've installed ngrok in Win 10 on a VM but I don't think it's working correctly.

To start it up and I use this command below to run it

ngrok http -host-header="localhost:44368" 44368

and it looks like ngrok starts up ok, but when I put the https url given by ngrok into a browser this is what I see

enter image description here

Shouldn't I see something?

and in the ngrok console I see the get requests but no response times or response messages

enter image description here

same with the localhost:4040 page and every get request has a 0ms response time

enter image description here

Upvotes: 8

Views: 34339

Answers (4)

veritas
veritas

Reputation: 432

My issue was the my router DNS was set to 192.168.0.1 Perhaps it doesn't find ngrok server or vice versa.

Changing my DNS to google's 8.8.8.8 fixed it. I received request on my local server from ngrok url.

Upvotes: 1

Rez.Net
Rez.Net

Reputation: 1462

As MikeDub mentioned above, I also found the exact explanation on Twilio documentation here:

https://www.twilio.com/docs/sms/quickstart/csharp-dotnet-core#allow-twilio-to-talk-to-your-aspnet-core-application-with-ngrok

which indicates removing https App Url.

Upvotes: 0

Thilina Koggalage
Thilina Koggalage

Reputation: 1084

If it is still not works for you after @MikeDub's fix, please try this. Go to properties of your startup project (api project) and untick,

Enable SSL

in Debug section.

enter image description here

Upvotes: 1

MikeDub
MikeDub

Reputation: 5283

I had the same issue running an ASP.NET Core MVC Server.

Upon lots of investigation, disabling the https url of my server seemed to work.

So essentially forcing it to only use http. I had the problem using both http and https ngrok urls.

So for my ASP.NET core project in the launchSettings.json, ensure you only have the http option, remove the https url under your desired launch profile:

"applicationUrl": "http://localhost:5001;"

Upvotes: 8

Related Questions