{"action":"created","issue":{"url":"https://api.github.com/repos/googlemaps/google-maps-services-java/issues/161","repository_url":"https://api.github.com/repos/googlemaps/google-maps-services-java","labels_url":"https://api.github.com/repos/googlemaps/google-maps-services-java/issues/161/labels{/name}","comments_url":"https://api.github.com/repos/googlemaps/google-maps-services-java/issues/161/comments","events_url":"https://api.github.com/repos/googlemaps/google-maps-services-java/issues/161/events","html_url":"https://github.com/googlemaps/google-maps-services-java/issues/161","id":160404270,"number":161,"title":"Library gets stuck when trying to geocode an address with external key","user":{"login":"Ismamai","id":1696622,"avatar_url":"https://avatars.githubusercontent.com/u/1696622?v=3","gravatar_id":"","url":"https://api.github.com/users/Ismamai","html_url":"https://github.com/Ismamai","followers_url":"https://api.github.com/users/Ismamai/followers","following_url":"https://api.github.com/users/Ismamai/following{/other_user}","gists_url":"https://api.github.com/users/Ismamai/gists{/gist_id}","starred_url":"https://api.github.com/users/Ismamai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ismamai/subscriptions","organizations_url":"https://api.github.com/users/Ismamai/orgs","repos_url":"https://api.github.com/users/Ismamai/repos","events_url":"https://api.github.com/users/Ismamai/events{/privacy}","received_events_url":"https://api.github.com/users/Ismamai/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-06-15T11:56:56Z","updated_at":"2016-07-12T21:39:03Z","closed_at":null,"body":"I am using v0.12 and trying to geocode an address with external key and the library does not return any result. In my code I create a Future that will wait for the library to return a result.\r\n\r\n            request.setCallback(new PendingResult.Callback<GeocodingResult[]>() {\r\n                @Override\r\n                public void onResult(GeocodingResult[] result) {\r\n                    geocodeFuture.setResult(getResultFromResponse(result));\r\n                }\r\n....\r\nI first throw the requests and then I try to get the response from the futures with a timeout of 60 seconds\r\n\r\ngeocodeFuture.get(TIMEOUT, TimeUnit.SECONDS);\r\n\r\nI am not sure why, but it seems that the library gets stuck and it does not return any response. But if I try the url that is sent to the google server, I get the response straight away.\r\n\r\nIs there something that I am missing ?\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/googlemaps/google-maps-services-java/issues/comments/232189942","html_url":"https://github.com/googlemaps/google-maps-services-java/issues/161#issuecomment-232189942","issue_url":"https://api.github.com/repos/googlemaps/google-maps-services-java/issues/161","id":232189942,"user":{"login":"Ismamai","id":1696622,"avatar_url":"https://avatars.githubusercontent.com/u/1696622?v=3","gravatar_id":"","url":"https://api.github.com/users/Ismamai","html_url":"https://github.com/Ismamai","followers_url":"https://api.github.com/users/Ismamai/followers","following_url":"https://api.github.com/users/Ismamai/following{/other_user}","gists_url":"https://api.github.com/users/Ismamai/gists{/gist_id}","starred_url":"https://api.github.com/users/Ismamai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ismamai/subscriptions","organizations_url":"https://api.github.com/users/Ismamai/orgs","repos_url":"https://api.github.com/users/Ismamai/repos","events_url":"https://api.github.com/users/Ismamai/events{/privacy}","received_events_url":"https://api.github.com/users/Ismamai/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T21:39:02Z","updated_at":"2016-07-12T21:39:02Z","body":"We create a GeoApiContext and reuse it for each request. I added the test\ncase. If you use all your daily usage and try to geocode it will get stuck.\n\n\n\nOn 12 July 2016 at 20:30, mhubbard <notifications@github.com> wrote:\n\n> @Ismamai <https://github.com/Ismamai> I was having a similar issue where\n> the api would keep retrying hit the limit, but block the thread from\n> closing. We were creating a new GeoApiContext for every request which\n> turned out to be the issue, do you create one context then use that for\n> every request? Or do you create a new context for each request? If so try\n> the former.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/googlemaps/google-maps-services-java/issues/161#issuecomment-232153743>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe/ABnjbho8qMVp2U-_kZPNDF5qHVR5pi7_ks5qU-tPgaJpZM4I2R3w>\n> .\n>\n"}}
{"actor":{"display_login":"Ismamai"}}