Angular-Meteor issue: controller autorun functions stop running in component

Hi to you all metoer-fans!
TL;DR
Are this.autorun functions supported on Angular 1.6.1 components? They are unreliable in my app

Details:
I hook this.autorun functions on angular component controllers. Although initially responsive, the autoruns tend to not trigger from some point.

By ‘component’ I mean:
angular.module(‘myModule’).component(‘myComponent’, {

When controllers start, autoruns seem to trigger as expected. Then at some point, in response to a change in a Session variable, they seem to no longer trigger. This has affected various components in my project. I’ve verified it using a simple test: Added a this.autorun(..) function which console.log’s a Session variable. When I suspect that controller autoruns should have fired but didn’t, I change that Session variable using Session.set('testKey', 'new value') at the console. The expected log no longer appears => the autorun didn’t run.

I’ve also verified the controller is still loaded by logging at the controller’s $scope.$on($destroy) (it wasn’t called, thus I’m inclined to believe that there’s no bug in my code which removed the component).

My question is:
Is using this.autorun supported in angular components?

Note: this question was also posted on stackoverflow

Could you create a failing test on the angular-meteor repo?

I’m having a similar problem. The autorun just stops triggering at some point. Looking at the stack-trace it looks like it is in response to a collection.update call. It works as expected most of the time but occasionally it stops… I recently updated some dependencies, I’m gonna try to downgrade and see if this works as expected again.

I’ve noticed that if I call autorun in a $timeout callback instead of during the controller’s run, the it is triggered. This could be a bit too soon to confirm but so for I have yet been able to reproduce the ‘not triggering’ problem.

I wonder if there are timing invocation restrictions on the autorun(...) call. Meaning, perhaps the call can only be made after a specific lifecycle hook ($onInit, $postLink, etc) has been executed?