Closed Bug 1404606 Opened 9 years ago Closed 9 years ago

Login crashing because Mozillians is returning non-JSON

Categories

(Taskcluster :: Services, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dustin, Assigned: dustin)

References

(Depends on 1 open bug)

Details

Sep 30 07:26:26 taskcluster-login app/web.1: Uncaught Exception! Attempting to report to Sentry and crash. Sep 30 07:26:26 taskcluster-login app/web.1: Error: Failed to parse JSON payload: Sep 30 07:26:26 taskcluster-login app/web.1: at IncomingMessage.<anonymous> (/app/node_modules/mozillians-client/src/mozillians.js:73:17) Sep 30 07:26:26 taskcluster-login app/web.1: at Object.onceWrapper (events.js:314:30) Sep 30 07:26:26 taskcluster-login app/web.1: at emitNone (events.js:110:20) Sep 30 07:26:26 taskcluster-login app/web.1: at IncomingMessage.emit (events.js:207:7) Sep 30 07:26:26 taskcluster-login app/web.1: at endReadableNT (_stream_readable.js:1045:12) Sep 30 07:26:26 taskcluster-login app/web.1: at _combinedTickCallback (internal/process/next_tick.js:138:11) Sep 30 07:26:26 taskcluster-login app/web.1: at process._tickDomainCallback (internal/process/next_tick.js:218:9) Sep 30 07:26:26 taskcluster-login app/web.1: Uncaught Exception! Attempting to report to Sentry and crash. Sep 30 07:26:26 taskcluster-login app/web.1: Error: Failed to parse JSON payload: Sep 30 07:26:26 taskcluster-login app/web.1: at IncomingMessage.<anonymous> (/app/node_modules/mozillians-client/src/mozillians.js:73:17) Sep 30 07:26:26 taskcluster-login app/web.1: at Object.onceWrapper (events.js:314:30) Sep 30 07:26:26 taskcluster-login app/web.1: at emitNone (events.js:110:20) Sep 30 07:26:26 taskcluster-login app/web.1: at IncomingMessage.emit (events.js:207:7) Sep 30 07:26:26 taskcluster-login app/web.1: at endReadableNT (_stream_readable.js:1045:12) Sep 30 07:26:26 taskcluster-login app/web.1: at _combinedTickCallback (internal/process/next_tick.js:138:11) Sep 30 07:26:26 taskcluster-login app/web.1: at process._tickDomainCallback (internal/process/next_tick.js:218:9)
I've temporarily disabled mozillians authorization.
Depends on: 1404607
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
This has since crashed repeatedly. We need to build in some resilience to Mozillians failures. They seem short-term, so some retries would help (as we already have for LDAP). Currently these failures crash the login service, turning a hiccup into an outage. So we shouldn't crash (but still report!)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
We are already using 5 retries with backoff in mozillians-client, so these 503 errors are going on for longer than that.
Cancel that -- we're not retrying on this particular error.
https://github.com/jonasfj/node-mozillians-client/pull/3 - jonas, I don't have a way to ask on github, so please r? :)
Flags: needinfo?(jopsen)
This was an "uncaught exception" because it was using `throw` in an event handler, rather than reject(err). PR#3 above fixes that too. Promise rejections are properly channeled back into a 500 for the caller, which will then re-retry it.
new node-mozillians-client went out a few hours ago, and you have an r+ on the PR for tc-login :) Note: I have a hard time believing that this ran as well as it did without retries working properly. Thanks for finding that, I feel a little unhappy I didn't get this right initially.
Flags: needinfo?(jopsen)
Deployed PR#65.
Status: REOPENED → RESOLVED
Closed: 9 years ago → 9 years ago
Resolution: --- → FIXED
Component: Login → Services
You need to log in before you can comment on or make changes to this bug.