{ "id": "174247", "key": "AC-6403", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2019-10-21T15:20:40.000+0000", "created": "2019-10-11T10:50:12.000+0000", "labels": [ "android", "geolocation", "permissions", "sdk-8" ], "versions": [ { "id": "17038", "name": "Appcelerator Studio 4.5.0", "archived": false, "released": false } ], "issuelinks": [], "assignee": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "updated": "2019-10-21T15:20:40.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": [ { "id": "14552", "name": "Appcelerator CLI", "description": "Please enter tickets related to Tooling and the CLI here" }, { "id": "14550", "name": "Appcelerator Modules", "description": "Please enter tickets related to Modules here." } ], "description": "This happens on Android\r\n\r\nI've updated my app from SDK 7.5.0 to SDK 8.2.0 {{Ti.Geolocation.hasLocationPermissions(Titanium.Geolocation.AUTHORIZATION_WHEN_IN_USE)}} returns {{undefined}} instead of true/false.\r\nIt has been working for years.\r\n\r\nIf I create a fresh app with just this request and SDK 8.2.0 everything works.\r\n\r\nI'm trying to find which modules causes this.\r\nI've these modules added:\r\n{code}\r\ndk.napp.drawer\r\nti.cloud\r\ncom.drtech.altbeacon\r\nbencoding.android.tools\r\nti.nfc\r\nti.paint\r\nti.map\r\ncom.rkam.swiperefreshlayout\r\nro.mihaiblaga.imei\r\nti.barcode\r\nyy.logcatcher\r\nti.animation\r\nti.identity\r\norg.iotashan.TiTouchImageView\r\n{code}\r\n\r\nTested with 8.2.1.v20191010112656 undefined still present\r\n\r\nUpdate:\r\nI've rolled back to 7.5.1 to going on with the development but now it crashes\r\n{code}\r\n[ERROR] : TiExceptionHandler: (main) [640,1333] /alloy/controllers/index.js:1351\r\n[ERROR] : TiExceptionHandler: gps_autorizzato: Ti.Geolocation.locationServicesAuthorization == Ti.Geolocation.AUTHORIZATION_DENIED ? false : true } });\r\n[ERROR] : TiExceptionHandler: ^\r\n[ERROR] : TiExceptionHandler: TypeError: Cannot read property 'locationServicesAuthorization' of undefined\r\n{code}\r\n\r\nUpdate 2, using 8.2.0 I saw that throws an error:\r\n\r\n{code:java}\r\n[ERROR] : V8Exception: Exception occurred at /alloy/controllers/index.js:3526: Uncaught Error: Attempt to invoke virtual method 'boolean ti.modules.titanium.geolocation.TiLocation.isProvider(java.lang.String)' on a null object reference\r\n{code}\r\n\r\n\r\nUpdate 3 and Fix! \r\nThank to Yordan we found that I was using ti.playservices 16.1.15 that causes all that trouble", "attachment": [ { "id": "67054", "filename": "appc_info_20191014.txt", "author": { "name": "Pietro", "key": "pietro", "displayName": "Pietro Granati", "active": true, "timeZone": "Europe/Rome" }, "created": "2019-10-14T09:38:40.000+0000", "size": 21379, "mimeType": "text/plain" } ], "flagged": false, "summary": "Ti.Geolocation.hasLocationPermissions() is undefined", "creator": { "name": "Pietro", "key": "pietro", "displayName": "Pietro Granati", "active": true, "timeZone": "Europe/Rome" }, "subtasks": [], "reporter": { "name": "Pietro", "key": "pietro", "displayName": "Pietro Granati", "active": true, "timeZone": "Europe/Rome" }, "environment": "Mac OSX Mojave 10.14.6", "comment": { "comments": [ { "id": "452035", "author": { "name": "jgiunta", "key": "jgiunta", "displayName": "Jorge Giunta", "active": true, "timeZone": "America/Argentina/Mendoza" }, "body": "Hello, on iOS with SDK 8.2.0 with permission granted on my device:\r\n\r\n{code:java}\r\nTi.API.info(Ti.Geolocation.requestLocationPermissions(Ti.Geolocation.AUTHORIZATION_WHEN_IN_USE));\r\n{code}\r\n\r\nI get on log: \r\n\r\n[ERROR] Script Error {\r\n[ERROR] column = 54;\r\n[ERROR] line = 1449;\r\n[ERROR] message = \"undefined is not an object\";\r\n\r\nWhen I downgrade to 8.1.0.GA all works like a charm.", "updateAuthor": { "name": "jgiunta", "key": "jgiunta", "displayName": "Jorge Giunta", "active": true, "timeZone": "America/Argentina/Mendoza" }, "created": "2019-10-14T16:59:31.000+0000", "updated": "2019-10-14T17:00:28.000+0000" }, { "id": "452155", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "[~jgiunta], If you use ti.playservices module then try to change the version to fix this issue. \r\n\r\nThanks!", "updateAuthor": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2019-10-21T15:20:19.000+0000", "updated": "2019-10-21T15:20:19.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }