MeteorToys/meteor-devtools

1.2.1 Errors: with Font & Mongol 'collections' properties helper

Closed this issue · 7 comments

The first 4 lines started with the update to 1.2.1 and are always displaying in the browser console, Toys inactive and active.

X main.js:1
Pfalse main.js:1
Iundefined main.js:1
3 main.js:1

When Toys are turned on (activated on the page) the following Error is thrown:

Exception in template helper: TypeError: Cannot read property 'collections' of undefined
at Object.Template.Mongol_header_pro.helpers.collection (http://localhost:3000/packages/meteortoys_toypro.js?92de65bdef5693b87da1407413a601753f9f882a:337:13)
at Object.BlazeProvider.helpers._.each.dict.(anonymous function) (http://localhost:3000/packages/meteorhacks_kadira-debug.js?cf1f0edaa3b73761e2cd3a55ad48301a0f80cd39:339:29)
at bindDataContext (http://localhost:3000/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2880:16)
at Blaze._wrapCatchingExceptions (http://localhost:3000/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:1651:16)
at http://localhost:3000/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2928:66
at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:3476:12)
at wrapHelper (http://localhost:3000/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2927:27)
at Object.Spacebars.call (http://localhost:3000/packages/spacebars.js?7bafbe05ec09b6bbb6a3b276537e4995ab298a2f:172:18)
at Template.Mongol_header_pro.Blaze._TemplateWith.Spacebars.include.HTML.DIV.HTML.DIV.Blaze.Each.HTML.DIV.class (http://localhost:3000/packages/meteortoys_toypro.js?92de65bdef5693b87da1407413a601753f9f882a:281:26)
at null. (http://localhost:3000/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2675:27)

And I throw this Warning a lot, but as I'm writing this I can't seem to duplicate it accurately...

[yellow triangle marker] Failed to decode downloaded font: http://localhost:3000/packages/meteortoys_toykit/public/LiberationMono-Bold.ttf

Just to make it easier to isolate issues:
I experienced same font decode problems. Font problems seem to be related to chrome, No problem with Firefox when loading same page. Chrome reports different network/fonts response headers for fonts that download ok and those that don't.

Font decoding also a problem when editing user.profile. See also Pagebakers/meteor-ionicons#6 + http://stackoverflow.com/questions/30442319/failed-to-decode-downloaded-font.

Error messages are mainly a nuisance. Causes no problems as far as I see.

Debugging messages come both in Firefox and in Chrome. They are in chrome reported related to main.js:1. In Firefox they are all reported related to meteor autopub.js line 72. (Ubuntu 14.04) latest updates.
X
meteort...8b4fc33 (line 72)
Pfalse
meteort...8b4fc33 (line 72)
Iundefined
meteort...8b4fc33 (line 72)
3
meteort...8b4fc33 (line 72)

I am having the same issue

Exception in template helper: TypeError: Cannot read property 'collections' of undefined
    at Object.Template.Mongol_header_pro.helpers.collection (http://localhost:3000/packages/meteortoys_toypro.js?92de65bdef5693b87da1407413a601753f9f882a:337:13)
    at bindDataContext (http://localhost:3000/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2880:16)
    at Blaze._wrapCatchingExceptions (http://localhost:3000/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:1651:16)
    at http://localhost:3000/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2928:66
    at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:3476:12)
    at wrapHelper (http://localhost:3000/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2927:27)
    at Object.Spacebars.call (http://localhost:3000/packages/spacebars.js?7bafbe05ec09b6bbb6a3b276537e4995ab298a2f:172:18)
    at Template.Mongol_header_pro.Blaze._TemplateWith.Spacebars.include.HTML.DIV.HTML.DIV.Blaze.Each.HTML.DIV.class (http://localhost:3000/packages/meteortoys_toypro.js?92de65bdef5693b87da1407413a601753f9f882a:281:26)
    at null.<anonymous> (http://localhost:3000/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2675:27)
    at http://localhost:3000/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:1865:18

Correct, and I agree with rklaeboe in stating the issue(s) are only nuisances. Everything works as it should, and for the most part it's only a problem if/when debugging. But I figured it ought to be documented either way.

I get the same error and it does seem to be causing an issue. I have objects in my database, yet they do not show up in Mongol collections interface. I also cannot insert anything into the database through Mongol.

Exception in template helper: TypeError: Cannot read property 'collections' of undefined
   at Object.Template.Mongol_header_pro.helpers.collection (http://localhost:3000/packages/meteortoys_toypro.js?92de65bdef5693b87da1407413a601753f9f882a:337:13)
   at bindDataContext (http://localhost:3000/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2880:16)
   at Blaze._wrapCatchingExceptions (http://localhost:3000/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:1651:16)
   at http://localhost:3000/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2928:66
   at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:3476:12)
   at wrapHelper (http://localhost:3000/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2927:27)
   at Object.Spacebars.call (http://localhost:3000/packages/spacebars.js?7bafbe05ec09b6bbb6a3b276537e4995ab298a2f:172:18)
   at Template.Mongol_header_pro.Blaze._TemplateWith.Spacebars.include.HTML.DIV.HTML.DIV.Blaze.Each.HTML.DIV.class (http://localhost:3000/packages/meteortoys_toypro.js?92de65bdef5693b87da1407413a601753f9f882a:281:26)
   at null.<anonymous> (http://localhost:3000/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2675:27)
   at http://localhost:3000/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:1865:18

Hey everyone, thanks for letting me know about the issue. The font issue has been patched, and if you update, the patched ToyKit should be absorbed with the fix. The collections issue, I am unable to replicate, but am looking into. Update to follow

I don't know when it stopped, but I'm unable to replicate the collection issues now either. Looks like the other 3 main.js1 errors still thow, but only when the page is re-freshed. Other than that they seem resolved. Though I'm sure this isn't good news, thanks. Anyone else throwing those errors on re-fresh?

Good to hear that the first two things are better. I have not seen the 3 errors, but if you can open an issue with them, that would be great.