{"action":"created","issue":{"url":"https://api.github.com/repos/urish/firebase-server/issues/59","repository_url":"https://api.github.com/repos/urish/firebase-server","labels_url":"https://api.github.com/repos/urish/firebase-server/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/urish/firebase-server/issues/59/comments","events_url":"https://api.github.com/repos/urish/firebase-server/issues/59/events","html_url":"https://github.com/urish/firebase-server/issues/59","id":166420315,"number":59,"title":"Can't get data from swift app / Can't connect  from Android","user":{"login":"diego1686","id":1087468,"avatar_url":"https://avatars.githubusercontent.com/u/1087468?v=3","gravatar_id":"","url":"https://api.github.com/users/diego1686","html_url":"https://github.com/diego1686","followers_url":"https://api.github.com/users/diego1686/followers","following_url":"https://api.github.com/users/diego1686/following{/other_user}","gists_url":"https://api.github.com/users/diego1686/gists{/gist_id}","starred_url":"https://api.github.com/users/diego1686/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diego1686/subscriptions","organizations_url":"https://api.github.com/users/diego1686/orgs","repos_url":"https://api.github.com/users/diego1686/repos","events_url":"https://api.github.com/users/diego1686/events{/privacy}","received_events_url":"https://api.github.com/users/diego1686/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-07-19T19:58:27Z","updated_at":"2016-07-26T20:51:24Z","closed_at":null,"body":"I'm connecting to firebase-server from a swift app and I can't get any data.\r\n\r\nThis is my server config:\r\n\r\n```javascript\r\nvar FirebaseServer = require('firebase-server');\r\n\r\nnew FirebaseServer(5000, 'test.firebase.localhost', {\r\n   states: {\r\n        CA: 'California',\r\n        AL: 'Alabama',\r\n        KY: 'Kentucky'\r\n    }\r\n});\r\n```\r\n\r\nI'm running the firebase server in debug mode, so when the app starts I see the connection on the terminal and the message sent with all the data on the states path:\r\n\r\n```\r\nfirebase-server New connection from 127.0.0.1:52221 +11s\r\n  firebase-server Sending message: {\"d\":{\"t\":\"h\",\"d\":{\"ts\":1468957827447,\"v\":\"5\",\"h\":\"test.firebase.localhost\",\"s\":\"\"}},\"t\":\"c\"} +0ms\r\n  firebase-server Client message: {\"t\":\"d\",\"d\":{\"r\":1,\"a\":\"s\",\"b\":{\"c\":{\"sdk.objc.3-0-1\":1}}}} +2ms\r\n  firebase-server Client message: {\"t\":\"d\",\"d\":{\"r\":2,\"a\":\"q\",\"b\":{\"p\":\"\\/states\",\"h\":\"\"}}} +0ms\r\n  firebase-server Client listen states +0ms\r\n  firebase-server Sending message: {\"d\":{\"a\":\"d\",\"b\":{\"p\":\"states\",\"d\":{\"AL\":\"Alabama\",\"CA\":\"California\",\"KY\":\"Kentucky\"},\"t\":null}},\"t\":\"d\"} +1ms\r\n  firebase-server Sending message: {\"d\":{\"r\":2,\"b\":{\"s\":\"ok\",\"d\":{}}},\"t\":\"d\"} +1ms\r\n```\r\n\r\nThis is the swift listener. I always get null:\r\n\r\n```swift\r\nlet ref = FIRDatabase.database().reference().child(\"states\")\r\nref.observeEventType(.Value) { (snap) in\r\n      print(snap.value)\r\n }\r\n```\r\n\r\n```\r\nOptional(<null>)\r\n```\r\n\r\nOn Android I can't even connect to the firebase-server.\r\n\r\nCould you help me please? Thanks!"},"comment":{"url":"https://api.github.com/repos/urish/firebase-server/issues/comments/235401330","html_url":"https://github.com/urish/firebase-server/issues/59#issuecomment-235401330","issue_url":"https://api.github.com/repos/urish/firebase-server/issues/59","id":235401330,"user":{"login":"diego1686","id":1087468,"avatar_url":"https://avatars.githubusercontent.com/u/1087468?v=3","gravatar_id":"","url":"https://api.github.com/users/diego1686","html_url":"https://github.com/diego1686","followers_url":"https://api.github.com/users/diego1686/followers","following_url":"https://api.github.com/users/diego1686/following{/other_user}","gists_url":"https://api.github.com/users/diego1686/gists{/gist_id}","starred_url":"https://api.github.com/users/diego1686/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diego1686/subscriptions","organizations_url":"https://api.github.com/users/diego1686/orgs","repos_url":"https://api.github.com/users/diego1686/repos","events_url":"https://api.github.com/users/diego1686/events{/privacy}","received_events_url":"https://api.github.com/users/diego1686/received_events","type":"User","site_admin":false},"created_at":"2016-07-26T20:51:24Z","updated_at":"2016-07-26T20:51:24Z","body":"@urish Hi! Connection from iOS device seems to works fine, but I'm still having problems with Android. I can establish a connection but I get no data. I put a proxy to compare between the local firebase server and the real one and here is the results, the connection seems to be broken:\r\n\r\n- Real firebase server\r\n```\r\nconn\r\nserver {\"t\":\"c\",\"d\":{\"t\":\"h\",\"d\":{\"ts\":1469565483279,\"v\":\"5\",\"h\":\"s-usc1c-nss-129.firebaseio.com\",\"s\":\"8539xXU5Ussl8bXC8USZzVrXAr2dhQsb\"}}}\r\nclient {\"d\":{\"a\":\"s\",\"r\":0,\"b\":{\"c\":{\"sdk.android.3-0-0\":1}}},\"t\":\"d\"}\r\nserver {\"t\":\"d\",\"d\":{\"r\":0,\"b\":{\"s\":\"ok\",\"d\":\"\"}}}\r\nclient {\"d\":{\"a\":\"q\",\"r\":1,\"b\":{\"h\":\"\",\"p\":\"test\"}},\"t\":\"d\"}\r\nserver {\"t\":\"d\",\"d\":{\"b\":{\"p\":\"test\",\"d\":{\"name\":\"diego\"}},\"a\":\"d\"}}\r\nserver {\"t\":\"d\",\"d\":{\"r\":1,\"b\":{\"s\":\"ok\",\"d\":{}}}}\r\n```\r\n\r\n- Local one\r\n```\r\nconn\r\nserver {\"d\":{\"t\":\"h\",\"d\":{\"ts\":1469565720181,\"v\":\"5\",\"h\":\"test.firebase.localhost\",\"s\":\"\"}},\"t\":\"c\"}\r\nclient {\"d\":{\"a\":\"s\",\"r\":0,\"b\":{\"c\":{\"sdk.android.3-0-0\":1}}},\"t\":\"d\"}\r\nclient {\"d\":{\"a\":\"q\",\"r\":1,\"b\":{\"h\":\"\",\"p\":\"test\"}},\"t\":\"d\"}\r\nserver {\"d\":{\"r\":1,\"b\":{\"s\":\"ok\",\"d\":{}}},\"t\":\"d\"}\r\n```\r\n\r\nWhat do you think?"}}
{"actor":{"display_login":"diego1686"}}