{ "id": "176227", "key": "TIMOB-28483", "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": "21199", "description": "", "name": "Release 10.0.1", "archived": false, "released": true, "releaseDate": "2021-07-28" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2021-06-17T10:07:42.000+0000", "created": "2021-06-08T09:26:20.000+0000", "epic": { "id": 176208, "key": "TIMOB-28465", "name": "iOS: Support iOS 15 and Xcode 13", "summary": "iOS: Support iOS 15/Xcode 13", "color": { "key": "color_7" }, "done": false }, "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "21050", "name": "Release 10.0.0", "archived": false, "released": true, "releaseDate": "2021-05-17" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-06-17T10:07:42.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": "h5.Description\r\n\r\nWhen launching an app, it will crash on startup with the below stack:\r\n\r\n{code}\r\n2021-06-08 10:22:45.286610+0100 Titanium[44498:3323792] -[AppModule JSValueInContext:]: unrecognized selector sent to instance 0x7fa3fb6101a0\r\n2021-06-08 10:22:45.289463+0100 Titanium[44498:3323792] [DEBUG] Loading: /Users/awam/Library/Developer/CoreSimulator/Devices/83B5D759-FF58-4701-BFF2-546F0CBB4466/data/Containers/Bundle/Application/6E7EAA78-DF4C-4513-8003-DC3390E608B1/Titanium.app/ti.kernel.js, Resource: ti_kernel_js\r\n2021-06-08 10:22:45.314020+0100 Titanium[44498:3323792] [ERROR] /ti.kernel.js:1282\r\n\t const realModule = kroll.binding(modName); // Now replace our lazy getter on the property with a value\r\n ^\r\nError: -[AppModule JSValueInContext:]: unrecognized selector sent to instance 0x7fa3fb6101a0\r\n at ([native code])\r\n at get (/ti.kernel.js:1282:44)\r\n at (/ti.kernel.js:1250:27)\r\n\r\n CoreFoundation 0x00007fff203f6fa7 __exceptionPreprocess + 242\r\n libobjc.A.dylib 0x00007fff2019cbe7 objc_exception_throw + 48\r\n CoreFoundation 0x00007fff20405b28 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0\r\n CoreFoundation 0x00007fff203fb46b ___forwarding___ + 1412\r\n CoreFoundation 0x00007fff203fd598 _CF_forwarding_prep_0 + 120\r\n TitaniumKit 0x000000010b122e34 -[KrollModule binding:] + 628\r\n CoreFoundation 0x00007fff203fd82c __invoking___ + 140\r\n CoreFoundation 0x00007fff203fac36 -[NSInvocation invoke] + 305\r\n JavaScriptCore 0x00007fff324c007b _ZN3JSC24ObjCCallbackFunctionImpl4callEP9JSContextP13OpaqueJSValuemPKPKS3_PS6_ + 427\r\n JavaScriptCore 0x00007fff324bf980 _ZN3JSCL34objCCallbackFunctionCallAsFunctionEPK15OpaqueJSContextP13OpaqueJSValueS4_mPKPKS3_PS6_ + 256\r\n JavaScriptCore 0x00007fff324c314a _ZN3JSC19APICallbackFunction8callImplINS_20ObjCCallbackFunctionEEExPNS_14JSGlobalObjectEPNS_9CallFrameE + 570\r\n ??? 0x000025a64e001027 0x0 + 41396203425831\r\n JavaScriptCore 0x00007fff32445a03 llint_entry + 110156\r\n JavaScriptCore 0x00007fff3242a9b6 vmEntryToJavaScript + 216\r\n JavaScriptCore 0x00007fff32b3593c _ZN3JSC11Interpreter11executeCallEPNS_14JSGlobalObjectEPNS_8JSObjectERKNS_8CallDataENS_7JSValueERKNS_7ArgListE + 540\r\n JavaScriptCore 0x00007fff32e20aab _ZN3JSC10callGetterEPNS_14JSGlobalObjectENS_7JSValueES2_ + 203\r\n JavaScriptCore 0x00007fff32c43196 _ZN3JSC5LLIntL19performLLIntGetByIDEPKNS_11InstructionEPNS_9CodeBlockEPNS_14JSGlobalObjectENS_7JSValueERKNS_10IdentifierERNS_19GetByIdModeMetadataE + 1814\r\n JavaScriptCore 0x00007fff32c429db llint_slow_path_get_by_id + 347\r\n JavaScriptCore 0x00007fff32434150 llint_entry + 38297\r\n JavaScriptCore 0x00007fff3242a9b6 vmEntryToJavaScript + 216\r\n2021-06-08 10:22:45.329160+0100 Titanium[44498:3323792] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AppModule JSValueInContext:]: unrecognized selector sent to instance 0x7fa3fb6101a0'\r\n*** First throw call stack:\r\n(\r\n\t0 CoreFoundation 0x00007fff203f6fa7 __exceptionPreprocess + 242\r\n\t1 libobjc.A.dylib 0x00007fff2019cbe7 objc_exception_throw + 48\r\n\t2 CoreFoundation 0x00007fff20405b28 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0\r\n\t3 CoreFoundation 0x00007fff203fb46b ___forwarding___ + 1412\r\n\t4 CoreFoundation 0x00007fff203fd598 _CF_forwarding_prep_0 + 120\r\n\t5 TitaniumKit 0x000000010b122e34 -[KrollModule binding:] + 628\r\n\t6 CoreFoundation 0x00007fff203fd82c __invoking___ + 140\r\n\t7 CoreFoundation 0x00007fff203fac36 -[NSInvocation invoke] + 305\r\n\t8 JavaScriptCore 0x00007fff324c007b _ZN3JSC24ObjCCallbackFunctionImpl4callEP9JSContextP13OpaqueJSValuemPKPKS3_PS6_ + 427\r\n\t9 JavaScriptCore 0x00007fff324bf980 _ZN3JSCL34objCCallbackFunctionCallAsFunctionEPK15OpaqueJSContextP13OpaqueJSValueS4_mPKPKS3_PS6_ + 256\r\n\t10 JavaScriptCore 0x00007fff324c314a _ZN3JSC19APICallbackFunction8callImplINS_20ObjCCallbackFunctionEEExPNS_14JSGlobalObjectEPNS_9CallFrameE + 570\r\n\t11 ??? 0x000025a64e001027 0x0 + 41396203425831\r\n\t12 JavaScriptCore 0x00007fff32445a03 llint_entry + 110156\r\n\t13 JavaScriptCore 0x00007fff3242a9b6 vmEntryToJavaScript + 216\r\n\t14 JavaScriptCore 0x00007fff32b3593c _ZN3JSC11Interpreter11executeCallEPNS_14JSGlobalObjectEPNS_8JSObjectERKNS_8CallDataENS_7JSValueERKNS_7ArgListE + 540\r\n\t15 JavaScriptCore 0x00007fff32e20aab _ZN3JSC10callGetterEPNS_14JSGlobalObjectENS_7JSValueES2_ + 203\r\n\t16 JavaScriptCore 0x00007fff32c43196 _ZN3JSC5LLIntL19performLLIntGetByIDEPKNS_11InstructionEPNS_9CodeBlockEPNS_14JSGlobalObjectENS_7JSValueERKNS_10IdentifierERNS_19GetByIdModeMetadataE + 1814\r\n\t17 JavaScriptCore 0x00007fff32c429db llint_slow_path_get_by_id + 347\r\n\t18 JavaScriptCore 0x00007fff32434150 llint_entry + 38297\r\n\t19 JavaScriptCore 0x00007fff3242a9b6 vmEntryToJavaScript + 216\r\n\t20 JavaScriptCore 0x00007fff32b3593c _ZN3JSC11Interpreter11executeCallEPNS_14JSGlobalObjectEPNS_8JSObjectERKNS_8CallDataENS_7JSValueERKNS_7ArgListE + 540\r\n\t21 JavaScriptCore 0x00007fff32dad474 _ZN3JSC12profiledCallEPNS_14JSGlobalObjectENS_15ProfilingReasonENS_7JSValueERKNS_8CallDataES3_RKNS_7ArgListE + 164\r\n\t22 JavaScriptCore 0x00007fff324e0a8e JSObjectCallAsFunction + 798\r\n\t23 JavaScriptCore 0x00007fff32473047 -[JSValue invokeMethod:withArguments:] + 663\r\n\t24 TitaniumKit 0x000000010b14c547 -[KrollBridge evalFileOnThread:context:] + 791\r\n\t25 TitaniumKit 0x000000010b1a4797 -[KrollInvocation invoke:] + 87\r\n\t26 TitaniumKit 0x000000010b1a55b4 -[KrollContext invoke:] + 148\r\n\t27 TitaniumKit 0x000000010b1a5879 -[KrollContext invokeOnThread:method:withObject:callback:selector:] + 121\r\n\t28 TitaniumKit 0x000000010b14c643 -[KrollBridge evalFile:callback:selector:] + 83\r\n\t29 TitaniumKit 0x000000010b14d620 -[KrollBridge didStartNewContext:] + 3088\r\n\t30 TitaniumKit 0x000000010b1a5f6b -[KrollContext main] + 1403\r\n\t31 TitaniumKit 0x000000010b1a5474 __21-[KrollContext start]_block_invoke + 36\r\n\t32 libdispatch.dylib 0x000000010ae3c5e0 _dispatch_call_block_and_release + 12\r\n\t33 libdispatch.dylib 0x000000010ae3d7eb _dispatch_client_callout + 8\r\n\t34 libdispatch.dylib 0x000000010ae4bfa1 _dispatch_main_queue_callback_4CF + 1195\r\n\t35 CoreFoundation 0x00007fff20363614 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9\r\n\t36 CoreFoundation 0x00007fff2035de60 __CFRunLoopRun + 2772\r\n\t37 CoreFoundation 0x00007fff2035cea9 CFRunLoopRunSpecific + 567\r\n\t38 GraphicsServices 0x00007fff2c951cd3 GSEventRunModal + 139\r\n\t39 UIKitCore 0x00007fff24f2f72a -[UIApplication _run] + 915\r\n\t40 UIKitCore 0x00007fff24f34192 UIApplicationMain + 101\r\n\t41 Titanium 0x000000010a898dd6 main + 806\r\n\t42 dyld 0x000000010acbce1e start_sim + 10\r\n\t43 ??? 0x0000000000000001 0x0 + 1\r\n\t44 ??? 0x0000000000000001 0x0 + 1\r\n)\r\n{code}\r\n\r\nAfter adding some debug logs, it appears that the {{App}} and {{UI}} modules are now entering the if statement [here|https://github.com/appcelerator/titanium_mobile/blob/9b319e97b0f2ae7a1bc3e43e902f7c2779103b97/iphone/TitaniumKit/TitaniumKit/Sources/API/KrollModule.m#L82-L84] during loading rather than going the the loading below. Adding code that ignores the App/UI modules in the ObjcProxy loading and forces them to the KrollObject loading allows the app to load succesfully\r\n\r\nh5.Steps to reproduce\r\n\r\n1. Run an app on an iOS 15 simulator\r\n\r\nh5.Actual\r\n\r\nApp crashes with above error\r\n\r\nh5.Expected\r\n\r\nApp should load ok", "attachment": [], "flagged": false, "summary": "iOS: Crash on startup when launching app on iOS 15", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": null, "comment": { "comments": [ { "id": "458742", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "This might be an iOS 15 bug? The following code prints {{and the class says 1}} for all module instances which seems sus, iOS 13.4 prints {{and the class says 0}}\r\n\r\n{code}\r\nBOOL isClass = [module isKindOfClass:[NSString class]];\r\nNSLog(@\"[DEBUG] and the class says %d\", isClass);\r\n{code}", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2021-06-08T11:20:01.000+0000", "updated": "2021-06-08T11:20:01.000+0000" }, { "id": "458743", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Chatting with [~jvennemann] and we found that isKindOfClass works ok for basic usage in a simple native project so this might not be a simple iOS bug (or an iOS bug at all)", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2021-06-08T14:16:59.000+0000", "updated": "2021-06-08T14:16:59.000+0000" }, { "id": "458744", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/12872", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-06-08T22:41:59.000+0000", "updated": "2021-06-08T22:41:59.000+0000" }, { "id": "458777", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Just noting that this issue only occurs when using SDK 10+, an application built using SDK 9 starts up no problem", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2021-06-15T12:48:39.000+0000", "updated": "2021-06-15T12:48:39.000+0000" }, { "id": "458784", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~amukherjee] I think it would be good for this to be placed into 10.0.1, is that ok?\r\n\r\nCurrently any application built with SDK 10 crashes on iOS 15. So if we get the fix in asap it allows time for folks to update and release ahead of iOS 15\r\n\r\nSDK 9.X is not impacted by this as the changes were new in SDK 10", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2021-06-16T10:07:07.000+0000", "updated": "2021-06-16T10:09:21.000+0000" }, { "id": "458785", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "master PR merged", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2021-06-16T11:02:40.000+0000", "updated": "2021-06-16T11:02:40.000+0000" }, { "id": "458794", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "backport merged", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2021-06-17T10:07:36.000+0000", "updated": "2021-06-17T10:07:36.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }