We’ve just setup our project on new developer’s computer, and this started happening:
DEPRECATION: When calling `Ember.deprecate` you must provide an `options` hash as the third parameter. `options` should include `id` and `until` properties. [deprecation id: ember-debug.deprecate-options-missing] See http://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options for more details.
at logDeprecationStackTrace (http://localhost:4200/assets/vendor.js:21055:19)
at HANDLERS.(anonymous function) (http://localhost:4200/assets/vendor.js:21166:7)
at raiseOnDeprecation (http://localhost:4200/assets/vendor.js:21085:12)
at HANDLERS.(anonymous function) (http://localhost:4200/assets/vendor.js:21166:7)
at invoke (http://localhost:4200/assets/vendor.js:21182:7)
at deprecate (http://localhost:4200/assets/vendor.js:21150:32)
at deprecate (http://localhost:4200/assets/vendor.js:21127:7)
at Object.deprecate (http://localhost:4200/assets/vendor.js:32913:37)
at deprecate (http://localhost:4200/assets/vendor.js:83446:40)
This warning was raised over 3000 times!
Following this warning, we get the following:
Uncaught RangeError: Maximum call stack size exceeded
at RegExp.[Symbol.replace] (native)
at String.replace (native)
at logDeprecationStackTrace (http://localhost:4200/assets/vendor.js:21065:31)
at HANDLERS.(anonymous function) (http://localhost:4200/assets/vendor.js:21166:7)
at raiseOnDeprecation (http://localhost:4200/assets/vendor.js:21085:12)
at HANDLERS.(anonymous function) (http://localhost:4200/assets/vendor.js:21166:7)
at invoke (http://localhost:4200/assets/vendor.js:21182:7)
at deprecate (http://localhost:4200/assets/vendor.js:21150:32)
at deprecate (http://localhost:4200/assets/vendor.js:21127:7)
at Object.deprecate (http://localhost:4200/assets/vendor.js:32913:37)
This isn’t happening on any of the other developer’s machines who had the project setup before. We’re not quite sure where to start to debug this situation.
Here’s the code that seems to be triggering it:
import Ember from 'ember';
export default Ember.Route.extend({
model() {
let solution = this.store.createRecord('solution');
return solution;
},
afterModel(model) {
model.save().then(() => this.transitionTo('solution.edit.your-idea', model.id));
}
});
It seems like it has something to do with the transitionTo
call within the afterModel
hook because when I comment out that line, the stack overflow does not occur.
It’s also strange that this has just started happening. It wasn’t an issue before.