{"action":"created","issue":{"url":"https://api.github.com/repos/mrvautin/adminMongo/issues/124","repository_url":"https://api.github.com/repos/mrvautin/adminMongo","labels_url":"https://api.github.com/repos/mrvautin/adminMongo/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/mrvautin/adminMongo/issues/124/comments","events_url":"https://api.github.com/repos/mrvautin/adminMongo/issues/124/events","html_url":"https://github.com/mrvautin/adminMongo/issues/124","id":192391489,"number":124,"title":"Fail with admin authorization","user":{"login":"perqin","id":7088631,"avatar_url":"https://avatars.githubusercontent.com/u/7088631?v=3","gravatar_id":"","url":"https://api.github.com/users/perqin","html_url":"https://github.com/perqin","followers_url":"https://api.github.com/users/perqin/followers","following_url":"https://api.github.com/users/perqin/following{/other_user}","gists_url":"https://api.github.com/users/perqin/gists{/gist_id}","starred_url":"https://api.github.com/users/perqin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perqin/subscriptions","organizations_url":"https://api.github.com/users/perqin/orgs","repos_url":"https://api.github.com/users/perqin/repos","events_url":"https://api.github.com/users/perqin/events{/privacy}","received_events_url":"https://api.github.com/users/perqin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-29T20:32:10Z","updated_at":"2016-11-29T23:09:27Z","closed_at":null,"body":"I add an admin user in `admin` database and use the following uri to add a new connection in adminMongo:\r\n```\r\nmongodb://admin:thepass@127.0.0.1:27017/?authSource=admin\r\n```\r\nBut then the server throws errors:\r\n```\r\n_http_outgoing.js:346\r\n    throw new Error('Can\\'t set headers after they are sent.');\r\n    ^\r\n\r\nError: Can't set headers after they are sent.\r\n    at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:346:11)\r\n    at ServerResponse.header (/home/perqin/Apps/adminMongo/node_modules/express/lib/response.js:719:10)\r\n    at ServerResponse.send (/home/perqin/Apps/adminMongo/node_modules/express/lib/response.js:164:12)\r\n    at done (/home/perqin/Apps/adminMongo/node_modules/express/lib/response.js:956:10)\r\n    at Immediate._onImmediate (/home/perqin/Apps/adminMongo/node_modules/express-handlebars/lib/utils.js:26:13)\r\n    at tryOnImmediate (timers.js:543:15)\r\n    at processImmediate [as _immediateCallback] (timers.js:523:5)\r\n\r\nnpm ERR! Linux 4.4.0-47-generic\r\nnpm ERR! argv \"/home/perqin/Apps/bin/node\" \"/home/perqin/Apps/bin/npm\" \"start\"\r\nnpm ERR! node v6.0.0\r\nnpm ERR! npm  v3.8.6\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! admin-mongo@0.0.20 start: `node app.js`\r\nnpm ERR! Exit status 1\r\nnpm ERR! \r\nnpm ERR! Failed at the admin-mongo@0.0.20 start script 'node app.js'.\r\nnpm ERR! Make sure you have the latest version of node.js and npm installed.\r\nnpm ERR! If you do, this is most likely a problem with the admin-mongo package,\r\nnpm ERR! not with npm itself.\r\nnpm ERR! Tell the author that this fails on your system:\r\nnpm ERR!     node app.js\r\nnpm ERR! You can get information on how to open an issue for this project with:\r\nnpm ERR!     npm bugs admin-mongo\r\nnpm ERR! Or if that isn't available, you can get their info via:\r\nnpm ERR!     npm owner ls admin-mongo\r\nnpm ERR! There is likely additional logging output above.\r\n\r\nnpm ERR! Please include the following file with any support request:\r\nnpm ERR!     /home/perqin/Apps/adminMongo/npm-debug.log\r\n```"},"comment":{"url":"https://api.github.com/repos/mrvautin/adminMongo/issues/comments/263730107","html_url":"https://github.com/mrvautin/adminMongo/issues/124#issuecomment-263730107","issue_url":"https://api.github.com/repos/mrvautin/adminMongo/issues/124","id":263730107,"user":{"login":"mrvautin","id":299398,"avatar_url":"https://avatars.githubusercontent.com/u/299398?v=3","gravatar_id":"","url":"https://api.github.com/users/mrvautin","html_url":"https://github.com/mrvautin","followers_url":"https://api.github.com/users/mrvautin/followers","following_url":"https://api.github.com/users/mrvautin/following{/other_user}","gists_url":"https://api.github.com/users/mrvautin/gists{/gist_id}","starred_url":"https://api.github.com/users/mrvautin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrvautin/subscriptions","organizations_url":"https://api.github.com/users/mrvautin/orgs","repos_url":"https://api.github.com/users/mrvautin/repos","events_url":"https://api.github.com/users/mrvautin/events{/privacy}","received_events_url":"https://api.github.com/users/mrvautin/received_events","type":"User","site_admin":false},"created_at":"2016-11-29T23:09:27Z","updated_at":"2016-11-29T23:09:27Z","body":"That connection string looks fine. What page/URL are you navigating to when you get the `Can't set headers after they are sent.` error?"}}
{"actor":{"display_login":"mrvautin"}}