Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ngrok net::ERR_CONTENT_LENGTH_MISMATCH errors

I'm trying to set up an ngrok tunnel to a locally run webserver serving on port 5000. I can access the website fine over localhost:5000, but when I set up an ngrok tunnel on port 5000 I get net::ERR_CONTENT_LENGTH_MISMATCH errors on all of the css and js resources in Chrome 46.0 and Safari 9.0.1.

I do not get these errors when accessing the ngrok link from Firefox 42.

Does anyone know why this is happening, and what I might do to fix it?

like image 642
Andrew Avatar asked Nov 11 '15 20:11

Andrew


People also ask

Why is my Ngrok not working?

Have you tried following a tutorial that uses Ngrok and could not make it work? The reason is likely that Ngrok has recently added some restrictions to its service, making the instructions that you find in a lot of tutorials incorrect for current versions of the tool.

What is Ngrok used for?

ngrok is a cross-platform application that enables developers to expose a local development server to the Internet with minimal effort. The software makes your locally-hosted web server appear to be hosted on a subdomain of ngrok.com, meaning that no public IP or domain name on the local machine is needed.


1 Answers

I've resolved this issue just with adding lines bellow in devServer config. So I've changed default express timeout, turned on compression and added proxy. Maybe this will help someone...

keepAliveTimeout: 120000 * 5,
compress: true,
// Set this if you want to enable gzip compression for assets
proxy: {
  '**': 'http://localhost:8080'
}
like image 55
Nikola Spalevic Avatar answered Oct 20 '22 03:10

Nikola Spalevic