kadirahq / fast-render

Render you app even before the DDP connection is live. - magic?
MIT License
560 stars 80 forks source link

Error with manual subscription #146

Closed mquandalle closed 8 years ago

mquandalle commented 8 years ago

Hi @arunoda,

Fast-render produces some errors if the publication uses the DDP low level API, ie this.ready(). Here is a code example:

Meteor.publish('test', function() {
  this.ready();
});

FastRender.onAllRoutes(function() {
  this.subscribe('test');
});

This produces the following in the console:

W20151030-00:26:22.562(1)? (STDERR) Publish handler for null sent no ready signal
W20151030-00:26:25.288(1)? (STDERR) Publish handler for null sent no ready signal

If there were some data on the publication it would be correctly transmitted by fast-render, the issue is only the error in the logs.

mquandalle commented 8 years ago

Hum it seems that something more subtle is going on...

Here is a clonable reproduction in case anyone care: https://github.com/wekan/wekan/tree/fast-render, the issue is with the board publication.

arunoda commented 8 years ago

Just by looking at this, it seems like a issue with a null publication. I will try to reproduce. On 2015 ඔක් 30, සිකු at පෙ.ව. 5.10 Maxime Quandalle < notifications@github.com> wrote:

Hum it seems something more subtle is going on...

Here is a clonable reproduction in case anyone care: https://github.com/wekan/wekan/tree/fast-render

— Reply to this email directly or view it on GitHub https://github.com/kadirahq/fast-render/issues/146#issuecomment-152357930 .

mquandalle commented 8 years ago

This is probably a side effect of a third-party package, 3stack:presence as I was able to demonstrate in this minimal clonable reproduction: https://github.com/mquandalle/meteor-fast-render-issue-146

mquandalle commented 8 years ago

Ok actually that was easy, this package has a null publication, https://github.com/3stack-software/meteor-presence/blob/c8b2ea9ffccdb12a3abd05ec87bbb3546918aa9c/lib/server/presence.coffee#L26. Sorry for the false alarm.

arunoda commented 8 years ago

No problem. On 2015 ඔක් 30, සිකු at පෙ.ව. 6.42 Maxime Quandalle < notifications@github.com> wrote:

Closed #146 https://github.com/kadirahq/fast-render/issues/146.

— Reply to this email directly or view it on GitHub https://github.com/kadirahq/fast-render/issues/146#event-449918660.