Data: Assertion failed after updating from 2.12.1 to 2.13.1

Created on 29 May 2017  路  5Comments  路  Source: emberjs/data

Since updating ember-data to 2.13.1 we get the following error.

Assertion Failed: Cannot call writeWatching after the object is destroyed. Error at assert (http://localhost:4200/assets/vendor.js:23746:13) at Object.assert (http://localhost:4200/assets/vendor.js:23959:34) at Meta.(anonymous function) [as writeWatching] (http://localhost:4200/assets/vendor.js:37631:19) at Object.watchKey (http://localhost:4200/assets/vendor.js:41036:9) at Object.watch (http://localhost:4200/assets/vendor.js:41224:28) at Object._addBeforeObserver (http://localhost:4200/assets/vendor.js:39059:25) at addObserverForContentKey (http://localhost:4200/assets/vendor.js:55027:21) at EachProxy.beginObservingContentKey (http://localhost:4200/assets/vendor.js:54997:9) at EachProxy.willWatchProperty (http://localhost:4200/assets/vendor.js:54975:12) at Object.watchKey (http://localhost:4200/assets/vendor.js:41028:13)

The only way I do not get this error is by going back to 2.12.1.

Needs Submitter Response

Most helpful comment

I experience the same issue (Ember 2.12), however reproducing it in clean project is rather difficult. Only thing I noticed is that this happens when you do store.unloadAll('model') and later child models do either peekRecord or query.

Assertion Failed: Cannot call writeWatching after the object is destroyed.
Error
    at assert (http://localhost:4200/assets/vendor.js:26671:13)
    at Object.assert (http://localhost:4200/assets/vendor.js:38422:34)
    at Meta.(anonymous function) [as writeWatching] (http://localhost:4200/assets/vendor.js:40860:24)
    at Object.watchKey (http://localhost:4200/assets/vendor.js:44276:9)
    at NestedPropertyReference.compute (http://localhost:4200/assets/vendor.js:36084:23)
    at NestedPropertyReference.value (http://localhost:4200/assets/vendor.js:35901:45)
    at EvaluatedPositionalArgs.value (http://localhost:4200/assets/vendor.js:67933:36)
    at SimpleHelperReference.compute (http://localhost:4200/assets/vendor.js:36258:40)
    at SimpleHelperReference.value (http://localhost:4200/assets/vendor.js:35901:45)
    at ConditionalReference.value (http://localhost:4200/assets/vendor.js:72497:43)

All 5 comments

Can you provide a reproduction of the issue?

will gladly reopen if a reproduction is provided.

Have the same issue showing up. It's sporadic, sometimes it shows up, other times it doesn't. Can't create a clear reproduction.

Found this possibly related issue, but we are not using any of those modules: https://github.com/miguelcobain/ember-paper/issues/715

I experience the same issue (Ember 2.12), however reproducing it in clean project is rather difficult. Only thing I noticed is that this happens when you do store.unloadAll('model') and later child models do either peekRecord or query.

Assertion Failed: Cannot call writeWatching after the object is destroyed.
Error
    at assert (http://localhost:4200/assets/vendor.js:26671:13)
    at Object.assert (http://localhost:4200/assets/vendor.js:38422:34)
    at Meta.(anonymous function) [as writeWatching] (http://localhost:4200/assets/vendor.js:40860:24)
    at Object.watchKey (http://localhost:4200/assets/vendor.js:44276:9)
    at NestedPropertyReference.compute (http://localhost:4200/assets/vendor.js:36084:23)
    at NestedPropertyReference.value (http://localhost:4200/assets/vendor.js:35901:45)
    at EvaluatedPositionalArgs.value (http://localhost:4200/assets/vendor.js:67933:36)
    at SimpleHelperReference.compute (http://localhost:4200/assets/vendor.js:36258:40)
    at SimpleHelperReference.value (http://localhost:4200/assets/vendor.js:35901:45)
    at ConditionalReference.value (http://localhost:4200/assets/vendor.js:72497:43)

I'm getting this.... I'm doing a store.unloadAll().... then I'm doing a refresh() on my route, which is loading all the data back in just as it normally would when the page loads initially... and this error is happening. And it's definitely happening when I do a peekRecord()

ember-cli 2.13.3
ember-data 2.13.2

Was this page helpful?
0 / 5 - 0 ratings