Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't follow user #441

Closed
adrienjoly opened this issue Jan 31, 2021 · 2 comments · Fixed by #443
Closed

Can't follow user #441

adrienjoly opened this issue Jan 31, 2021 · 2 comments · Fixed by #443
Assignees
Labels
Projects

Comments

@adrienjoly
Copy link
Member

adrienjoly commented Jan 31, 2021

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://openwhyd.org/u/6016705008ced3543d21bb2f
  2. Click on "follow" => nothing happens, except an error in the JavaScript console:
GET https://openwhyd.org/api/follow?action=insert&tId=6016705008ced3543d21bb2f&_=1612123540712 => 404
@adrienjoly adrienjoly added the bug label Jan 31, 2021
@adrienjoly adrienjoly changed the title Can't follow user profile Can't follow user Jan 31, 2021
@adrienjoly adrienjoly added this to 📥 Inbox / ideas in Development via automation Jan 31, 2021
@adrienjoly adrienjoly moved this from 📥 Inbox / ideas to ⚡️To Do Next in Development Jan 31, 2021
@adrienjoly
Copy link
Member Author

adrienjoly commented Feb 7, 2021

from node.js logs ($ docker-compose logs -f web), when reproducing the API call locally:

web_1    | ▶ 2021-02-07T15:53:30.748Z GET /api/follow?action=insert&tId=58fd0b7998267ba4b34b73f2&_=1612712987922 (follow.controller) {"_subCtr":"follow","action":"insert","tId":"58fd0b7998267ba4b34b73f2","_":"1612712987922"}
web_1    | ❌ Error -- Sun, 07 Feb 2021 15:53:30 GMT [subdir] error while contacting /api/follow?action=insert&tId=58fd0b7998267ba4b34b73f2&_=1612712987922 TypeError: Update document requires atomic operators
web_1    |     at new UpdateOneOperation (/usr/src/app/node_modules/mongodb/lib/operations/update_one.js:12:13)
web_1    |     at Collection.updateOne (/usr/src/app/node_modules/mongodb/lib/collection.js:758:5)
web_1    |     at Object.exports.add (/usr/src/app/app/models/follow.js:70:14)
web_1    |     at follow (/usr/src/app/app/controllers/api/follow.js:24:19)
web_1    |     at exports.controller (/usr/src/app/app/controllers/api/follow.js:138:3)
web_1    |     at Object.exports.controller (/usr/src/app/app/controllers/subdir.js:20:5)
web_1    |     at endpointHandler (/usr/src/app/app/lib/my-http-wrapper/http/Application.js:180:27)
web_1    |     at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
web_1    |     at next (/usr/src/app/node_modules/express/lib/router/route.js:137:13)
web_1    |     at Route.dispatch (/usr/src/app/node_modules/express/lib/router/route.js:112:3)
web_1    | ◀ 2021-02-07T15:53:30.732Z GET /api/follow responds 404 after 31 ms

=> Error: TypeError: Update document requires atomic operators

@adrienjoly
Copy link
Member Author

adrienjoly commented Feb 7, 2021

According to Datadog, this error has been happening only on follow API calls, and since January 29th:

image

@adrienjoly adrienjoly self-assigned this Feb 7, 2021
Development automation moved this from ⚡️To Do Next to ✔️ Done / pending QA Feb 7, 2021
adrienjoly added a commit that referenced this issue Feb 7, 2021
adrienjoly pushed a commit that referenced this issue Feb 7, 2021
## [1.44.30](v1.44.29...v1.44.30) (2021-02-07)

### Bug Fixes

* **api:** Follow API returns 404 ([#443](#443)) ([0e62b44](0e62b44)), closes [#441](#441)
@adrienjoly adrienjoly moved this from ✔️ Done / pending QA to 🌲 In production in Development Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development
  
🌲 In production
Development

Successfully merging a pull request may close this issue.

1 participant