Exception from Tracker recompute function

anyone care to explain to me what does it mean with this error:

Exception from Tracker recompute function: debug.js:41 
Error: Expected template or null, found: 0
    at null._render (spacebars-runtime.js:25)
    at doRender (view.js:351)
    at view.js:199
    at Function.Template._withTemplateInstanceFunc (template.js:457)
    at view.js:197
    at Object.Blaze._withCurrentView (view.js:538)
    at viewAutorun (view.js:196)
    at Tracker.Computation._compute (tracker.js:323)
    at new Tracker.Computation (tracker.js:211)
    at Object.Tracker.autorun (tracker.js:562)

thank You so muchh,

1 Like

A template was unable to render due to an error within a reactive computation. I imagine the fastest way to deal with this kind of error, is to back track a bit, and try to identify something you might’ve done wrong.

If you could share some code or maybe a github repo, it would be easier to help.

It looks like a template was expected, but not found - Perhaps look through your current templates, and see if you have a typo in a {{> someTemplateName }} -helper, or maybe the template definition itself <template name='someTemplateName'> ... </template> ?

1 Like

heloo, @goatic thanks for your insight,

i’ve solved the problem by commenting and uncommenting each element of suspected template and found the culprit and solved the problem…

thanks again,

3 Likes

I consistently get a similar error when I name a template with only 2 characters. 3 characters is fine, two characters and I get:

`Exception from Tracker recompute function:
    debug.js:41 Error: Expected template or null, found: true
    at ._render (spacebars.js:33)
    at doRender (blaze.js:1996)
    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 new Tracker.Computation (tracker.js:219)
    at Object.Tracker.autorun (tracker.js:570)`

Maybe this is the design to prevent developer to name the template with only 2 characters due to:

1 Uneasy for you to search the template which having a name of only 2 characters…

2 A chance of duplicate template name is high…

Just maybe…

1 Like