Exception from Tracker recompute function when using createContainer

Here’s my container.
I’ve tried everything it seems.
I’m on meteor 1.4.2.3

MyMessagesContainer = createContainer(() => {

var threadsSub = Meteor.subscribe("messages_threads", {
	onReady: function () {
		console.log('messages_threads onReady');
	},
	onStop: function () {
		console.log("onError", arguments);
	}
});

/*
Meteor.subscribe("thread_messages", currentThreadId.get(),{
  onReady: function () {
  	console.log('onReady threadObject' );
  },
  onStop: function () { console.log("onError", arguments); }
});
*/

if (false == Roles.userIsInRole(Meteor.userId(), 'technical-support', 'briefcase')
 && false == Roles.userIsInRole(Meteor.userId(), 'super-admin', 'briefcase') ) {
	// user

} else {

	// support 
	const threads = MessageThreads.find({'recievers': { $size: 0 } }).fetch();
	const users = Meteor.users.find({_id: { '$in': _.pluck(threads,'senderId') }}).fetch();
	const threadsReady = threadsSub.ready();
	return {
		threads: threadsReady == true ? threads : [],
		users: threadsReady == true ? users : [],
		currentThreadId: currentThreadId,
		threadsReady: threadsReady
	};
}

}, MyMessages);

Here’s the error-stack

es5-shim.js?hash=adc3c62…:1242 Uncaught TypeError: Cannot convert undefined or null to objectkeys @ es5-shim.js?hash=adc3c62…:1242calculateData @ ReactMeteorData.jsx:111componentWillMount @ ReactMeteorData.jsx:5(anonymous function) @ modules.js?hash=c8fc66b…:76518measureLifeCyclePerf @ modules.js?hash=c8fc66b…:76245performInitialMount @ modules.js?hash=c8fc66b…:76517mountComponent @ modules.js?hash=c8fc66b…:76428mountComponent @ modules.js?hash=c8fc66b…:69385mountChildren @ modules.js?hash=c8fc66b…:75547_createInitialChildren @ modules.js?hash=c8fc66b…:72779mountComponent @ modules.js?hash=c8fc66b…:72604mountComponent @ modules.js?hash=c8fc66b…:69385performInitialMount @ modules.js?hash=c8fc66b…:76541mountComponent @ modules.js?hash=c8fc66b…:76428mountComponent @ modules.js?hash=c8fc66b…:69385performInitialMount @ modules.js?hash=c8fc66b…:76541mountComponent @ modules.js?hash=c8fc66b…:76428mountComponent @ modules.js?hash=c8fc66b…:69385mountComponentIntoNode @ modules.js?hash=c8fc66b…:81515perform @ modules.js?hash=c8fc66b…:70349batchedMountComponentIntoNode @ modules.js?hash=c8fc66b…:81537perform @ modules.js?hash=c8fc66b…:70349batchedUpdates @ modules.js?hash=c8fc66b…:79204batchedUpdates @ modules.js?hash=c8fc66b…:69017_renderNewRootComponent @ modules.js?hash=c8fc66b…:81731_renderSubtreeIntoContainer @ modules.js?hash=c8fc66b…:81812render @ modules.js?hash=c8fc66b…:81833(anonymous function) @ modules.js?hash=c8fc66b…:94139
httpcall_client.js:189 XHR finished loading: GET “http://104.199.94.150/_timesync”.HTTP.call @ httpcall_client.js:189HTTP.get @ httpcall_common.js:50updateOffset @ mizzao_timesync.js?hash=7ece5e8…:90TimeSync.resync @ mizzao_timesync.js?hash=7ece5e8…:144(anonymous function) @ mizzao_timesync.js?hash=7ece5e8…:154Tracker.Computation._compute @ tracker.js?hash=9f8a0ce…:339Tracker.Computation._recompute @ tracker.js?hash=9f8a0ce…:358Tracker._runFlush @ tracker.js?hash=9f8a0ce…:523onGlobalMessage @ meteor.js?hash=e3f53db…:401
meteor.js?hash=e3f53db…:930 Exception from Tracker recompute function:
meteor.js?hash=e3f53db…:930 TypeError: Cannot read property ‘_currentElement’ of null
at ReactCompositeComponentWrapper._updateRenderedComponent (modules.js?hash=c8fc66b…:76915)
at ReactCompositeComponentWrapper._performComponentUpdate (modules.js?hash=c8fc66b…:76894)
at ReactCompositeComponentWrapper.updateComponent (modules.js?hash=c8fc66b…:76815)
at ReactCompositeComponentWrapper.performUpdateIfNecessary (modules.js?hash=c8fc66b…:76731)
at Object.performUpdateIfNecessary (modules.js?hash=c8fc66b…:69496)
at runBatchedUpdates (modules.js?hash=c8fc66b…:69070)
at ReactReconcileTransaction.perform (modules.js?hash=c8fc66b…:70349)
at ReactUpdatesFlushTransaction.perform (modules.js?hash=c8fc66b…:70349)
at ReactUpdatesFlushTransaction.perform (modules.js?hash=c8fc66b…:69009)
at Object.flushBatchedUpdates (modules.js?hash=c8fc66b…:69092)

2 Likes