You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vent.publish('messages', function({userId}) {
if(this.userId && userId === this.userId) {
this.on(`messages::${userId}::new`, ({message}) => {
return {message};
});
}else {
console.error(`Wanted user id: ${userId}, but logged in is ${this.userId}`)
return this.ready();
}
});
The console.error fires often in production, telling that the wanted user id was XYZ, but logged in was null. I also noticed in from time to time during development, but I was logged in the whole time. We call Vent.subscribe only then, when Meteor.userId() is available on the client. I've also tried to remove other packages like fast-render to see if they cause that issue, but even without fast-render, we receive this messages. In Meteor v2, our logs were empty.
The text was updated successfully, but these errors were encountered:
We, the Members of Meteor Community Packages take every issue seriously.
Our goal is to provide long-term lifecycles for packages and keep up
with the newest changes in Meteor and the overall NodeJs/JavaScript ecosystem.
However, we contribute to these packages mostly in our free time.
Therefore, we can't guarantee you issues to be solved within certain time.
If you think this issue is trivial to solve, don't hesitate to submit
a pull request, too! We will accompany you in the process with reviews and hints
on how to get development set up.
Please also consider sponsoring the maintainers of the package.
If you don't know who is currently maintaining this package, just leave a comment
and we'll let you know
Hey,
after upgrading to Meteor v3, we noticed an error when some users try to subscribe to a Vent publisher. Our code looks like this:
Client:
Server:
The console.error fires often in production, telling that the wanted user id was XYZ, but logged in was null. I also noticed in from time to time during development, but I was logged in the whole time. We call Vent.subscribe only then, when
Meteor.userId()
is available on the client. I've also tried to remove other packages like fast-render to see if they cause that issue, but even without fast-render, we receive this messages. In Meteor v2, our logs were empty.The text was updated successfully, but these errors were encountered: