{ "id": "173936", "key": "TIMOB-27278", "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": "20412", "name": "Release 8.1.0", "archived": false, "released": true, "releaseDate": "2019-08-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-07-26T18:11:34.000+0000", "created": "2019-07-24T23:22:45.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "engSchedule", "regression" ], "versions": [ { "id": "20412", "name": "Release 8.1.0", "archived": false, "released": true, "releaseDate": "2019-08-13" } ], "issuelinks": [], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-07-26T18:11:34.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "One of the test apps crashes as soon as permission to Calendar is provided upon app launch.\r\n\r\nThis is a regression as the app works fine in 8.0.2.GA\r\nSteps To Reproduce:\r\n1. Get the test app from https://github.com/appcelerator/qe-FeatureTest/tree/master/Media/MediaModule\r\n2. Run it on iOS simulator\r\n3. Upon app launch there is a prompt for permission to Calendar. Allow permission.\r\n4. Relaunch the app. Now it requests permission to contacts and camera. Grant permissions \r\n\r\nActual Result:\r\nAfter Step 3: The app crashes. Below are the logs. However the permission to Calendar are granted.\r\nAfter Step 4: Permission granted successfully and no crash happens this time.\r\n\r\n{code}\r\n[INFO] MediaModule 1.0 (Powered by Titanium 8.1.0.3dab0b3)\r\n[INFO] Calendar Permissions Granted\r\n[ERROR] The application has crashed with an uncaught exception 'NSInvalidArgumentException'.\r\n[ERROR] Reason:\r\n[ERROR] *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]\r\n[ERROR] Stack trace:\r\n[ERROR] 0 CoreFoundation 0x000000010a9d18db __exceptionPreprocess + 331\r\n[ERROR] 1 libobjc.A.dylib 0x00000001097deac5 objc_exception_throw + 48\r\n[ERROR] 2 CoreFoundation 0x000000010a91ffac _CFThrowFormattedException + 194\r\n[ERROR] 3 CoreFoundation 0x000000010aa3de11 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 321\r\n[ERROR] 4 CoreFoundation 0x000000010a9cd5bb +[NSDictionary dictionaryWithObjects:forKeys:count:] + 59\r\n[ERROR] 5 TitaniumKit 0x00000001096ba4f2 __34-[KrollBridge didStartNewContext:]_block_invoke + 405\r\n[ERROR] 6 CoreFoundation 0x000000010a9d86ac __invoking___ + 140\r\n[ERROR] 7 CoreFoundation 0x000000010a9d5c25 -[NSInvocation invoke] + 325\r\n[ERROR] 8 JavaScriptCore 0x00000001049a00f8 _ZN3JSC24ObjCCallbackFunctionImpl4callEP9JSContextP13OpaqueJSValuemPKPKS3_PS6_ + 440\r\n[ERROR] 9 JavaScriptCore 0x000000010499fb17 _ZN3JSCL34objCCallbackFunctionCallAsFunctionEPK15OpaqueJSContextP13OpaqueJSValueS4_mPKPKS3_PS6_ + 247\r\n[ERROR] 10 JavaScriptCore 0x000000010499f3bc _ZN3JSC19APICallbackFunction4callINS_20ObjCCallbackFunctionEEExPNS_9ExecStateE + 492\r\n[ERROR] 11 JavaScriptCore 0x000000010497ad88 vmEntryToNative + 206\r\n[ERROR] 12 JavaScriptCore 0x0000000104d60f4a _ZN3JSC11Interpreter11executeCallEPNS_9ExecStateEPNS_8JSObjectENS_8CallTypeERKNS_8CallDataENS_7JSValueERKNS_7ArgListE + 538\r\n[ERROR] 13 JavaScriptCore 0x0000000104fa6d6e _ZN3JSC4callEPNS_9ExecStateENS_7JSValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE + 62\r\n[ERROR] 14 JavaScriptCore 0x0000000104ff98ac _ZN3JSC10callGetterEPNS_9ExecStateENS_7JSValueES2_ + 140\r\n[ERROR] 15 JavaScriptCore 0x0000000104e5592f llint_slow_path_get_by_id + 6047\r\n[ERROR] 16 JavaScriptCore 0x00000001049810a5 llint_entry + 25234\r\n[ERROR] 17 JavaScriptCore 0x000000010498a01f llint_entry + 61964\r\n[ERROR] 18 JavaScriptCore 0x000000010497ac59 vmEntryToJavaScript + 200\r\n[ERROR] 19 JavaScriptCore 0x0000000104d60f03 _ZN3JSC11Interpreter11executeCallEPNS_9ExecStateEPNS_8JSObjectENS_8CallTypeERKNS_8CallDataENS_7JSValueERKNS_7ArgListE + 467\r\n[ERROR] 20 JavaScriptCore 0x0000000104fa6ed4 _ZN3JSC12profiledCallEPNS_9ExecStateENS_15ProfilingReasonENS_7JSValueENS_8CallTypeERKNS_8CallDataES3_RKNS_7ArgListE + 196\r\n[ERROR] 21 JavaScriptCore 0x00000001049c6018 JSObjectCallAsFunction + 488\r\n[ERROR] 22 JavaScriptCore 0x0000000104998436 -[JSValue callWithArguments:] + 278\r\n[ERROR] 23 MediaModule 0x00000001044cd2e5 __53-[CalendarModule requestAuthorization:forEntityType:]_block_invoke_2 + 325\r\n[ERROR] 24 TCC 0x0000000112849e1a __TCCAccessRequest_block_invoke.71 + 438\r\n[ERROR] 25 TCC 0x000000011284dbdb __tccd_send_message_block_invoke + 231\r\n[ERROR] 26 libxpc.dylib 0x000000010d1407dd _xpc_connection_reply_callout + 36\r\n[ERROR] 27 libxpc.dylib 0x000000010d1354dc _xpc_connection_call_reply_async + 86\r\n[ERROR] 28 libdispatch.dylib 0x000000010ce07d6c _dispatch_client_callout3 + 8\r\n[ERROR] 29 libdispatch.dylib 0x000000010ce1f468 _dispatch_mach_msg_async_reply_invoke + 332\r\n[ERROR] 30 libdispatch.dylib 0x000000010ce17923 _dispatch_kevent_worker_thread + 1427\r\n[ERROR] 31 libsystem_pthread.dylib 0x000000010d1e9615 _pthread_wqthread + 419\r\n[ERROR] 32 libsystem_pthread.dylib 0x000000010d1e9405 start_wqthread + 13\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: App crashes upon giving permission to Calendar", "creator": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Mac OS 10.14.3\r\nTi SDK: 8.1.0.v20190720135905\r\nAppc CLI: 7.1.0-master.24\r\nNode: 10.5.0\r\nXcode: 10.3\r\nStudio: 5.1.3.201907112159", "comment": { "comments": [ { "id": "450063", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This issue is due to [this PR|https://github.com/appcelerator/titanium_mobile/pull/10381]. Specially due to [this commit|https://github.com/appcelerator/titanium_mobile/pull/10381/commits/d1854f785f782e4a5d2967ea86d4fccf65aab1c3#diff-9c72c1d05854e98bac7ba54095bb7bfbR192]. As reverting this works fine. cc [~cwilliams]\r\n\r\nTest Case - \r\n\r\n{code:java}\r\nfunction askCalendarPermission(){\r\n if (Ti.Calendar.hasCalendarPermissions()) {\r\n Ti.Calendar.getAllCalendars();\r\n askContactPermission(); \r\n } else {\r\n Ti.Calendar.requestCalendarPermissions(function(e) {\r\n if (e.success === true) {\r\n Ti.API.info(\"Calendar Permissions Granted\");\r\n Ti.Calendar.getAllCalendars();\r\n askContactPermission();\r\n } else {\r\n alert(\"Access denied, error: \" + e.error);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction askContactPermission(){\r\n if (Ti.Contacts.hasContactsPermissions()) {\r\n Ti.Contacts.getAllPeople();\r\n askCameraPermissions(); \r\n } else {\r\n Ti.Contacts.requestContactsPermissions(function(e) {\r\n if (e.success === true) { \r\n Ti.API.info(\"Contacts Permissions Granted\");\r\n Ti.Contacts.getAllPeople();\r\n askCameraPermissions(); \r\n } else {\r\n alert(\"Access denied, error: \" + e.error);\r\n }\r\n });\r\n }\r\n}\r\n\r\n//Added camera permissions in the tiapp.xml for camera because permissions get added to the android manifest only if showCamera() is called below. But its not fesible here as opening a camera before app launches just to add camera permissions looks stupid.\r\nfunction askCameraPermissions(){\r\nif (Ti.Media.hasCameraPermissions()) {\r\n // require('ui').createApplicationTabGroup().open(); \r\n } else { \r\n Ti.Media.requestCameraPermissions(function(e) {\r\n if (e.success === true) {\r\n Ti.API.info(\"Camera Permissions Granted\");\r\n //require('ui').createApplicationTabGroup().open();\r\n } else {\r\n alert(\"Access denied, error: \" + e.error);\r\n }\r\n });\r\n }\r\n}\r\n\r\naskCalendarPermission();\r\n{code}\r\n", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-07-25T20:09:08.000+0000", "updated": "2019-07-25T20:09:08.000+0000" }, { "id": "450069", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR(8_1_X) - https://github.com/appcelerator/titanium_mobile/pull/11078\r\n\r\nPR(master) - https://github.com/appcelerator/titanium_mobile/pull/11079", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-07-25T21:53:58.000+0000", "updated": "2019-07-25T21:53:58.000+0000" }, { "id": "450070", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "FR passed. danger failed. so not able to merge", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-07-25T22:49:38.000+0000", "updated": "2019-07-25T22:49:38.000+0000" }, { "id": "450089", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Backport Merged.\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-07-26T16:46:15.000+0000", "updated": "2019-07-26T16:46:15.000+0000" }, { "id": "450092", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Master merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-07-26T17:17:22.000+0000", "updated": "2019-07-26T17:17:22.000+0000" }, { "id": "450094", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix on sdk 8.2.0.v20190726102118 and 8.1.0.v20190726095146 .NO crashing on calendar permission.works as expected.\r\n\r\nTest Environment:\r\n{code}\r\n Name = Mac OS X\r\n Version = 10.14.5\r\n Architecture = 64bit\r\nNode.js\r\n Node.js Version = 10.16.0\r\n npm Version = 6.9.0\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\nTitanium SDK\r\n SDK Version = 8.2.0.v20190726102118 and 8.1.0.v20190726095146\r\nDevice =iPhone X iOS 11\r\nSimulator =iPhone 6 iOS 11,iphone xs iOS 12.4\r\n{code}", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-07-26T18:10:45.000+0000", "updated": "2019-07-26T18:10:45.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }