question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After update I have RangeError: Maximum call stack size exceeded.

See original GitHub issue

Here is a debug message

ERROR Error: Uncaught (in promise): RangeError: Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
    at SafeSubscriber.__tryOrUnsub (Subscriber.js:191)
    at SafeSubscriber.next (Subscriber.js:122)
    at Subscriber._next (Subscriber.js:72)
    at Subscriber.next (Subscriber.js:49)
    at EventEmitter.next (Subject.js:39)
    at EventEmitter.emit (core.js:35297)
    at FormControl.updateValueAndValidity (forms.js:4057)
    at FormControl.setValue (forms.js:4692)
    at updateControl (forms.js:3299)
    at MaskService.onChange (forms.js:3271)
    at resolvePromise (zone-evergreen.js:793)
    at new ZoneAwarePromise (zone-evergreen.js:875)
    at __awaiter (tslib.es6.js:69)
    at MaskDirective.writeValue (ngx-mask.js:1006)
    at forms.js:3316
    at forms.js:4690
    at Array.forEach (<anonymous>)
    at FormControl.setValue (forms.js:4686)
    at ngx-formly-core.js:906
    at SafeSubscriber.schedulerFn [as _next] (core.js:35378)

It call writeValue many times with the same inputValue

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
intellixcommented, Oct 14, 2019

Getting this now when coupled with Formly 5.5.0, which I can see you’re using also. When we downgrade Formly to 5.4.3, it’s fine.

I think it’s clear that:

Formly.setValue -> Mask.writeValue -> Formly.setValue …

Related: https://github.com/ngx-formly/ngx-formly/commit/bce769f8233a344974458bc00b73381f8ed148b5

0reactions
aitboudadcommented, Dec 17, 2019

@intellix the only case that may happen in our case is when multiple fields use the same key which I’ve pushed another fix in v5.5.7 release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix: "RangeError: Maximum call stack size exceeded"
A "RangeError: Maximum call stack size exceeded" is an error that occurs when a function or operation tries to execute too many nested...
Read more >
RangeError: Maximum call stack size exceeded - Educative.io
The most common source for this error is infinite recursion. You must have a recursive function in your code whose base case is...
Read more >
JavaScript Error: Maximum Call Stack Size Exceeded
The problem with a recursive function that continues to call on itself is that it is impossible to move onto the next function...
Read more >
Uncaught RangeError: Maximum call stack size exceeded
This error is almost always means you have a problem with recursion in JavaScript code, as there isn't any other way in JavaScript...
Read more >
javascript - Maximum call stack size exceeded error
(function a() { a(); })();. Here is the stack after a handful of calls... ... As you can see, the call stack grows...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found