Could "calling set on destroyed object" error be more descriptive?

Today after spending four hours trying to find out what is causing “calling set on destroyed object” I’ve gave up, opened Ember source, looked up error message and changed it to following:

Ember['default'].assert("calling set('" + keyName + "') on destroyed object", !obj.isDestroyed);

This finally produced following error:

Uncaught Error: Assertion Failed: calling set('isVisible') on destroyed object

This allowed me to isolate and fix origin of problem instantly.

Could please this little fix land in source? Perfectly, Error with dumps of both object and value would help in identifying test cases that trouble origins from, but thay may be tricky to get done.

1 Like

I would file this over in the ember repo, it may get lost here.

Hi, any updates on this?

'Lo 'ere Nikos,

Work is happening on this, but nothing was finalised yet:



Other PR:

After editing source code I don’t get the updated error message. Does Ember-CLI use the minified version, if so how did you get round this?


Solved my problem, was editing ember.js whereas in newer versions of CLI in dev mode, it is ember.debug.js it is using.