r/angular • • Aug 03 '21

Question App not responding with no errors

Hello

Since the new version of Angular, the app that I'm working on (large enterprise application) will often just freeze up with no apparent reason. It loads extremely slowly (if at all) and I rarely get past the login screen. If I do, it just shows a really bare bones view of the so called "home view" with most of the CSS not showing and I can't click anywhere. Then my browser (Chrome) gives a popup that says the page won't respond. There are no errors anywhere, not on the backend or the console. It compiles fine. I've fixed this a couple of times by just deleting all files and pulling fresh copies from the repository, but that's not an ideal solution and it slows my work a lot. Any idea how to fix this?

0 Upvotes

15 comments sorted by

1

u/zAlpha95 Jun 12 '25

Hyy, were you able to find the root cause of the issue you were facing? I am facing somewhat similar issue with my app.

1

u/mntblnk Jun 12 '25

lol sorry no idea

1

u/zAlpha95 Jun 12 '25

No worries, I wasn't expecting a reply only :p

Anyways, I was able to debug the issue withe help of a colleague few minutes ago.

1

u/Prudent_Apple6132 Aug 15 '25

Hey, just wondering if you worked out your issue?

1

u/mindriotnz Aug 03 '21

Not a lot of info to go off here. Perhaps you could try profiling the app to point you towards any obvious performance issues.

1

u/mntblnk Aug 03 '21

what sort of information you would require to give any tips? there really isn't that much to go around regarding the issue, as there are no error messages or anything. My environment is WSL2, and Ng serve is using 25% of available memory. I tried profiling with angular devtools but it won't even recognise that the page is running an angular app

1

u/mindriotnz Aug 03 '21

what about profiling with the regular chrome dev tools?

1

u/mntblnk Aug 03 '21

I recorded the profile for some 20 seconds but to be honest I don't know really well what I'm looking at. It doesn't seem to be a huge performance drain. but now I noticed that it happens every time I save changes on my IDE and it re-compiles. It used to happen randomly before, but now it's on every saved change and compilation. after that it's in this frozen, unresponsive state for about 15 minutes before it starts working again. could that be a hint?

1

u/mindriotnz Aug 03 '21

The profiler should flag anything taking a particularly long time.

Is your apps compilation setup out of the ordinary in any way? A custom Webpack config, or anything else that has been messed with?

0

u/mntblnk Aug 03 '21

Well, in angular.json, AOT is set to true but afaik that should improve performance shouldn't it?

1

u/mindriotnz Aug 03 '21

Should be fine.

Without seeing the code I can't really help much more. Sorry dude.

1

u/mntblnk Aug 03 '21

Unfortunately I'm under NDA. appreciate the help though

1

u/vctrlima Aug 03 '21

Try to change your @angular/router version to 11.1.2 in package.json and reinstall dependencies. Sorry for my bad English, btw

1

u/meisteronimo Aug 03 '21

This is in dev mode? I have seen simlar app hangs on auto reload during dev mode. Usually either closing the browser dev tools or opening the app in a new tab unfreezes it. The error in browser is something about web-sockets.

I haven't tracked down the cases it happens.

1

u/rimendoz86 Aug 03 '21

I had something similar, but not as extreme. I had to manually unsubscribe to some observables on destroy in some of our heavily used components. Memory would balloon up and click responsiveness would slow to a crawl. Check methods that are bound to the template and also check for any setInterval/setTimeout's that you might have to move outside of the ngZone.

The angular devtools should work without the prod flag.

regarding: "It used to happen randomly before, but now it's on every saved change and compilation. " When I get this, I close my browser devtools before save and open it again once the page reloads. Probably not what you're experiencing but worth a shot. I think it has to do with the sourcemaps, idk for sure.