UserPreference validation returns dublicate key in log

Unit test are passing but the validation on UI return invalid response.
I checked the log & it says duplicate key as below

tion: E11000 duplicate key error collection: sample_mflix.sessions index: user_id_1 dup key: { : “yw1nml5zn@t6pl9.td2” }] with root cause

I tried deleting the key from compass but still getting same error.

I’m having the same problem. Hope someone can help.


Same problem for me as well.

Finally got this resolved . check for exiting user & use update or insert method.