orionjs / orioncms

[Old] Orion is an open source framework built on Meteor that makes complex as well as simple apps possible with minimal effort.
http://orionjs.org
MIT License
715 stars 129 forks source link

Exception from Tracker recompute function #313

Open vonwao opened 9 years ago

vonwao commented 9 years ago

I'm getting this error on create of an Orion collection (for example http://localhost:3000/admin/posts/create)

I got two varieties of this error:

Exception from Tracker recompute function: meteor.js:862 TypeError: Cannot read property 'setMembers' of undefined at doMaterialize (blaze.js:2004) at Object.Tracker.nonreactive (tracker.js:597) at doRender (blaze.js:2000) at blaze.js:1844 at Function.Template._withTemplateInstanceFunc (blaze.js:3643) at blaze.js:1842 at Object.Blaze._withCurrentView (blaze.js:2183) at viewAutorun (blaze.js:1841) at Tracker.Computation._compute (tracker.js:331) at Tracker.Computation._recompute (tracker.js:350)

Exception from Tracker recompute function: meteor.js:864 undefined

Unfortunately the stack traces for these errors are not very helpful. Is it possible I'm missing some required initialization, etc. in my Orion app?

ecuanaso commented 9 years ago

I was getting the same error until I updated all my packages. When you perform meteor update, what's the message that you get at the end?

vonwao commented 9 years ago

I'm glad I'm not crazy and it's not just me. Trying to understand this issue found an interesting insight: "The reason for this error is because... you cannot store undefined in a reactive var." (https://forums.meteor.com/t/how-to-debug-this-dont-know-where-to-insert-debugger-breakpoint/7308)

Probably there's un undefined reactive var somewhere. It's frustrating to have code like this that's impossible to debug -- this makes me think I like React.js, less magical reactive stuff going off all over the place in ways that are hard to understand/predict, with React I think I get very clear error messages! But I'm still open to learning something new. I need to track down what the Tracker does.

vonwao commented 9 years ago

Actually, I think they could just improve Tracker by compiling code in such a way that template line number shows up in the stack trace? Maybe I'll suggest to meteor.

frabrunelle commented 9 years ago

At first I was getting the "Exception from Tracker recompute function" error after I upgraded to Meteor 1.2 by running meteor update.

I had to manually update the following packages to make everything work correctly:

This project is already at Meteor 1.2.0.2, the latest release.
Your top-level dependencies are at their latest compatible versions.

Newer versions of the following indirect dependencies are available:
 * aldeed:autoform 5.4.1 (5.5.1 is available)
 * aldeed:collection2 2.3.3 (2.5.0 is available)
 * aldeed:tabular 1.2.0 (1.4.1 is available)
 * cosmos:browserify 0.5.1 (0.7.1 is available)
 * matb33:collection-hooks 0.7.15 (0.8.0 is available)
 * nicolaslopezj:roles 1.3.3 (1.5.2 is available)
To update one or more of these packages, pass their names to `meteor update`.