Hey guys, I’ve hit another weird problem.
I have 4 subscriptions:
- MyStudentInfo
- MyPet
- MyAvailableTokens
- MyFriends
After these 4 subscriptions are subscribed, I also call a bunch of other methods and subscriptions.
On the DDP, I can see that the documents for the first 3 are returned, and the subs are marked as ready. The thing is the 4th one does not return anything at all, and no further messages are received, even though the client/server does a ping/pong just fine.
Here’s a screen capture of the messages:
This is what it should look like when it works:
The 4th subscription (MyFriends) is really simple:
Meteor.publish('MyFriends', function () {
let currentUserId = UserControl.getUserId();
if (currentUserId)
return FriendsCollection.find({ $or: [{ Student1Id: currentUserId }, { Student2Id: currentUserId }] });
});
I checked MongoDB to call the same search directly on the DB and it returns just fine.
Thereafter, this user’s account becomes unresponsive, and is unable to log out. It does not affect other users.
When I reload the page, the same thing happens again. The DDP works fine at first and then we call these 4 subscriptions and the same thing repeats.
If I restart the server, the problem goes away.
What could cause the account to reach this state?
Any ideas or suggestions greatly appreciated!