{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/mongoose/issues/3286","labels_url":"https://api.github.com/repos/Automattic/mongoose/issues/3286/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/mongoose/issues/3286/comments","events_url":"https://api.github.com/repos/Automattic/mongoose/issues/3286/events","html_url":"https://github.com/Automattic/mongoose/issues/3286","id":101897206,"number":3286,"title":"Mongoose 4.1+ error with bluebird (Cannot assign to read only property) ","user":{"login":"mgcrea","id":108273,"avatar_url":"https://avatars.githubusercontent.com/u/108273?v=3","gravatar_id":"","url":"https://api.github.com/users/mgcrea","html_url":"https://github.com/mgcrea","followers_url":"https://api.github.com/users/mgcrea/followers","following_url":"https://api.github.com/users/mgcrea/following{/other_user}","gists_url":"https://api.github.com/users/mgcrea/gists{/gist_id}","starred_url":"https://api.github.com/users/mgcrea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgcrea/subscriptions","organizations_url":"https://api.github.com/users/mgcrea/orgs","repos_url":"https://api.github.com/users/mgcrea/repos","events_url":"https://api.github.com/users/mgcrea/events{/privacy}","received_events_url":"https://api.github.com/users/mgcrea/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Automattic/mongoose/labels/can't%20reproduce","name":"can't reproduce","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Automattic/mongoose/milestones/54","html_url":"https://github.com/Automattic/mongoose/milestones/4.1.4","labels_url":"https://api.github.com/repos/Automattic/mongoose/milestones/54/labels","id":1251783,"number":54,"title":"4.1.4","description":"","creator":{"login":"vkarpov15","id":1620265,"avatar_url":"https://avatars.githubusercontent.com/u/1620265?v=3","gravatar_id":"","url":"https://api.github.com/users/vkarpov15","html_url":"https://github.com/vkarpov15","followers_url":"https://api.github.com/users/vkarpov15/followers","following_url":"https://api.github.com/users/vkarpov15/following{/other_user}","gists_url":"https://api.github.com/users/vkarpov15/gists{/gist_id}","starred_url":"https://api.github.com/users/vkarpov15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkarpov15/subscriptions","organizations_url":"https://api.github.com/users/vkarpov15/orgs","repos_url":"https://api.github.com/users/vkarpov15/repos","events_url":"https://api.github.com/users/vkarpov15/events{/privacy}","received_events_url":"https://api.github.com/users/vkarpov15/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":14,"state":"open","created_at":"2015-08-12T14:08:51Z","updated_at":"2015-08-28T18:13:42Z","due_on":"2015-08-28T04:00:00Z","closed_at":null},"comments":7,"created_at":"2015-08-19T13:42:53Z","updated_at":"2015-08-28T19:38:20Z","closed_at":null,"body":"Encountering `TypeError: Cannot assign to read only property 'checkKeys' of true`.\r\n\r\nUsing:\r\n\r\n```js\r\n  schema.statics.createAsync = function() {\r\n    return Promise.promisify(this.create).apply(this, arguments);\r\n  };\r\n```\r\n\r\nUsed to work with the `4.0` branch."},"comment":{"url":"https://api.github.com/repos/Automattic/mongoose/issues/comments/135868654","html_url":"https://github.com/Automattic/mongoose/issues/3286#issuecomment-135868654","issue_url":"https://api.github.com/repos/Automattic/mongoose/issues/3286","id":135868654,"user":{"login":"BrandonCopley","id":1200774,"avatar_url":"https://avatars.githubusercontent.com/u/1200774?v=3","gravatar_id":"","url":"https://api.github.com/users/BrandonCopley","html_url":"https://github.com/BrandonCopley","followers_url":"https://api.github.com/users/BrandonCopley/followers","following_url":"https://api.github.com/users/BrandonCopley/following{/other_user}","gists_url":"https://api.github.com/users/BrandonCopley/gists{/gist_id}","starred_url":"https://api.github.com/users/BrandonCopley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrandonCopley/subscriptions","organizations_url":"https://api.github.com/users/BrandonCopley/orgs","repos_url":"https://api.github.com/users/BrandonCopley/repos","events_url":"https://api.github.com/users/BrandonCopley/events{/privacy}","received_events_url":"https://api.github.com/users/BrandonCopley/received_events","type":"User","site_admin":false},"created_at":"2015-08-28T19:38:20Z","updated_at":"2015-08-28T19:38:20Z","body":"Maybe this would help?\r\n\r\n    TypeError: Cannot assign to read only property 'checkKeys' of true\r\n        at Collection.insertMany (/Users/brandoncopley/github/my_project/node_modules/mongoose/node_modules/mongodb/lib/collection.js:427:23)\r\n        at Collection.insert (/Users/brandoncopley/github/my_project/node_modules/mongoose/node_modules/mongodb/lib/collection.js:668:15)\r\n        at NativeCollection.(anonymous function) [as insert] (/Users/brandoncopley/github/my_project/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:142:28)\r\n        at /Users/brandoncopley/github/my_project/node_modules/mongoose/lib/model.js:116:24\r\n        at new Promise.ES6 (/Users/brandoncopley/github/my_project/node_modules/mongoose/lib/promise.js:45:5)\r\n        at model.$__handleSave (/Users/brandoncopley/github/my_project/node_modules/mongoose/lib/model.js:102:12)\r\n        at model.Model.save (/Users/brandoncopley/github/my_project/node_modules/mongoose/lib/model.js:224:16)\r\n        at model._done (/Users/brandoncopley/github/my_project/node_modules/mongoose/node_modules/hooks-fixed/hooks.js:101:24)\r\n        at _next (/Users/brandoncopley/github/my_project/node_modules/mongoose/node_modules/hooks-fixed/hooks.js:64:28)\r\n        at fnWrapper (/Users/brandoncopley/github/my_project/node_modules/mongoose/node_modules/hooks-fixed/hooks.js:186:18)\r\n        at model.<anonymous> (/Users/brandoncopley/github/my_project/node_modules/passport-local-mongoose/lib/passport-local-mongoose.js:72:9)\r\n        at _next (/Users/brandoncopley/github/my_project/node_modules/mongoose/node_modules/hooks-fixed/hooks.js:62:30)\r\n        at fnWrapper (/Users/brandoncopley/github/my_project/node_modules/mongoose/node_modules/hooks-fixed/hooks.js:186:18)\r\n        at model.Object.defineProperty.value.fn (/Users/brandoncopley/github/my_project/node_modules/mongoose/lib/schema.js:213:9)\r\n        at _next (/Users/brandoncopley/github/my_project/node_modules/mongoose/node_modules/hooks-fixed/hooks.js:62:30)\r\n        at fnWrapper (/Users/brandoncopley/github/my_project/node_modules/mongoose/node_modules/hooks-fixed/hooks.js:186:18)"}}