Meteor-Community-Packages / meteor-roles

Authorization package for Meteor, compatible with built-in accounts packages
http://meteor-community-packages.github.io/meteor-roles/
MIT License
920 stars 164 forks source link

Exception on subscription: $in needs an array. #353

Closed Jessedev1 closed 1 year ago

Jessedev1 commented 1 year ago

Hi,

Some minutes ago our server has crashed. After checking the logs it appears that there is a call to a subscription which gives the following error: Exception from sub id undefined Error: Exception while polling query {"collectionName":"role-assignment","selector":{"user._id":{"$in":"*****************"}},"options":{"transform":null}}: $in needs an array

In our own code we have one publication, but since we don't use "$in" here I am guessing the problem is somewhere in the source of the meteor-roles package.

return Meteor.roleAssignment.find({
        'user._id': this.userId
});

Is this a known issue, and if not is there a way to fix it?