{"action":"closed","issue":{"url":"https://api.github.com/repos/sharelatex/sharelatex/issues/149","labels_url":"https://api.github.com/repos/sharelatex/sharelatex/issues/149/labels{/name}","comments_url":"https://api.github.com/repos/sharelatex/sharelatex/issues/149/comments","events_url":"https://api.github.com/repos/sharelatex/sharelatex/issues/149/events","html_url":"https://github.com/sharelatex/sharelatex/issues/149","id":36957257,"number":149,"title":"Server crashes when trying to access the Socket.io with external software","user":{"login":"johan12345","id":5310424,"avatar_url":"https://avatars.githubusercontent.com/u/5310424?v=3","gravatar_id":"","url":"https://api.github.com/users/johan12345","html_url":"https://github.com/johan12345","followers_url":"https://api.github.com/users/johan12345/followers","following_url":"https://api.github.com/users/johan12345/following{/other_user}","gists_url":"https://api.github.com/users/johan12345/gists{/gist_id}","starred_url":"https://api.github.com/users/johan12345/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johan12345/subscriptions","organizations_url":"https://api.github.com/users/johan12345/orgs","repos_url":"https://api.github.com/users/johan12345/repos","events_url":"https://api.github.com/users/johan12345/events{/privacy}","received_events_url":"https://api.github.com/users/johan12345/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-07-02T07:12:22Z","updated_at":"2015-02-26T11:13:09Z","closed_at":"2015-02-26T11:13:09Z","body":"I am trying to connect to the Socket.io socket using a Java program. I first POST the login data to the `/login` page and save the `sharelatex.sid` cookie. After that, I can correctly access, for example, the `project/53b2b183e04c310b8ecdf491` page, but when I try to connect to the Socket.io using the same cookie and then send the `joinProject` event, the socket disconnects and the `web` component of the server crashes with the following log:\r\n```\r\n[2014-07-02T06:56:54.457Z]  INFO: web-sharelatex/57530 on Mac-mini.local: Checking if can access\r\n    user: {\r\n      \"id\": \"53b1e08f45627cc8280fbc92\",\r\n      \"email\": \"my-email@example.com\"\r\n    }\r\n    --\r\n    project: {\r\n      \"id\": \"53b2b183e04c310b8ecdf491\",\r\n      \"name\": \"Test Project\"\r\n    }\r\nException: TypeError: undefined is not a function\r\n    at /Users//sharelatex/sharelatex/web/app/js/Features/Editor/EditorController.js:98:22\r\n    at /Users//sharelatex/sharelatex/web/app/js/Features/Security/AuthorizationManager.js:13:18\r\n    at Object.module.exports.userCanAccessProject (/Users//sharelatex/sharelatex/web/app/js/managers/SecurityManager.js:153:18)\r\n    at Object.module.exports.AuthorizationManager.getPrivilegeLevelForProject (/Users//sharelatex/sharelatex/web/app/js/Features/Security/AuthorizationManager.js:11:30)\r\n    at /Users//sharelatex/sharelatex/web/app/js/Features/Editor/EditorController.js:83:39\r\n    at /Users//sharelatex/sharelatex/web/app/js/Features/Project/ProjectGetter.js:119:16\r\n    at /Users//sharelatex/sharelatex/web/node_modules/async/lib/async.js:240:13\r\n    at /Users//sharelatex/sharelatex/web/node_modules/async/lib/async.js:196:33\r\n    at /Users//sharelatex/sharelatex/web/node_modules/async/lib/async.js:237:17\r\n    at /Users//sharelatex/sharelatex/web/node_modules/async/lib/async.js:560:34\r\n    at /Users//sharelatex/sharelatex/web/app/js/Features/Project/ProjectGetter.js:110:20\r\n    at /Users//sharelatex/sharelatex/web/app/js/Features/Project/ProjectGetter.js:65:18\r\n    at /Users//sharelatex/sharelatex/web/node_modules/mongojs/node_modules/mongodb/lib/mongodb/cursor.js:158:16\r\n    at commandHandler (/Users//sharelatex/sharelatex/web/node_modules/mongojs/node_modules/mongodb/lib/mongodb/cursor.js:651:16)\r\n    at /Users//sharelatex/sharelatex/web/node_modules/metrics-sharelatex/mongodb.coffee:42:29\r\n    at /Users//sharelatex/sharelatex/web/node_modules/mongojs/node_modules/mongodb/lib/mongodb/db.js:1670:9\r\n    at Server.Base._callHandler (/Users//sharelatex/sharelatex/web/node_modules/mongojs/node_modules/mongodb/lib/mongodb/connection/base.js:382:41)\r\n    at /Users//sharelatex/sharelatex/web/node_modules/mongojs/node_modules/mongodb/lib/mongodb/connection/server.js:472:18\r\n    at MongoReply.parseBody (/Users//sharelatex/sharelatex/web/node_modules/mongojs/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)\r\n    at null.<anonymous> (/Users//sharelatex/sharelatex/web/node_modules/mongojs/node_modules/mongodb/lib/mongodb/connection/server.js:430:20)\r\n    at emit (events.js:95:17)\r\n    at null.<anonymous> (/Users//sharelatex/sharelatex/web/node_modules/mongojs/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:191:13)\r\n    at emit (events.js:98:17)\r\n    at Socket.<anonymous> (/Users//sharelatex/sharelatex/web/node_modules/mongojs/node_modules/mongodb/lib/mongodb/connection/connection.js:384:22)\r\n    at Socket.emit (events.js:95:17)\r\n    at Socket.<anonymous> (_stream_readable.js:748:14)\r\n    at Socket.emit (events.js:92:17)\r\n    at emitReadable_ (_stream_readable.js:410:10)\r\n    at emitReadable (_stream_readable.js:406:5)\r\n    at readableAddChunk (_stream_readable.js:168:9)\r\n    at Socket.Readable.push (_stream_readable.js:130:10)\r\n    at TCP.onread (net.js:528:21)\r\n-> completed /Users//sharelatex/sharelatex/web/app.js (38681688ms)\r\n\r\n>> 1 file and 0 calls executed (38681704ms)\r\n\r\nDone, without errors.\r\n```\r\nIs there another method of authentication I'm missing? Or is it a bug in the server?"}}