Search code examples
javascriptember.jsember-data

What could be reason of the error 'Maximum call stack size exceeded' inside Ember Data?


After Ember release new version 3.6.0 I started to get the error in console:

rsvp.js:24 Uncaught RangeError: Maximum call stack size exceeded at WeakMap.get () at getCacheFor (metal.js:25) at ComputedProperty.get (metal.js:2350) at Array.CPGETTER_FUNCTION [as []] (metal.js:752) at Function.jQuery.extend.jQuery.fn.extend (jquery.js:261) at Function.jQuery.extend.jQuery.fn.extend (jquery.js:282) at Function.jQuery.extend.jQuery.fn.extend (jquery.js:282) at Function.jQuery.extend.jQuery.fn.extend (jquery.js:282) at Function.jQuery.extend.jQuery.fn.extend (jquery.js:282) at Function.jQuery.extend.jQuery.fn.extend (jquery.js:282)

I figured out that reason of it store.query request in init in one of my components:

this.get('store').query('user', { 'filter': { 'type': '1', 'gender': 'male' } }).then(tutors => {
    this.set("tutors", tutors);
});

How to figure out a reason why I started to get this error?


Solution

  • I think it may be this issue: https://github.com/emberjs/ember.js/issues/17190

    This has not been fixed in Ember 3.6. You may need to continue using Ember 3.5 or to apply the workaround in this comment: https://github.com/emberjs/ember.js/issues/17190#issuecomment-440208573