{ "id": "130388", "key": "TIMOB-16954", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2014-05-16T21:25:10.000+0000", "created": "2014-05-13T21:51:50.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "look1", "supportTeam" ], "versions": [ { "id": "15857", "description": "Release 3.2.2", "name": "Release 3.2.2", "archived": false, "released": true, "releaseDate": "2014-03-09" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-29T16:33:33.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "h3. Description\r\n\r\nWhile customer calls Ti.Geolocation.forwardGeocoder returns and undefined error, when calling the Ti.Geolocation.reverseGeocode in order to get a valid address works ok but even using this address the Ti.Geolocation.forwardGeocoder is returning a undefined value in both Android and iOS.\r\n\r\nh3. Testcase\r\n\r\n{code}\r\n// Create our Window\r\nvar window = Titanium.UI.createWindow({ \r\n title:'NexPlayer Modules P.O.C.',\r\n backgroundColor:'#fff'\r\n});\r\n\r\nTi.Geolocation.preferredProvider = \"gps\";\r\nTi.Geolocation.purpose = \"Locate user\";\r\n\t\r\nif (Titanium.Geolocation.locationServicesEnabled === false)\r\n\t{\r\n\t\tTitanium.UI.createAlertDialog({title:'Kitchen Sink', message:'Your device has geo turned off - turn it on.'}).show();\r\n\t}\r\n\r\nvar addr;\r\n\r\nTitanium.Geolocation.reverseGeocoder(\"19.423025131225586\",\"-99.1595687866211\",function(evt)\r\n{\r\n\tif (evt.success) {\r\n\t\tvar text = \"\";\r\n\t\tfor (var i = 0; i < evt.places.length; i++) {\r\n\t\t\ttext += \"\" + i + \") \" + evt.places[i].address + \"\\n\";\r\n\t\t\taddr = evt.places[i].address;\r\n\t\t}\r\n\t\tTi.API.info('Reversed forward: '+text);\r\n\t\t\r\n\t\tTitanium.Geolocation.forwardGeocoder(addr,function(evt)\r\n\t\t{\r\n\t\t\tTi.API.info('in forward ' + addr);\r\n\t\t\tTi.API.info(\"lat:\"+evt.latitude+\", long:\"+evt.longitude);\r\n\t\t\tTitanium.Geolocation.reverseGeocoder(evt.latitude,evt.longitude,function(evt)\r\n\t\t\t{\r\n\t\t\t\tif (evt.success) {\r\n\t\t\t\t\tvar text = \"\";\r\n\t\t\t\t\tfor (var i = 0; i < evt.places.length; i++) {\r\n\t\t\t\t\t\ttext += \"\" + i + \") \" + evt.places[i].address + \"\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tTi.API.info('Reversed forward: '+text);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tTi.UI.createAlertDialog({\r\n\t\t\t\t\t\ttitle:'Forward geo error',\r\n\t\t\t\t\t\tmessage:evt.error\r\n\t\t\t\t\t}).show();\r\n\t\t\t\t\tTi.API.info(\"Code translation: \"+evt.code);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t\t\r\n\t}\r\n\telse {\r\n\t\tTi.UI.createAlertDialog({\r\n\t\t\ttitle:'Forward geo error',\r\n\t\t\tmessage:evt.error\r\n\t\t}).show();\r\n\t\tTi.API.info(\"Code translation: \"+evt.code);\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\t\r\n});\r\n\r\nwindow.open();\r\n{code}\r\n\r\nh3. Logs\r\n\r\nIOS\r\n{code}\r\nMay 13 16:16:13 iPhone-de-Marco testcase[2141] : [INFO] testcase/1.0 (3.2.2.GA.96e9a07)\r\nMay 13 16:16:13 iPhone-de-Marco testcase[2141] : [DEBUG] Analytics is enabled = YES\r\nMay 13 16:16:13 iPhone-de-Marco testcase[2141] : [DEBUG] Loading: /var/mobile/Applications/41289ADA-373E-4DBD-B31C-EC4F33436519/testcase.app/app.js, Resource: app_js\r\nMay 13 16:16:13 iPhone-de-Marco testcase[2141] : [DEBUG] Application booted in 58.427036 ms\r\nMay 13 16:16:13 iPhone-de-Marco testcase[2141] : [INFO] Reversed forward: 0) Banamex, Cordoba, Benito Júarez, Ciudad de México, Distrito Federal, 06700, México\r\nMay 13 16:16:14 iPhone-de-Marco wifid[40] : WiFi:[421708574.009947]: Enable WoW requested by \"apsd\"\r\nMay 13 16:16:16 iPhone-de-Marco testcase[2141] : [INFO] in forward Banamex, Cordoba, Benito Júarez, Ciudad de México, Distrito Federal, 06700, México\r\nMay 13 16:16:16 iPhone-de-Marco testcase[2141] : [INFO] lat:undefined, long:undefined\r\nMay 13 16:16:17 iPhone-de-Marco testcase[2141] : [INFO] Code translation: -1\r\nMay 13 16:16:19 iPhone-de-Marco profiled[2140] : (Note ) profiled: Service stopping.\r\n{code}\r\n\r\nAndroid\r\n{code}\r\nEBUG] : OpenGLRenderer: Enabling debug mode 0\r\n[INFO] : Reversed forward: 0) Banamex, Cordoba, Benito Júarez, Ciudad de México, Distrito Federal, 06700, México\r\n[INFO] : in forward Banamex, Cordoba, Benito Júarez, Ciudad de México, Distrito Federal, 06700, México\r\n[INFO] : lat:undefined, long:undefined\r\n[ERROR] : GeolocationModule: Invalid value, expected type Number.\r\n[ERROR] : TiExceptionHandler: (main) [4179,4179] ----- Titanium Javascript Runtime Error -----\r\n[ERROR] : TiExceptionHandler: (main) [1,4180] - In app.js:31,25\r\n[ERROR] : TiExceptionHandler: (main) [0,4180] - Message: Uncaught Error: Invalid value, expected type Number.\r\n[ERROR] : TiExceptionHandler: (main) [0,4180] - Source: \t\t\tTitanium.Geolocation.reverseGeocoder(evt.latitude,evt.longitude,function(ev\r\n[DEBUG] : dalvikvm: GC_FOR_ALLOC freed 101K, 15% free 24159K/28216K, paused 22ms, total 23ms\r\n[DEBUG] : dalvikvm: GC_FOR_ALLOC freed 39K, 15% free 24341K/28440K, paused 28ms, total 28ms\r\n[INFO] : I/dalvikvm-heap: Grow heap (frag case) to 29.885MB for 2536936-byte allocation\r\n[ERROR] : V8Exception: Exception occurred at app.js:31: Uncaught Error: Invalid value, expected type Number.\r\n[ERROR] : ViewRootImpl: sendUserActionEvent() mView == null\r\n{code}", "attachment": [], "flagged": false, "summary": "Ti.Geolocation.forwardGeocoder returning undefined error", "creator": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "SDK: 3.2.2\r\n", "comment": { "comments": [ { "id": "305369", "author": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I have done some testing directly with the mapquestapi.com (the service we use for geocoding) and found some issues with their service.\r\n\r\nIf we do a reverse geocode search http://open.mapquestapi.com/nominatim/v1/reverse?lat=37.3892876&lon=-122.0502364 we will receive a success result:\r\n\r\n{code}\r\n\r\n\r\nNorth Bernardo Avenue, Whisman Station, Mountain View, Santa Clara County, California, 94043, United States of America\r\n\r\n\r\nNorth Bernardo Avenue\r\nWhisman Station\r\nMountain View\r\nSanta Clara County\r\nCalifornia\r\n94043\r\nUnited States of America\r\nus\r\n\r\n\r\n{code}\r\n\r\nWhile using the address we got from their service \"North Bernardo Avenue, Whisman Station, Mountain View, Santa Clara County, California, 94043, United States of America\" in their search api we receive \"No search results found\"\r\n\r\nhttp://open.mapquestapi.com/nominatim/v1/search.php?q=North%20Bernardo%20Avenue%20Whisman%20Station%20Mountain%20View%20Santa%20Clara%20County%20California%2094043%20United%20States%20of%20America \r\n\r\nIf we use the same search call but replacing the address with \"North Bernardo AV Mountain View CA 94043\" we will get an actual result.\r\n\r\nhttp://open.mapquestapi.com/nominatim/v1/search.php?q=North+Bernardo+Ave+Mountain+View+CA+94043&viewbox=-91.41%2C48.11%2C91.41%2C-48.11\r\n", "updateAuthor": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-05-16T21:24:13.000+0000", "updated": "2014-05-16T21:24:48.000+0000" }, { "id": "416177", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as \"Not Our Bug\".", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-29T16:33:33.000+0000", "updated": "2017-03-29T16:33:33.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }