I’ve seen a few previously closed bugs with the same exception which have been fixed. We’re using newer versions which haven’t seen any reports of this:
aurelia-templating@1.6.0
aurelia-templating-resources@1.5.4
We’re getting a few error reports from Sentry about this occurring in our Electron app on customers machines. We can’t reproduce locally otherwise I’d have opened a Github issue.
The stack shows that in attached()
we’re calling sort()
on an array which is bound to a repeat.for
which is triggering some Aurelia stuff. There’s nothing wrong with this right?
Below is the full stack trace but you can also click here to see the stack trace in Sentry with sources.
TypeError: Cannot read property 'animatableElement' of undefined
at getAnimatableElement(jspm_packages/npm/aurelia-templating@1.6.0/aurelia-templating.js:1601:9)
at animateView(jspm_packages/npm/aurelia-templating@1.6.0/aurelia-templating.js:1640:31)
at removeAt(jspm_packages/npm/aurelia-templating@1.6.0/aurelia-templating.js:1842:28)
at removeView(jspm_packages/npm/aurelia-templating-resources@1.5.4/repeat.js:284:26)
at _runSplices(jspm_packages/npm/aurelia-templating-resources@1.5.4/array-repeat-strategy.js:195:36)
at instanceMutated(jspm_packages/npm/aurelia-templating-resources@1.5.4/array-repeat-strategy.js:164:29)
at context(jspm_packages/npm/aurelia-templating-resources@1.5.4/repeat.js:172:19)
at call(jspm_packages/npm/aurelia-templating-resources@1.5.4/repeat.js:116:12)
at callSubscribers(jspm_packages/npm/aurelia-binding@1.6.0/aurelia-binding.js:384:17)
at call(jspm_packages/npm/aurelia-binding@1.6.0/aurelia-binding.js:998:12)
at flushChangeRecords(jspm_packages/npm/aurelia-binding@1.6.0/aurelia-binding.js:957:12)
at sort(jspm_packages/npm/aurelia-binding@1.6.0/aurelia-binding.js:1108:29)
at sort(src/files/sort/file-sort.ts:46:18)
at sortFiles(src/files/sort/file-sort.ts:42:17)
at updateFiles(src/files/list.ts:89:32)
at attached(src/files/list.ts:34:10)
at attached(jspm_packages/npm/aurelia-templating@1.6.0/aurelia-templating.js:3513:22)
at attached(jspm_packages/npm/aurelia-templating@1.6.0/aurelia-templating.js:1563:22)
at add(jspm_packages/npm/aurelia-templating@1.6.0/aurelia-templating.js:1726:12)
at _show(jspm_packages/npm/aurelia-templating-resources@1.5.4/if-core.js:67:26)
at _update(jspm_packages/npm/aurelia-templating-resources@1.5.4/if.js:120:29)
at changeHandlerName(jspm_packages/npm/aurelia-templating-resources@1.5.4/if.js:106:10)
at selfSubscriber(jspm_packages/npm/aurelia-templating@1.6.0/aurelia-templating.js:3720:30)
at call(jspm_packages/npm/aurelia-templating@1.6.0/aurelia-templating.js:3584:12)
at setValue(jspm_packages/npm/aurelia-templating@1.6.0/aurelia-templating.js:3564:16)
at propertyName(jspm_packages/npm/aurelia-templating@1.6.0/aurelia-templating.js:3675:31)
at setValue(jspm_packages/npm/aurelia-binding@1.6.0/aurelia-binding.js:3681:11)
at updateTarget(jspm_packages/npm/aurelia-binding@1.6.0/aurelia-binding.js:4939:25)
at call(jspm_packages/npm/aurelia-binding@1.6.0/aurelia-binding.js:4954:14)
at callSubscribers(jspm_packages/npm/aurelia-binding@1.6.0/aurelia-binding.js:391:17)
at call(jspm_packages/npm/aurelia-binding@1.6.0/aurelia-binding.js:3754:10)
at _flushQueue(jspm_packages/npm/aurelia-task-queue@1.2.1/aurelia-task-queue.js:103:14)
at flushMicroTaskQueue(jspm_packages/npm/aurelia-task-queue@1.2.1/aurelia-task-queue.js:154:10)
at MutationObserver.<anonymous>(jspm_packages/npm/aurelia-task-queue@1.2.1/aurelia-task-queue.js:79:22)