Closed dnish closed 7 years ago
I'm also having issues with the latest fast-render and Meteor 1.3.4.4 (same with flow-router-ssr and react-router-ssr). Server side injected data isn't there at initial page load. Downgrading to fast-render@2.13.0 (kind of) solved those issues (as long as I don't make use of subs manager).
It seems the FastRender injects the DDP messages correctly (when no connection yet) but the messages (came with html especially user data) never get processed and saved into collections due to Accounts _autoLoginEnabled=true
. Enabled autoLogin
is the first to send message (login) to the live data connection (token is taken from local storage)
After that every message is buffered (that the FastRender injects) but is not processed due to _waitingForQuiescence
(the first login message is there) until the connection is established
It happens when there is some delay before connection is established
Has anybody found a fix for this? I can confirm this started happening with 1.3.3 by the way.
@abernix I saw you've been contributing to FR, maybe you'd have some input on the issue?
Looks like it already has been fixed: https://github.com/kadirahq/fast-render/pull/167 ?
You can turn off buffered DDP with Meteor.connection.bufferedWritesMaxAge = 0
to work around this, I would guess.
Note that it's actually Meteor.connection._bufferedWritesMaxAge = 0
(on the client). Still doesn't fix the problem sadly :(
It was an issue with the fix for https://github.com/kadirahq/fast-render/pull/167 (https://github.com/kadirahq/fast-render/pull/167/files#r74189260)
I would suggest downgrading to 2.13.x and potentially using the bufferedWrites workaround (although your reproduction works for me without it).
(and the fix for this package is to revert the linked commit). cc @arunoda
Thanks @tmeasday I'll experiment with this today and do a release. @SachaG could you verify that downgrading this solves your issue?
Yes, I can confirm 2.13.0 doesn't have this problem.
Hmm, that being said with 2.13.0 I seem to have reloading problems for non-logged-in users in Telescope. I'm not sure if it's a Telescope-specific issue though.
There could definitely be problems with 2.13 and 1.3.3 if you don't turn off DDP batching, I expect.
Did you already look into this @arunoda ? :) this has pretty high severity for us right now.
@arunoda: Any update on this? Kind of a blocker to launching a newer/faster SSR crater site....
Downgrading to 2.13.0 doesn't work very well (on some reloads everything works fine, on others I get a "expected document to change" error without having the initial user data).
Maybe somone here can check the fix https://github.com/kadirahq/fast-render/pull/184 on his local project? In my case, everything is working fine now without problems.
cd your-meteor-project/packages
git clone https://github.com/dnish/fast-render
cd .. && meteor add meteorhacks:fast-render
@dnish I just tested your fix, seems to be working for me, thanks!
@dnish Hey thanks a lot for your fix. I just got it and did a release as v2.16.0. Try that.
Thanks all for helping on this.
Hey, Fast Render seems to be broken on my 1.3.4.4 application with Iron Router. The
Meteor.user()
object isn't available on the initial page load, everything worked fine before upgrading from 1.2 to 1.3.