{"action":"closed","issue":{"url":"https://api.github.com/repos/VictorAlbertos/RxSocialConnect-Android/issues/19","repository_url":"https://api.github.com/repos/VictorAlbertos/RxSocialConnect-Android","labels_url":"https://api.github.com/repos/VictorAlbertos/RxSocialConnect-Android/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/VictorAlbertos/RxSocialConnect-Android/issues/19/comments","events_url":"https://api.github.com/repos/VictorAlbertos/RxSocialConnect-Android/issues/19/events","html_url":"https://github.com/VictorAlbertos/RxSocialConnect-Android/issues/19","id":191742073,"number":19,"title":"Unnable to create session file after closing connections","user":{"login":"miguelbcr","id":2734557,"avatar_url":"https://avatars.githubusercontent.com/u/2734557?v=3","gravatar_id":"","url":"https://api.github.com/users/miguelbcr","html_url":"https://github.com/miguelbcr","followers_url":"https://api.github.com/users/miguelbcr/followers","following_url":"https://api.github.com/users/miguelbcr/following{/other_user}","gists_url":"https://api.github.com/users/miguelbcr/gists{/gist_id}","starred_url":"https://api.github.com/users/miguelbcr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miguelbcr/subscriptions","organizations_url":"https://api.github.com/users/miguelbcr/orgs","repos_url":"https://api.github.com/users/miguelbcr/repos","events_url":"https://api.github.com/users/miguelbcr/events{/privacy}","received_events_url":"https://api.github.com/users/miguelbcr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-25T17:04:57Z","updated_at":"2016-11-30T07:56:45Z","closed_at":"2016-11-30T07:56:45Z","body":"I get this error when I try to login after calling `RxSocialConnect.closeConnections()`  :\r\n\r\njava.io.FileNotFoundException: /data/user/0/com.my.app/files/RxSocialConnect/FacebookApi: open failed: ENOENT (No such file or directory) on [Disk.java](https://github.com/VictorAlbertos/RxSocialConnect-Android/blob/2.x/core/src/main/java/org/fuckboilerplate/rx_social_connect/internal/persistence/Disk.java#L48)\r\n\r\nI've been debuging and these are my conclusions;\r\n\r\n- The first time the app is launched and `RxSocialConnect.register()` the `cacheDirectory` is created, so the session file (FacebookApi) in this case is created.\r\n- But if I do logout in my app and I call to `RxSocialConnect.closeConnections()` the `cacheDirectory`  is deleted, so if I try login again  the `cacheDirectory` is not created because `RxSocialConnect.register()`  is not called anymore unless I destroy the app and launch it again.\r\n\r\nSo, as a possible solution, you could call `cacheDirectory.mkdirs();` before [the file creation](https://github.com/VictorAlbertos/RxSocialConnect-Android/blob/2.x/core/src/main/java/org/fuckboilerplate/rx_social_connect/internal/persistence/Disk.java#L48)\r\n\r\nWhat do you think?\r\nThanks!"}}
{"actor":{"display_login":"VictorAlbertos"}}