We're using Bugsnag and randomly I see this error in our logs
We're on Angular 6.1.1, and we're using production build with optimization and build-optimization enabled. Using zone.js 0.8.26 which is currently latest version.
How can I debug this?
The most common source for this error is infinite recursion. You must have a recursive function in your code whose base case is not being met and is, therefore, calling the function again and again until you hit the call stack limit.
The "RangeError: Maximum call stack size exceeded" error occurs when a function is called so many times that the invocations exceed the call stack limit. To solve the error, specify a base case that has to be met to exit the recursion.
The JavaScript exception "too much recursion" or "Maximum call stack size exceeded" occurs when there are too many function calls, or a function is missing a base case.
The consequences of applying a function with too many arguments (think more than tens of thousands of arguments) vary across engines (JavaScriptCore has hard-coded argument limit of 65536), because the limit (indeed even the nature of any excessively-large-stack behavior) is unspecified.
You have to find a way to reproduce this error, after that you can try to downgrade zone.js version, try to temporary remove third party libraries (WS libraries, bugsnap itself, all other libraries that might be using advanced browser features and prototype patches), ensure that zone.js is loaded first, relax uglify-js settings. Also you may be interested in https://github.com/angular/zone.js/issues/900.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With