Closed
Bug 885567
Opened 12 years ago
Closed 12 years ago
[Crash] TypeError: cannot read property rawTags of undefined @/var/www/butter/routes/api/find.js:22:35
Categories
(Webmaker Graveyard :: Popcorn Maker, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: humph, Assigned: cade)
References
Details
Attachments
(3 files)
This just brought down Popcorn Maker Prod. It *might* have been due to cade respining the MakeAPI on prod, and there being some kind of timing issue with hitting it while coming back up? Regardless, we shouldn't crash.
module.exports = function( Project ) {
return function( req, res ) {
var projectJSON = JSON.parse( res.locals.project.data );
projectJSON.name = res.locals.project.name;
projectJSON.projectID = res.locals.project.id;
projectJSON.description = res.locals.project.description;
projectJSON.template = res.locals.project.template;
projectJSON.publishUrl = utils.embedShellURL( req.session.username, res.locals.project.id );
projectJSON.iframeUrl = utils.embedURL( req.session.username, res.locals.project.id );
projectJSON.makeid = res.locals.project.makeid;
makeClient.id( res.locals.project.makeid ).then(function( err, make ) {
if ( err ) {
return res.json( 500, { error: err } );
}
--> projectJSON.tags = make[ 0 ].rawTags;
I'm finding this stack hard to reconcile, here it is in full:
2013-06-20 22:33:20.0 i-fea61595 Info local5 i-fea61595 app=butter-production: at Request._callback (/var/www/butter/node_modules/makeapi/public/js/make-api.js:41:16)
2013-06-20 22:33:20.0 i-fea61595 Info local5 i-fea61595 app=butter-production: at Request.onResponse (/var/www/butter/node_modules/makeapi/node_modules/request/index.js:876:14)
2013-06-20 22:33:20.0 i-fea61595 Info local5 i-fea61595 app=butter-production: at IncomingMessage._emitEnd (http.js:367:10)
2013-06-20 22:33:20.0 i-fea61595 Info local5 i-fea61595 app=butter-production: throw er;
2013-06-20 22:33:20.0 i-fea61595 Info local5 i-fea61595 app=butter-production: domain.js:66
2013-06-20 22:33:20.0 i-fea61595 Info local5 i-fea61595 app=butter-production: ^
2013-06-20 22:33:20.0 i-fea61595 Info local5 i-fea61595 app=butter-production: at Make.then (/var/www/butter/node_modules/makeapi/public/js/make-api.js:447:15)
2013-06-20 22:33:20.0 i-fea61595 Info local5 i-fea61595 app=butter-production: at IncomingMessage.EventEmitter.emit (events.js:126:20)
2013-06-20 22:33:20.0 i-fea61595 Info local5 i-fea61595 app=butter-production: at Request.EventEmitter.emit (events.js:126:20)
2013-06-20 22:33:20.0 i-fea61595 Info local5 i-fea61595 app=butter-production: at module.exports (/var/www/butter/routes/api/find.js:22:35)
2013-06-20 22:33:20.0 i-fea61595 Info local5 i-fea61595 app=butter-production: TypeError: Cannot read property 'rawTags' of undefined
2013-06-20 22:33:20.0 i-fea61595 Info local5 i-fea61595 app=butter-production: at Request.init.self.callback (/var/www/butter/node_modules/makeapi/node_modules/request/index.js:148:22)
2013-06-20 22:33:20.0 i-fea61595 Info local5 i-fea61595 app=butter-production: at IncomingMessage.Request.onResponse.buffer (/var/www/butter/node_modules/makeapi/node_modules/request/index.js: ...
2013-06-20 22:33:20.0 i-fea61595 Info local5 i-fea61595 app=butter-production: 88.215.37.80 - - [Thu, 20 Jun 2013 22:33:20 GMT] "GET / HTTP/1.1" 200 - "-" "Mozilla/5.0 (Windows NT 6.2; WOW64) Appl ...
2013-06-20 22:33:20.0 i-fea61595 Info local5 i-fea61595 app=butter-production:
2013-06-20 22:33:20.0 i-fea61595 Info local5 i-fea61595 app=butter-production: at Request.EventEmitter.emit (events.js:99:17)
2013-06-20 22:33:15.0 i-fea61595 Info local5 i-fea61595 app=butter-production: 10.212.129.28 - - [Thu, 20 Jun 2013 22:33:15 GMT] "GET / HTTP/1.1" 200 3508 "-" "ELB-HealthChecker/1.0"
2013-06-20 22:33:14.0 i-ae0e4bcd Info local5 i-ae0e4bcd app=butter-production: 127.0.0.1 - - [Thu, 20 Jun 2013 22:33:14 GMT] "GET / HTTP/1.1" 200 3514 "-" "monit/5.3.2"
2013-06-20 22:33:04.0 i-ae0e4bcd Info local5 i-ae0e4bcd app=butter-production: 127.0.0.1 - - [Thu, 20 Jun 2013 22:33:04 GMT] "GET / HTTP/1.1" 200 3514 "-" "monit/5.3.2"
2013-06-20 22:33:03.0 i-fea61595 Info local5 i-fea61595 app=butter-production: 10.212.129.28 - - [Thu, 20 Jun 2013 22:33:03 GMT] "GET / HTTP/1.1" 200 3508 "-" "ELB-HealthChecker/1.0"
2013-06-20 22:33:02.0 i-fea61595 Info local5 i-fea61595 app=butter-production: 5.164.145.130 - - [Thu, 20 Jun 2013 22:33:02 GMT] "GET / HTTP/1.1" 200 3508 "http://rhcloud.com/" "Mozilla/5.0 (Windo ...
2013-06-20 22:33:00.0 i-10c9407a Info local5 i-10c9407a app=butter-production: at Request.EventEmitter.emit (events.js:126:20)
2013-06-20 22:33:00.0 i-10c9407a Info local5 i-10c9407a app=butter-production: at Request._callback (/var/www/butter/node_modules/makeapi/public/js/make-api.js:41:16)
2013-06-20 22:33:00.0 i-fea61595 Info local5 i-fea61595 app=butter-production: 91.109.115.41 - - [Thu, 20 Jun 2013 22:33:00 GMT] "GET / HTTP/1.1" 200 3508 "-" "Pingdom.com_bot_version_1.4_(http:// ...
2013-06-20 22:33:00.0 i-10c9407a Info local5 i-10c9407a app=butter-production:
2013-06-20 22:33:00.0 i-10c9407a Info local5 i-10c9407a app=butter-production: at Make.then (/var/www/butter/node_modules/makeapi/public/js/make-api.js:447:15)
2013-06-20 22:33:00.0 i-10c9407a Info local5 i-10c9407a app=butter-production: at Request.init.self.callback (/var/www/butter/node_modules/makeapi/node_modules/request/index.js:148:22)
2013-06-20 22:33:00.0 i-10c9407a Info local5 i-10c9407a app=butter-production: at Request.onResponse (/var/www/butter/node_modules/makeapi/node_modules/request/index.js:876:14)
2013-06-20 22:33:00.0 i-10c9407a Info local5 i-10c9407a app=butter-production: 88.215.37.80 - - [Thu, 20 Jun 2013 22:33:00 GMT] "GET /api/butterconfig?bust=1371767588089 HTTP/1.1" 200 - "https://p ...
2013-06-20 22:33:00.0 i-10c9407a Info local5 i-10c9407a app=butter-production: ^
2013-06-20 22:33:00.0 i-10c9407a Info local5 i-10c9407a app=butter-production: domain.js:66
2013-06-20 22:33:00.0 i-10c9407a Info local5 i-10c9407a app=butter-production: at IncomingMessage.EventEmitter.emit (events.js:126:20)
2013-06-20 22:33:00.0 i-10c9407a Info local5 i-10c9407a app=butter-production: TypeError: Cannot read property 'rawTags' of undefined
2013-06-20 22:33:00.0 i-10c9407a Info local5 i-10c9407a app=butter-production: at Request.EventEmitter.emit (events.js:99:17)
2013-06-20 22:33:00.0 i-10c9407a Info local5 i-10c9407a app=butter-production: 88.215.37.80 - - [Thu, 20 Jun 2013 22:33:00 GMT] "GET /templates/basic/config.json HTTP/1.1" 304 - "https://popcorn.w ...
2013-06-20 22:33:00.0 i-10c9407a Info local5 i-10c9407a app=butter-production: at module.exports (/var/www/butter/routes/api/find.js:22:35)
2013-06-20 22:33:00.0 i-10c9407a Info local5 i-10c9407a app=butter-production: at IncomingMessage._emitEnd (http.js:367:10)
2013-06-20 22:33:00.0 i-10c9407a Info local5 i-10c9407a app=butter-production: at IncomingMessage.Request.onResponse.buffer (/var/www/butter/node_modules/makeapi/node_modules/request/index.js: ...
2013-06-20 22:33:00.0 i-10c9407a Info local5 i-10c9407a app=butter-production: throw er;
Reporter | ||
Updated•12 years ago
|
Component: MakeAPI → Popcorn Maker
Reporter | ||
Comment 1•12 years ago
|
||
Noticing that MakeAPI is at 0.1.28 on PROD, and thibmle, webmaker.org, and Popcorn Maker all use 0.1.24 for their makeapi node module. I wonder if this version skew is hurting us, since we switched how we return results data vs. data.makes.
Reporter | ||
Comment 2•12 years ago
|
||
We're going to have figure out some hygiene around pushing so we don't get version skew across apps.
Reporter | ||
Comment 3•12 years ago
|
||
Confirmed, we're dead in the water with 0.1.28 vs. 0.1.24. On 0.1.24 the make-api.js stuff does this:
function( err, data ) {
if ( err ) {
callback( err );
} else {
// Wrap resulting makes with some extra API.
--> var hits = data;
On 0.1.28 it does
function( err, data ) {
if ( err ) {
callback( err );
} else {
// Wrap resulting makes with some extra API.
--> var hits = data.makes;
Every app needs to get respun so it picks this up.
Assignee | ||
Comment 4•12 years ago
|
||
This is for Popcorn Maker. Updates to makeapi v0.1.28
Attachment #765668 -
Flags: review?(david.humphrey)
Assignee | ||
Comment 5•12 years ago
|
||
Updates MakeAPI on thimble to v0.1.28
Assignee | ||
Comment 6•12 years ago
|
||
I don't wanna flood humph's review queue, so just adding the attachments now.
Assignee | ||
Updated•12 years ago
|
Attachment #765680 -
Flags: review?(dale)
Assignee | ||
Updated•12 years ago
|
Attachment #765678 -
Flags: review?(david.humphrey) → review?(dale)
Assignee | ||
Updated•12 years ago
|
Attachment #765668 -
Flags: review?(david.humphrey) → review?(dale)
Assignee | ||
Comment 7•12 years ago
|
||
NOTE: these updates to v0.1.28 are NOT compatible with any previous MakeAPI version.
I should have bumped to v0.2.0 but... I did not.
Updated•12 years ago
|
Attachment #765680 -
Flags: review?(dale) → review+
Updated•12 years ago
|
Attachment #765668 -
Flags: review?(dale) → review+
Updated•12 years ago
|
Attachment #765678 -
Flags: review?(dale) → review+
Assignee | ||
Comment 8•12 years ago
|
||
After consideration of the changes, I've bumped the Make API to v0.2.0 (tags pushed to GH and NPM) and updated the above pull requests to match.
Comment 9•12 years ago
|
||
Commit pushed to master at https://github.com/mozilla/webmaker.org
https://github.com/mozilla/webmaker.org/commit/4264504efa35f424456e0c9c5d5f815f4d61d022
Fix Bug 885567 - Update MakeAPI module to v0.2.0
Comment 10•12 years ago
|
||
Commit pushed to master at https://github.com/mozilla/thimble.webmaker.org
https://github.com/mozilla/thimble.webmaker.org/commit/ead0bb9bac7df67e2205454c2634338f16424e05
Fix Bug 885567 - Update MakeAPI module to v0.2.0
Updated•12 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 11•12 years ago
|
||
Commit pushed to master at https://github.com/mozilla/popcorn.webmaker.org
https://github.com/mozilla/popcorn.webmaker.org/commit/563455738434f984f92eb8cba64296810a083138
Fix Bug 885567 - Update MakeAPI module to v0.2.0
Updated•12 years ago
|
Attachment mime type: text/plain text/plain text/plain → text/x-github-pull-request text/x-github-pull-request text/x-github-pull-request
You need to log in
before you can comment on or make changes to this bug.
Description
•