Can't load any pages on Meteor 1.2

The server boots up fine, but when I try to visit any page on my site locally I see the following error in the server log:

Error running template: TypeError: Object [object Object] has no method 'onStop'

This is the stack trace I managed to extract:

TypeError: Object [object Object] has no method 'onStop'
at [object Object].Blaze.View.autorun (packages/blaze/view.js:213:1)
at [object Object].Blaze.Each (packages/blaze/builtins.js:157:1)
at fireCallbacks (packages/blaze/view.js:279:1)
at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
at Object._.extend.nonreactive (packages/mrt_server-deps/packages/mrt_server-deps.js:54:1)
at Blaze._fireCallbacks (packages/blaze/view.js:276:1)
at Object.Blaze._withCurrentView (packages/blaze/view.js:538:1)
at Object.Blaze._fireCallbacks (packages/blaze/view.js:275:1)
at Object.Blaze._createView (packages/blaze/view.js:293:1)
at Object.Blaze._expandView (packages/blaze/view.js:421:1)

Has anyone else encountered this?

I had this issue too, it was being caused by the maximum:server-transform package.

But i couldn’t realize exactly why looking at the package source, it is a bit outdated too.

So did removing the package fix the issue?

Yes, the package and the code that uses it.

Removing that still causes the issue, so I must have another package messing it up. Thanks for the help!

You welcome, look at this package code, it isn’t big and can give some tips about the issue.

I’m also experiencing this, though I’m not using that package… @theplatapi, did you find the cause?

Edit: it was to do with https://github.com/Diggsey/meteor-server-deps, I upgraded to the new branch of https://github.com/peerlibrary/meteor-server-autorun and it fixed the issue

Hi everyone,

I’m also experiencing this issue, but without any of the above mentioned packages. Has anyone deduced the underlying cause of this bug?

Thanks for the clues @theplatapi, @JamesLefrere @fabiodr

I’ll start testing out packages one by one, as well as look for any similarities across the packages mentioned.

Appears the cause for myself was in the edgee:meteor-reactive-publish package

I am using lepozepo:reactive-publish and have the same symptoms. ascieplus, how did you resolve the issue?

I removed my reactive publication (made them into more publications) and did a meteor remove lepozepo:reactive-publish :smile:

yep, reactive publish was to blame in my case too.

So I just upgraded to version 1.2.1 and I suppose I’m having the same problem everybody has here: reactive-publish.
I’m using lepozepo:reactive-publish and I need reactivity on the server … what can I do? Any ideas?

The error I’m having is

Error running template: TypeError: Object [object Object] has no method 'onStop'

and no pages is loaded

UPDATE: the error was because of lepozepo:reactive-publish, so I got in contact with the author and he replied telling me that he is working on fixing the issue

I have moved to peerlibrary:reactive-publish, and after some initial issues it is now working for me. In particular, ‘this’ is not available within the autorun, so outside the autorun I used
var self=this
then used self. instead of this. within the autoruns.

Let me know if this helps. Thx.