{"action":"created","issue":{"url":"https://api.github.com/repos/GroundMeteor/db/issues/163","repository_url":"https://api.github.com/repos/GroundMeteor/db","labels_url":"https://api.github.com/repos/GroundMeteor/db/issues/163/labels{/name}","comments_url":"https://api.github.com/repos/GroundMeteor/db/issues/163/comments","events_url":"https://api.github.com/repos/GroundMeteor/db/issues/163/events","html_url":"https://github.com/GroundMeteor/db/issues/163","id":147696864,"number":163,"title":"Half logged out state when grounding Meteor.users","user":{"login":"itaibs","id":10901200,"avatar_url":"https://avatars.githubusercontent.com/u/10901200?v=3","gravatar_id":"","url":"https://api.github.com/users/itaibs","html_url":"https://github.com/itaibs","followers_url":"https://api.github.com/users/itaibs/followers","following_url":"https://api.github.com/users/itaibs/following{/other_user}","gists_url":"https://api.github.com/users/itaibs/gists{/gist_id}","starred_url":"https://api.github.com/users/itaibs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itaibs/subscriptions","organizations_url":"https://api.github.com/users/itaibs/orgs","repos_url":"https://api.github.com/users/itaibs/repos","events_url":"https://api.github.com/users/itaibs/events{/privacy}","received_events_url":"https://api.github.com/users/itaibs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-12T09:54:47Z","updated_at":"2016-05-01T09:42:03Z","closed_at":null,"body":"Hi!\r\nThis problem is a bit elusive, so I'll try to bring enough information so we could perhaps figure it out:\r\n\r\nIn my app all users sign in using accounts-facebook.\r\nIt's vital for my app to keep working and have the user's data when offline, so I'm grounding Meteor.users:\r\n```\r\nif (Meteor.isClient) {\r\n\tMeteor.startup(() => {\r\n\t\tGround.Collection(Meteor.users);\r\n\t});\r\n}\r\n```\r\n\r\nSometimes, however, when connected to the server, I see that while everything seems to be working ok - the user \"seems\" to be logged out (i.e., <login-buttons> gives a \"sign in with facebook\" button). I can't quite figure out exactly what causes this and when this happens - but I think it's usually after the user disconnects from the server and reconnects.\r\n\r\nIf I exit the app and reenters it just becomes connected and signed in again (all becomes OK).\r\nI also have some callback registered on \"Hooks.onLoggedOut\" which never gets called - so the system doesn't know that the user has logged out (because he really didn't log out).\r\n\r\nIt's really hard to debug since I can't reproduce this problem manually. It just sometimes happens.\r\nMy guess is that it has to do with some conflict in the grounded Meteor.users. Does that sound reasonable? Any idea how I can go about trying to handle this?\r\n\r\nThanks! Please tell me if you need more info..."},"comment":{"url":"https://api.github.com/repos/GroundMeteor/db/issues/comments/216031075","html_url":"https://github.com/GroundMeteor/db/issues/163#issuecomment-216031075","issue_url":"https://api.github.com/repos/GroundMeteor/db/issues/163","id":216031075,"user":{"login":"sahanDissanayake","id":5580680,"avatar_url":"https://avatars.githubusercontent.com/u/5580680?v=3","gravatar_id":"","url":"https://api.github.com/users/sahanDissanayake","html_url":"https://github.com/sahanDissanayake","followers_url":"https://api.github.com/users/sahanDissanayake/followers","following_url":"https://api.github.com/users/sahanDissanayake/following{/other_user}","gists_url":"https://api.github.com/users/sahanDissanayake/gists{/gist_id}","starred_url":"https://api.github.com/users/sahanDissanayake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sahanDissanayake/subscriptions","organizations_url":"https://api.github.com/users/sahanDissanayake/orgs","repos_url":"https://api.github.com/users/sahanDissanayake/repos","events_url":"https://api.github.com/users/sahanDissanayake/events{/privacy}","received_events_url":"https://api.github.com/users/sahanDissanayake/received_events","type":"User","site_admin":false},"created_at":"2016-05-01T09:42:03Z","updated_at":"2016-05-01T09:42:03Z","body":"Care to share some code please ?"}}