{"action":"created","issue":{"url":"https://api.github.com/repos/ex3ndr/telegram-api/issues/47","repository_url":"https://api.github.com/repos/ex3ndr/telegram-api","labels_url":"https://api.github.com/repos/ex3ndr/telegram-api/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/ex3ndr/telegram-api/issues/47/comments","events_url":"https://api.github.com/repos/ex3ndr/telegram-api/issues/47/events","html_url":"https://github.com/ex3ndr/telegram-api/issues/47","id":134193485,"number":47,"title":"Null pointer exception while calling api.switchToDc(destDC)","user":{"login":"vaibhavthapliyal","id":8434502,"avatar_url":"https://avatars.githubusercontent.com/u/8434502?v=3","gravatar_id":"","url":"https://api.github.com/users/vaibhavthapliyal","html_url":"https://github.com/vaibhavthapliyal","followers_url":"https://api.github.com/users/vaibhavthapliyal/followers","following_url":"https://api.github.com/users/vaibhavthapliyal/following{/other_user}","gists_url":"https://api.github.com/users/vaibhavthapliyal/gists{/gist_id}","starred_url":"https://api.github.com/users/vaibhavthapliyal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaibhavthapliyal/subscriptions","organizations_url":"https://api.github.com/users/vaibhavthapliyal/orgs","repos_url":"https://api.github.com/users/vaibhavthapliyal/repos","events_url":"https://api.github.com/users/vaibhavthapliyal/events{/privacy}","received_events_url":"https://api.github.com/users/vaibhavthapliyal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-17T06:38:10Z","updated_at":"2016-02-17T10:36:33Z","closed_at":null,"body":"Hi everyone,\r\nI am trying to call the auth.checkPhone function from the JAVA API. While doing that I get the PHONE_MIGRATE_5 error. So on reading the documentation and some code examples I use the function api.switchToDc(5) to switch the datacenters. But using that function gives me the following exception:\r\nException in thread \"main\" java.lang.NullPointerException\r\n\tat org.telegram.actors.ActorSystem.close(ActorSystem.java:97)\r\n\tat org.telegram.mtproto.MTProto.close(MTProto.java:221)\r\n\tat org.telegram.api.engine.TelegramApi.switchToDc(TelegramApi.java:158)\r\n\tat com.telegram.api.TestTelegramAPI.main(TestTelegramAPI.java:76)\r\n\r\nAny help will be appreciated. Thanks!\r\nVaibhav"},"comment":{"url":"https://api.github.com/repos/ex3ndr/telegram-api/issues/comments/185146094","html_url":"https://github.com/ex3ndr/telegram-api/issues/47#issuecomment-185146094","issue_url":"https://api.github.com/repos/ex3ndr/telegram-api/issues/47","id":185146094,"user":{"login":"vaibhavthapliyal","id":8434502,"avatar_url":"https://avatars.githubusercontent.com/u/8434502?v=3","gravatar_id":"","url":"https://api.github.com/users/vaibhavthapliyal","html_url":"https://github.com/vaibhavthapliyal","followers_url":"https://api.github.com/users/vaibhavthapliyal/followers","following_url":"https://api.github.com/users/vaibhavthapliyal/following{/other_user}","gists_url":"https://api.github.com/users/vaibhavthapliyal/gists{/gist_id}","starred_url":"https://api.github.com/users/vaibhavthapliyal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaibhavthapliyal/subscriptions","organizations_url":"https://api.github.com/users/vaibhavthapliyal/orgs","repos_url":"https://api.github.com/users/vaibhavthapliyal/repos","events_url":"https://api.github.com/users/vaibhavthapliyal/events{/privacy}","received_events_url":"https://api.github.com/users/vaibhavthapliyal/received_events","type":"User","site_admin":false},"created_at":"2016-02-17T10:36:33Z","updated_at":"2016-02-17T10:36:33Z","body":"Hi,\r\nIt seems that it was an issue with the production ip-address. \r\n\r\nUsing this ip as the production ip works for me: \"149.154.171.5\".\r\n\r\nYou can try the following ip-addresses from here if this doesn't work for you:https://github.com/telegramdesktop/tdesktop/blob/master/Telegram/SourceFiles/config.h#L221"}}