EnCiv / undebate-ssp

Undebate Self Service Portal- Web portal where election administrators of democratically run organizations create undebates for their candidates and voters
Other
6 stars 9 forks source link

SignIn error with updateOne #201

Open ddfridley opened 2 years ago

ddfridley commented 2 years ago

Another defect noticed when trying to post moderator (this time I do have cloudinary setup): [1] [2022-09-24T18:50:04.068] [ERROR] node - sign_in trying to update user info failed TypeError: Update document requires atomic operators [1] at new UpdateOneOperation (/home/ihudson/src/undebate-ssp/node_modules/mongodb/lib/operations/update_one.js:14:13) [1] at Collection.updateOne (/home/ihudson/src/undebate-ssp/node_modules/mongodb/lib/collection.js:772:5) [1] at Function.updateOne (/home/ihudson/src/undebate-ssp/node_modules/mongo-models/index.js:454:41) [1] at signIn (/home/ihudson/src/undebate-ssp/node_modules/civil-server/dist/routes/sign-in.js:82:27) User { [1] _id: 632fa57a085e6c5a807d8295,

The code for this is in https://github.com/EnCiv/civil-server/blob/main/app/routes/sign-in.js

ice1080 commented 2 years ago

This issue was only seen once on 24-Sep-2022 and when the app was run again with a reset db on 25-Sep-2022 it did not occur again.