Angular 6 App zone.js drainMicroTaskQueue infinite loop

蓝咒 提交于 2021-01-29 06:29:29

问题


I have an angular 6 app that when I run locally on my windows machine works as expected. When I clone the same repo and try to run it on my MAC, I get a browser that just seems to be 'loading' and I dont get any errors in the console.

Angular CLI: 6.0.8
Node: 9.2.0
OS: MAC HIgh Sierra
Angular: 6.0.6

Edit -> I put on console.log statements in my app component and it is hitting the console.log. SO its like the app is loading but it is not rendering even though the browser just looks like its loading

I was able to place a debugger statement to and start to debug. Turns out in zone.js there is a function drainMicroTaskQueue that gets stuck in an infinite for loop. The couple solutions online have to do with routing but Iam not convinced that its my issue

Here is a picture of the dev console on safari: (I removed socket io from my application and I still get the same issue, vendor.js is just in this infinite loading state)

Please and thanks!


回答1:


My application was making an async call infinitely, causing the app to seem to freeze up. It did not freeze on windows, but on any iOS or MAC device it wouldn't load. I removed the call and the app works fine



来源:https://stackoverflow.com/questions/53095017/angular-6-app-zone-js-drainmicrotaskqueue-infinite-loop

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!