I have recently upgraded parse-server to v4.2. I have also updated Mongo to v4.2 (It’s a Replica Set configuration). Now when parse-server is raised, the following error appears “Unable to ensure uniqueness for user email addresses: Tried to ensure field uniqueness for a class that already has duplicates.”
The detailed error is this:
{
"message": "Unable to ensure uniqueness for user email addresses: Tried to ensure field uniqueness for a class that already has duplicates.",
"code": 137,
"level": "warn",
"stack": "Error: Tried to ensure field uniqueness for a class that already has duplicates.\n at _adaptiveCollection.then.catch.error (/parse/node_modules/parse-server/lib/Adapters/Storage/Mongo/MongoStorageAdapter.js:569:15)\n at <anonymous>\n at process._tickDomainCallback (internal/process/next_tick.js:229:7)"
}
The error is caused by the _User
class that has the username and email fields with the same data. Any ideas on how to fix the problem or make the parse-server not do this check.