{"action":"closed","issue":{"url":"https://api.github.com/repos/sdelements/lets-chat/issues/720","repository_url":"https://api.github.com/repos/sdelements/lets-chat","labels_url":"https://api.github.com/repos/sdelements/lets-chat/issues/720/labels{/name}","comments_url":"https://api.github.com/repos/sdelements/lets-chat/issues/720/comments","events_url":"https://api.github.com/repos/sdelements/lets-chat/issues/720/events","html_url":"https://github.com/sdelements/lets-chat/issues/720","id":183273599,"number":720,"title":"LDAP login throwing Mongoose \"schema not registered\"","user":{"login":"Cyberwizzard","id":1886713,"avatar_url":"https://avatars.githubusercontent.com/u/1886713?v=3","gravatar_id":"","url":"https://api.github.com/users/Cyberwizzard","html_url":"https://github.com/Cyberwizzard","followers_url":"https://api.github.com/users/Cyberwizzard/followers","following_url":"https://api.github.com/users/Cyberwizzard/following{/other_user}","gists_url":"https://api.github.com/users/Cyberwizzard/gists{/gist_id}","starred_url":"https://api.github.com/users/Cyberwizzard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cyberwizzard/subscriptions","organizations_url":"https://api.github.com/users/Cyberwizzard/orgs","repos_url":"https://api.github.com/users/Cyberwizzard/repos","events_url":"https://api.github.com/users/Cyberwizzard/events{/privacy}","received_events_url":"https://api.github.com/users/Cyberwizzard/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-16T15:43:13Z","updated_at":"2016-12-09T13:31:07Z","closed_at":"2016-12-09T13:31:07Z","body":"When using the LDAP authentication method, giving an invalid login gives the expected user or password incorrect message.\n\nBut when providing a correct login, the server crashes with:\n\n```\n/home/cyberwizzard/node_modules/mongoose/lib/index.js:350\n      throw new mongoose.Error.MissingSchemaError(name);\n            ^\nMissingSchemaError: Schema hasn't been registered for model \"User\".\nUse mongoose.model(name, schema)\n    at Mongoose.model (/home/cyberwizzard/node_modules/mongoose/lib/index.js:350:13)\n    at Function.Ldap.findOrCreateFromLDAP (/home/cyberwizzard/node_modules/lets-chat-ldap/lib/auth.js:75:25)\n    at Ldap.<anonymous> (/home/cyberwizzard/node_modules/lets-chat-ldap/lib/auth.js:69:25)\n    at null.<anonymous> (/home/cyberwizzard/node_modules/lets-chat-ldap/node_modules/passport-ldapauth/lib/passport-ldapauth/strategy.js:187:21)\n    at /home/cyberwizzard/node_modules/lets-chat-ldap/node_modules/passport-ldapauth/node_modules/ldapauth-fork/lib/ldapauth.js:333:18\n    at LdapAuth._getGroups (/home/cyberwizzard/node_modules/lets-chat-ldap/node_modules/passport-ldapauth/node_modules/ldapauth-fork/lib/ldapauth.js:143:14)\n    at /home/cyberwizzard/node_modules/lets-chat-ldap/node_modules/passport-ldapauth/node_modules/ldapauth-fork/lib/ldapauth.js:322:12\n    at _done (/home/cyberwizzard/node_modules/lets-chat-ldap/node_modules/ldapjs/lib/client/client.js:791:12)\n    at messageCallback (/home/cyberwizzard/node_modules/lets-chat-ldap/node_modules/ldapjs/lib/client/client.js:869:16)\n    at Parser.onMessage (/home/cyberwizzard/node_modules/lets-chat-ldap/node_modules/ldapjs/lib/client/client.js:199:12)\n    at Parser.emit (events.js:107:17)\n    at Parser.write (/home/cyberwizzard/node_modules/lets-chat-ldap/node_modules/ldapjs/lib/messages/parser.js:105:8)\n    at Socket.onData (/home/cyberwizzard/node_modules/lets-chat-ldap/node_modules/ldapjs/lib/client/client.js:155:24)\n    at Socket.emit (events.js:107:17)\n    at readableAddChunk (_stream_readable.js:163:16)\n    at Socket.Readable.push (_stream_readable.js:126:10)\n    at TCP.onread (net.js:540:20)\n```\n\nWhat is this and how can it be solved?\n"}}
{"actor":{"display_login":"Cyberwizzard"}}