Skip to content

Instantly share code, notes, and snippets.

@jcrugzz
Created November 8, 2013 01:58
Show Gist options
  • Save jcrugzz/7365081 to your computer and use it in GitHub Desktop.
Save jcrugzz/7365081 to your computer and use it in GitHub Desktop.
TypeError: Cannot read property 'admin' of undefined
at /home/app/nko4/source/controllers/middleware.coffee:33:22
at ensureAuth (/home/app/nko4/source/controllers/middleware.coffee:23:12)
at module.exports.ensureAccess (/home/app/nko4/source/controllers/middleware.coffee:32:14)
at callbacks (/home/app/nko4/source/node_modules/express/lib/router/index.js:164:37)
at Promise.<anonymous> (/home/app/nko4/source/controllers/middleware.coffee:67:18)
at Promise.<anonymous> (/home/app/nko4/source/node_modules/mongoose/node_modules/mpromise/lib/promise.js:162:8)
at Promise.EventEmitter.emit (events.js:95:17)
at Promise.emit (/home/app/nko4/source/node_modules/mongoose/node_modules/mpromise/lib/promise.js:79:38)
at Promise.fulfill (/home/app/nko4/source/node_modules/mongoose/node_modules/mpromise/lib/promise.js:92:20)
at /home/app/nko4/source/node_modules/mongoose/lib/query.js:1833:13
at model.Document.init (/home/app/nko4/source/node_modules/mongoose/lib/document.js:251:11)
at completeOne (/home/app/nko4/source/node_modules/mongoose/lib/query.js:1831:10)
at /home/app/nko4/source/node_modules/mongoose/lib/query.js:1799:11
at /home/app/nko4/source/node_modules/mongoose/lib/utils.js:414:16
at /home/app/nko4/source/node_modules/mongoose/node_modules/mongodb/lib/mongodb/collection.js:953:5
at Cursor.nextObject (/home/app/nko4/source/node_modules/mongoose/node_modules/mongodb/lib/mongodb/cursor.js:678:5)
at commandHandler (/home/app/nko4/source/node_modules/mongoose/node_modules/mongodb/lib/mongodb/cursor.js:658:14)
at /home/app/nko4/source/node_modules/mongoose/node_modules/mongodb/lib/mongodb/db.js:1670:9
at Server.Base._callHandler (/home/app/nko4/source/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/base.js:382:41)
at /home/app/nko4/source/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:472:18
at MongoReply.parseBody (/home/app/nko4/source/node_modules/mongoose/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
at null.<anonymous> (/home/app/nko4/source/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:430:20)
at EventEmitter.emit (events.js:95:17)
at null.<anonymous> (/home/app/nko4/source/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:191:13)
at EventEmitter.emit (events.js:98:17)
at Socket.<anonymous> (/home/app/nko4/source/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection.js:384:22)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:746:14)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:408:10)
at emitReadable (_stream_readable.js:404:5)
at readableAddChunk (_stream_readable.js:165:9)
at Socket.Readable.push (_stream_readable.js:127:10)
at TCP.onread (net.js:526:21)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment