bnoguchi/everyauth — Issue #111: Null dereference on twitter error
Author: coalitions
Created: 2011-11-14 18:08:06+00:00
State: open

Occasionally twitter login fails with a null dereference, crashing the app. Here is the stack crawl:

/path/to/mynodeapp/node_modules/everyauth/lib/modules/twitter.js:35
return new Error(data.data.match(/(.+)<\/error>/)[1]);
^
TypeError: Cannot read property '1' of null
at /path/to/mynodeapp/node_modules/everyauth/lib/modules/twitter.js:35:61
at /path/to/mynodeapp/node_modules/everyauth/lib/step.js:97:21
at [object Object].fail (/path/to/mynodeapp/node_modules/everyauth/lib/promise.js:53:24)
at /path/to/mynodeapp/node_modules/everyauth/lib/modules/oauth.js:168:24
at /path/to/mynodeapp/node_modules/everyauth/node_modules/oauth/lib/oauth.js:432:22
at passBackControl (/path/to/mynodeapp/node_modules/everyauth/node_modules/oauth/lib/oauth.js:366:13)
at IncomingMessage. (/path/to/mynodeapp/node_modules/everyauth/node_modules/oauth/lib/oauth.js:378:9)
at IncomingMessage.emit (events.js:81:20)
at HTTPParser.onMessageComplete (http.js:133:23)
at CleartextStream.ondata (http.js:1231:22)