Ngrok: Slow network activity in Angular-CLI using ngrok

Created on 3 Mar 2018  路  5Comments  路  Source: inconshreveable/ngrok

I created a project in Angular and soon after I tried to execute by the random URL generated by ngrok, but when accessed Developer Tools (Network) seen that the .js files are loading very slowly and it takes a long time to render the page data in the Google Chrome browser .

My internet connection is unstable and running fast to load even sites with enough content.

What could be happening?

Command used for installation: npm install ngrok -g

Node: 8.9.4
Angular CLI: 1.6.8
ngrok version 2.2.8

Cmd1:
ng serve

Cmd2:
ngrok http -host-header=rewrite site.dev:80

_11 requets | 7.1 mb transferred | Finish: 3.3min | DOMContentLoaded: 2.3 min | Load: 2.3 min_

Most helpful comment

Hello @ricardoasc, I tried running the ng serve on prod environment by disabling the host check option and it worked,
Cmd1:
ng serve --prod --host 0.0.0.0 --disable-host-check.
and tried using ngrok with the following solution
Cmd2:
ngrok http {your port} -host-header="localhost:{your port}"

All 5 comments

Hello @ricardoasc, I tried running the ng serve on prod environment by disabling the host check option and it worked,
Cmd1:
ng serve --prod --host 0.0.0.0 --disable-host-check.
and tried using ngrok with the following solution
Cmd2:
ngrok http {your port} -host-header="localhost:{your port}"

Even with the production build and running as you described, even a blank page is taking a long time to load, the problem is the delay in rendering the page in the Browser.

Continue to load page slowly ...

Hello, there!, I have the same issue a Blank Page in the forwarding ngrok url and I'm getting a "ERR_CONTENT_LENGTH_MISMATCH" when the browser requests the bundles,I think it is due to my slow connection the timeout happend after 5 seconds waiting for the response, Maybe increasing the waiting time or timeout time in nodejs or webpack could help.

Tengo el mismo problema

Same issue for me. Why did the developers can't fix this issue

Was this page helpful?
0 / 5 - 0 ratings