{ "id": "169966", "key": "TIMOB-25372", "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": [ { "id": "18429", "description": "", "name": "Hyperloop 2.2.0", "archived": false, "released": true, "releaseDate": "2017-10-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-10-17T21:17:23.000+0000", "created": "2017-10-05T19:18:21.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "Escalation" ], "versions": [ { "id": "19542", "description": "", "name": "Release 6.2.2", "archived": false, "released": true, "releaseDate": "2017-09-19" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-10-19T00:14:03.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": "Hi,\r\nWhile updating an app from the SDK 6.1.2 to 6.2.2, We found an issue with a custom android Hyperloop class that works as an audio record permissions check.The module android.support.v4.content.ContextCompat is missing with TiSDK 6.2.2.GA\r\nThis error is not happening when using SDK 6.1.2\r\nTest code:\r\n*ti.checkSelfPermission.js*\r\n{code}\r\n* @author cenciso\r\n */\r\n// Imports from Android SDK\r\nvar Manifest = require('android.Manifest');\r\nvar PackageManager = require('android.content.pm.PackageManager');\r\nvar ContextCompat = require('android.support.v4.content.ContextCompat');\r\nvar Activity = require('android.app.Activity');\r\n\r\n/**\r\n * @method hasRecordPermissions\r\n * Validates audio record permissions\r\n * @return {Boolean}\r\n */\r\nexports.hasRecordPermissions = function () {\r\n\tvar currentActivity = new Activity(Ti.Android.currentActivity);\r\n\tvar permission = ContextCompat.checkSelfPermission(currentActivity.getApplicationContext(), Manifest.permission.RECORD_AUDIO);\r\n\tif (permission == PackageManager.PERMISSION_GRANTED) {\r\n\t\treturn true;\r\n\t} else if (permission == PackageManager.PERMISSION_DENIED) {\r\n\t\treturn false;\r\n\t} else {\r\n\t\tconsole.warn(LOG_TAG, 'hasRecordPermissions returned ' + permission);\r\n\t\treturn false;\r\n\t}\r\n};\r\n{code}\r\n\r\n*index.js*\r\n{code}\r\n\r\n/**\r\n * @property {Hyperloop.android.checkSelfPermission} permission The permission object.\r\n */\r\nvar permission = require('ti.checkSelfPermission');\r\n\r\nfunction doClick(e) {\r\n\tvar hasPermissions = permission && permission.hasRecordPermissions();\r\n alert('App has record permissions:' + hasPermissions);\r\n}\r\n\r\n$.index.open();\r\n\r\n{code}\r\nError Log:\r\n{code}\r\n[ERROR] : TiExceptionHandler: (main) [323,323] ----- Titanium Javascript Runtime Error -----\r\n\r\n[ERROR] : TiExceptionHandler: (main) [0,323] - In ti:/module.js:305,2\r\n\r\n[ERROR] : TiExceptionHandler: (main) [0,323] - Message: Uncaught Error: Requested module not found: android.support.v4.content.ContextCompat\r\n\r\n[ERROR] : TiExceptionHandler: (main) [0,323] - Source: throw new Error(\"Requested module not found: \" + request); // TODO Set 'code' property to 'MODULE_NOT_FOUND' to match Node?\r\n\r\n[ERROR] : V8Exception: Exception occurred at ti:/module.js:305: Uncaught Error: Requested module not found: android.support.v4.content.ContextCompat\r\n\r\n{code}\r\n\r\nThanks ", "attachment": [ { "id": "63393", "filename": "TestHyperloop.zip", "author": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "created": "2017-10-05T19:23:26.000+0000", "size": 10474308, "mimeType": "application/zip" } ], "flagged": false, "summary": "Hyperloop: The module android.support.v4.content.ContextCompat is missing with TiSDK 6.2.2.GA", "creator": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "subtasks": [], "reporter": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "environment": "Appcelerator Command-Line Interface, version 6.2.4\r\nHyperloop: 2.1.3\r\nAndroid Devices: HTC one m8 (Android 6.0.1)\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.11.6\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 8589934592\r\nNode.js\r\n Node.js Version = 4.4.4\r\n npm Version = 2.15.1\r\nTitanium CLI\r\n CLI Version = 5.0.14\r\nTitanium SDK\r\n SDK Version = 6.1.2.GA and 6.2.2.GA", "closedSprints": [ { "id": 959, "state": "closed", "name": "2017 Sprint 21 SDK", "startDate": "2017-10-08T20:38:15.130Z", "endDate": "2017-10-22T20:38:00.000Z", "completeDate": "2017-10-24T23:55:56.605Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "428802", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I was able to reproduce the issue with SDK 6.2.2.GA, 6.2.1.GA & 6.2.0.GA.\r\n\r\nStudio Ver: 4.10.0.201709271713\r\nOS Ver: 10.12.3\r\nXcode Ver: Xcode 8.3.3\r\nAppc NPM: 4.2.9\r\nAppc CLI: 6.3.0-master.6\r\nTi CLI Ver: 5.0.14\r\nAlloy Ver: 1.10.5\r\nNode Ver: 7.10.1\r\nJava Ver: 1.8.0_101\r\nDevices: ⇨ google Nexus 5 --- Android 6.0.1\r\n ⇨ google Pixel --- Android 7.1.1", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-06T22:30:23.000+0000", "updated": "2017-10-06T22:30:23.000+0000" }, { "id": "428803", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Environment:\r\nNode Version: 6.10.3\r\nNPM Version: 3.10.10\r\nMac OS: 10.13\r\nAppc CLI: 6.2.4\r\nAppc CLI NPM: 4.2.9\r\nTitanium SDK version: 6.1.2 and 6.2.2\r\nAppcelerator Studio vers 4.10.0\r\nHyperloop 2.1.3\r\nAndroid 6.0.1 (Nexus 6)\r\n\r\nI used the test app provided in the ticket and reproduced the runtime failure with 6.2.2. I checked with SDK 6.1.2, and the app worked without errors, and an alert popped up after pushing the \"Hello World\" button. ", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-06T22:37:14.000+0000", "updated": "2017-10-06T22:39:37.000+0000" }, { "id": "429041", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/hyperloop.next/pull/230", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-12T18:22:47.000+0000", "updated": "2017-10-12T18:22:47.000+0000" }, { "id": "429044", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "6_2_X: https://github.com/appcelerator/hyperloop.next/pull/231", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-12T20:42:39.000+0000", "updated": "2017-10-12T20:42:39.000+0000" }, { "id": "429268", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix with hyperloop 2.2.0 RC5.\r\n\r\n{code}Requested module not found: android.support.v4.content.ContextCompat{code} is *not* thrown & clicking on the label runs the {{ti.checkSelfPermission.js}} code.\r\n\r\nClosing.\r\n\r\nStudio Ver: 4.10.0.201709271713\r\nSDK Ver: 6.3.0.v20171018084007\r\nOS Ver: 10.12.3\r\nXcode Ver: Xcode 8.3.3\r\nAppc NPM: 4.2.10-2\r\nAppc CLI: 6.3.0-master.14\r\nTi CLI Ver: 5.0.14\r\nAlloy Ver: 1.10.5\r\nNode Ver: 7.10.1\r\nJava Ver: 1.8.0_101\r\nDevices: ⇨ google Nexus 5 --- Android 6.0.1\r\n ⇨ google Pixel --- Android 7.1.1\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-19T00:13:49.000+0000", "updated": "2017-10-19T00:13:49.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }