Closed abecks closed 7 years ago
Could you have a look to see if Meteor.userId()
does return the correct user ID? We're currently seeing similar behaviour, and it seems like this is caused by the bulk processing that was recently introduced to MiniMongo. We're getting a userId, but no user document in our FlowRouter triggers.
FastRender inserts the user before calling Meteor.user()
as the logs prove. I'm guessing that MiniMongo is awaiting more documents to be inserted, meanwhile our triggersEnter
run and don't get a user document. As a workaround one could try fetching the user from FlowRouter's payload (FlowRouter.debugger.getPayload()
) and fetch the user document from there to figure out the routing.
Either way, this is likely the same issue as #168.
Any news on this? Now that Meteor 1.4 is out, it'd be great to be able to update.
I guess fast render has been abandoned.
When returning to the application after logging in (refresh, etc.), FlowRouter initializes before the user has been logged in. Meteor.user() is null and Meteor.loggingIn() is false. Any triggers that require the user to be logged in will act as if they are not. This means all I see is the login screen when refreshing my application, even though after it loads, Meteor.user() shows that I am logged in.
The routes run before the "fast rendering completed!" message. I am trying to use FlowRouter.wait() and FlowRouter.initialize() as a workaround, but I can't figure out what hook to use. Meteor.loggingIn() is ALWAYS false.