{"action":"created","issue":{"url":"https://api.github.com/repos/joegoldbeck/mongoose-encryption/issues/28","labels_url":"https://api.github.com/repos/joegoldbeck/mongoose-encryption/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/joegoldbeck/mongoose-encryption/issues/28/comments","events_url":"https://api.github.com/repos/joegoldbeck/mongoose-encryption/issues/28/events","html_url":"https://github.com/joegoldbeck/mongoose-encryption/issues/28","id":109775758,"number":28,"title":"Failing Test on Node v4.1.0","user":{"login":"lafama","id":260220,"avatar_url":"https://avatars.githubusercontent.com/u/260220?v=3","gravatar_id":"","url":"https://api.github.com/users/lafama","html_url":"https://github.com/lafama","followers_url":"https://api.github.com/users/lafama/followers","following_url":"https://api.github.com/users/lafama/following{/other_user}","gists_url":"https://api.github.com/users/lafama/gists{/gist_id}","starred_url":"https://api.github.com/users/lafama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lafama/subscriptions","organizations_url":"https://api.github.com/users/lafama/orgs","repos_url":"https://api.github.com/users/lafama/repos","events_url":"https://api.github.com/users/lafama/events{/privacy}","received_events_url":"https://api.github.com/users/lafama/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joegoldbeck/mongoose-encryption/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-10-05T11:15:59Z","updated_at":"2015-10-27T05:05:43Z","closed_at":null,"body":"Am getting the following\r\n```\r\ndocument.save() \"before each\" hook:\r\n     Uncaught TypeError: Not a buffer\r\n    at TypeError (native)\r\n    at new Decipheriv (crypto.js:235:16)\r\n    at Object.Decipheriv (crypto.js:232:12)\r\n    at model.schema.methods.decryptSync (/Users/Downloads/mongoose-encryption-master/index.js:379:27)\r\n    at Function.invoke (/Users/Downloads/mongoose-encryption-master/node_modules/sinon/lib/sinon/spy.js:156:55)\r\n    at model.proxy [as decryptSync] (/Users/Downloads/mongoose-encryption-master/node_modules/sinon/lib/sinon/spy.js:82:26)\r\n    at model.<anonymous> (/Users/Downloads/mongoose-encryption-master/index.js:312:17)\r\n    at EventEmitter.<anonymous> (/Users/Downloads/mongoose-encryption-master/node_modules/mongoose/lib/schema.js:781:17)\r\n    at emitTwo (events.js:87:13)\r\n    at EventEmitter.emit (events.js:172:7)\r\n    at model.Document.(anonymous function) [as emit] (/Users/Downloads/mongoose-encryption-master/node_modules/mongoose/lib/document.js:88:42)\r\n    at /Users/Downloads/mongoose-encryption-master/node_modules/mongoose/lib/model.js:268:13\r\n    at /Users/Downloads/mongoose-encryption-master/node_modules/mongoose/lib/model.js:127:7\r\n    at /Users/Downloads/mongoose-encryption-master/node_modules/mongodb/lib/collection.js:449:5\r\n    at /Users/Downloads/mongoose-encryption-master/node_modules/mongodb/lib/collection.js:593:5\r\n    at /Users/Downloads/mongoose-encryption-master/node_modules/mongodb/lib/bulk/unordered.js:457:9\r\n    at resultHandler (/Users/Downloads/mongoose-encryption-master/node_modules/mongodb/lib/bulk/unordered.js:409:5)\r\n    at /Users/Downloads/mongoose-encryption-master/node_modules/mongodb-core/lib/topologies/server.js:756:13\r\n    at [object Object].Callbacks.emit (/Users/Downloads/mongoose-encryption-master/node_modules/mongodb-core/lib/topologies/server.js:95:3)\r\n    at [object Object].messageHandler (/Users/Downloads/mongoose-encryption-master/node_modules/mongodb-core/lib/topologies/server.js:243:23)\r\n    at Socket.<anonymous> (/Users/Downloads/mongoose-encryption-master/node_modules/mongodb-core/lib/connection/connection.js:262:22)\r\n    at emitOne (events.js:77:13)\r\n    at Socket.emit (events.js:169:7)\r\n    at readableAddChunk (_stream_readable.js:146:16)\r\n    at Socket.Readable.push (_stream_readable.js:110:10)\r\n    at TCP.onread (net.js:523:20)\r\n``"},"comment":{"url":"https://api.github.com/repos/joegoldbeck/mongoose-encryption/issues/comments/151376871","html_url":"https://github.com/joegoldbeck/mongoose-encryption/issues/28#issuecomment-151376871","issue_url":"https://api.github.com/repos/joegoldbeck/mongoose-encryption/issues/28","id":151376871,"user":{"login":"deepakc","id":4333641,"avatar_url":"https://avatars.githubusercontent.com/u/4333641?v=3","gravatar_id":"","url":"https://api.github.com/users/deepakc","html_url":"https://github.com/deepakc","followers_url":"https://api.github.com/users/deepakc/followers","following_url":"https://api.github.com/users/deepakc/following{/other_user}","gists_url":"https://api.github.com/users/deepakc/gists{/gist_id}","starred_url":"https://api.github.com/users/deepakc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepakc/subscriptions","organizations_url":"https://api.github.com/users/deepakc/orgs","repos_url":"https://api.github.com/users/deepakc/repos","events_url":"https://api.github.com/users/deepakc/events{/privacy}","received_events_url":"https://api.github.com/users/deepakc/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T05:05:43Z","updated_at":"2015-10-27T05:05:43Z","body":"Fails from Node v3.0.0\r\nFrom v3.0.0 release notes - https://github.com/nodejs/node/blob/v3.0.0/CHANGELOG.md\r\n```\"Due to changes in V8, it has been necessary to reimplement Buffer on top of V8's Uint8Array\"```"}}