Exception while invoking method 'createUser' Error: your modifier is now empty


#1

One of my meteor apps starting spitting out this error when I create a new user:

Exception while invoking method 'createUser' Error: After filtering out keys not in the schema, your modifier is now empty

As far as I can tell, because I have a simple-schema attached to my Meteor.users collection, it’s breaking when it tries to insert a new user into the collection.

I’m really struggling to debug this one. Not attaching the schema makes the issue go away, but that obviously isn’t really a workable solution. I’d love to get some feedback if anyone else has encountered this before. Thanks!


#2

This should only happen if none of the keys in your user object is matching the Schema you’ve set up for the users collection.


#3

Have you found a solution to this? I’m currently struggling as well :confused:


#4

SimpleSchema has an auto-cleanup system that will delete all fields in your document modifier that are not matching your schema. If none of the fields of your modifier are accepted by your schema, the modifier will be cleared completely so no change would be applied to your collection documents. This is what this error message tells you (IIRC).