Chrome / chromium dev tools hangs when trying to profile Ionic apps

I noticed that when trying to use the dev-tools profiler built into Chrome / Chromium, it hangs at the very beginning. I start it after the app has fully been loaded and the page is showing and operational, not on page reload. It just hangs forever reporting “Loading profile…”. Perhaps I did not wait long enough but I waited on the order of half an hour - it should not take that long. This issue does not seem to be related to my specific app. I tried it with the standard app created via ionic start --type=angular (sidemenu) - which replicates the issue. Dev-tools’s profiler still hangs in “Loading profile…” at the very beginning of trying to benchmark even those lightweight starter apps. This may be an angular issue, not Ionic related. I could not find anything useful to solve this issue after some searching… Any help would be greatly appreciated if anybody has solved this. Thanks!

How are you serving the app? For example, are you using http-server?

I’m serving it with ionic serve from the command line.

The Chromium version where this happens is 73.0.3683.75 (forgot to mention).

The sequence to reproduce is:

> ionic start --type=angular
? Project name: asdf
? Starter template: sidemenu
    ... finish the wizard ...
> cd asdf
> ionic serve

Now start chromium, go to localhost:8100, hit F12 to show dev-tools, go to Performance tab, hit the record button after your app has loaded and is displayed in the browser. After any number of seconds, hit the stop button.This is where things hang, seemingly forever, with a modal dialog saying “Loading profile…”.


Create a prod build, serve it using http-server and then launch the Developer Tools …

OK will try… thanks!

Unfortunately I cannot yet tell you whether the hang occurs in production because my production build fails (not sure why ionic serve works while production build complains about declaration existing in two modules, I’ll solve that one first, tried it with the sidemenu generated app but it too does not build with ionic build --prod) so I will report on whether there is a hang or not when you serve a production build, later.

You can try it with a dev built just don’t use ionic serve!

So I’ve tried this - unfortunately it still hangs the same way, even when served with http-server after an ionic build (I did not use the --prod flag). Problem remains.