{ "id": "172579", "key": "AC-6017", "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": "10000", "description": "", "name": "Done" }, "resolutiondate": "2018-12-13T11:16:46.000+0000", "created": "2018-11-08T13:37:48.000+0000", "labels": [], "versions": [ { "id": "17038", "name": "Appcelerator Studio 4.5.0", "archived": false, "released": false } ], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-12-13T11:16:46.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Code that works on Android and with released SDK versions (7.4.1) and unreleased 7.4.2.RC, but not with 7.5.0.RC (specifically 7.5.0.v20181107165817, but also any other nightly I tested was affected):\r\n\r\n[ERROR] : The application has crashed with an uncaught exception 'org.xx_xxxxx.TiUIWebViewProxy'.\r\n[ERROR] : Reason:\r\n[ERROR] : Invalid type passed to function\r\n[ERROR] : Stack trace:\r\n[ERROR] : 0 CoreFoundation 0x000000010b2451e6 __exceptionPreprocess + 294\r\n[ERROR] : 1 libobjc.A.dylib 0x000000010a1cc031 objc_exception_throw + 48\r\n[ERROR] : 2 XX XXXXX 0x00000001026e75b7 TiExceptionThrowWithNameAndReason + 167\r\n[ERROR] : 3 XX XXXXX 0x00000001026a60b9 -[TiProxy throwException:subreason:location:] + 105\r\n[ERROR] : 4 XX XXXXX 0x0000000102619bc0 -[TiUIWebViewProxy evalJS:] + 560\r\n[ERROR] : 5 Foundation 0x0000000104b74d5e __NSThreadPerformPerform + 330\r\n[ERROR] : 6 CoreFoundation 0x000000010b1e7bb1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17\r\n[ERROR] : 7 CoreFoundation 0x000000010b1cc4af __CFRunLoopDoSources0 + 271\r\n[ERROR] : 8 CoreFoundation 0x000000010b1cba6f __CFRunLoopRun + 1263\r\n[ERROR] : 9 CoreFoundation 0x000000010b1cb30b CFRunLoopRunSpecific + 635\r\n[ERROR] : 10 GraphicsServices 0x000000010e74da73 GSEventRunModal + 62\r\n[ERROR] : 11 UIKit 0x0000000105159057 UIApplicationMain + 159\r\n[ERROR] : 12 XX XXXXX 0x00000001025b80b1 main + 113\r\n[ERROR] : 13 libdyld.dylib 0x000000010d624955 start + 1\r\n-- End simulator log ---------------------------------------------------------\r\n", "attachment": [], "flagged": false, "summary": "Crash on Nightly Version when Using WebView [iOS only]", "creator": { "name": "AppDev", "key": "appdev", "displayName": "AppDev", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "AppDev", "key": "appdev", "displayName": "AppDev", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "443448", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Can you please provide a full reproducible sample code for us to test the issue? Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-11-08T23:32:13.000+0000", "updated": "2018-11-08T23:32:13.000+0000" }, { "id": "443486", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello,\r\nWe haven't heard back from you since our last response. Did you manage to share a reproducible sample code to test the issue on our end?\r\n\r\nThanks", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-11-12T11:20:11.000+0000", "updated": "2018-11-12T11:20:11.000+0000" }, { "id": "443518", "author": { "name": "AppDev", "key": "appdev", "displayName": "AppDev", "active": true, "timeZone": "Europe/Berlin" }, "body": "I had hoped that the stacktrace would help you to see where the regression comes from. Do you have any idea what could be wrong there?\r\n\r\nBuilding a minimal example is not that easy, I am having the issue with a real app.", "updateAuthor": { "name": "AppDev", "key": "appdev", "displayName": "AppDev", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-11-13T14:26:07.000+0000", "updated": "2018-11-13T14:26:07.000+0000" }, { "id": "443550", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello,\r\n\r\nThanks for your feedback. Using 7.5.0.RC can you please create a simple test project using webview ,run this on iOS and let us know how it goes.\r\n\r\n", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-11-14T04:34:44.000+0000", "updated": "2018-11-14T04:34:44.000+0000" }, { "id": "443826", "author": { "name": "iblack.dum", "key": "iblack.dum", "displayName": "Sathaphorn Kerdmalai", "active": true, "timeZone": "Asia/Bangkok" }, "body": "I have the same issue too. ", "updateAuthor": { "name": "iblack.dum", "key": "iblack.dum", "displayName": "Sathaphorn Kerdmalai", "active": true, "timeZone": "Asia/Bangkok" }, "created": "2018-11-22T02:07:04.000+0000", "updated": "2018-11-22T02:07:04.000+0000" }, { "id": "443827", "author": { "name": "iblack.dum", "key": "iblack.dum", "displayName": "Sathaphorn Kerdmalai", "active": true, "timeZone": "Asia/Bangkok" }, "body": "Here is code evalJS on sdk 7.4.1\r\n\r\n{code:java}\r\n- (NSString *)evalJS:(id)code\r\n{\r\n ENSURE_SINGLE_ARG(code, NSString);\r\n /*\r\n Using GCD either through dispatch_async/dispatch_sync or TiThreadPerformOnMainThread\r\n does not work reliably for evalJS on 5.0 and above. See sample in TIMOB-7616 for fail case.\r\n */\r\n if (![NSThread isMainThread]) {\r\n inKJSThread = YES;\r\n [self performSelectorOnMainThread:@selector(evalJS:) withObject:code waitUntilDone:YES];\r\n inKJSThread = NO;\r\n } else {\r\n evalResult = [[(TiUIWebView *)[self view] stringByEvaluatingJavaScriptFromString:code] retain];\r\n }\r\n return (inKJSThread ? evalResult : [evalResult autorelease]);\r\n}\r\n{code}\r\n\r\nand this for sdk 7.5.0\r\n\r\n{code:java}\r\n- (NSString *)evalJS:(id)args\r\n{\r\n KrollCallback *callback = nil;\r\n NSString *code = nil;\r\n ENSURE_ARG_AT_INDEX(code, args, 0, NSString); // Conform to class because that's good practice\r\n if ([args count] > 1) {\r\n ENSURE_ARG_AT_INDEX(callback, args, 1, KrollCallback);\r\n }\r\n\r\n // Handle async\r\n if (callback != nil) {\r\n\r\n // Spin off a thread that will invoke on main thread and fire callback, then return nil immediately\r\n dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{\r\n dispatch_async(dispatch_get_main_queue(), ^{\r\n NSString *result = [(TiUIWebView *)[self view] stringByEvaluatingJavaScriptFromString:code];\r\n [callback call:@[ result ] thisObject:nil];\r\n });\r\n });\r\n return nil;\r\n }\r\n\r\n /*\r\n Using GCD either through dispatch_async/dispatch_sync or TiThreadPerformOnMainThread\r\n does not work reliably for evalJS on 5.0 and above. See sample in TIMOB-7616 for fail case.\r\n */\r\n if (![NSThread isMainThread]) {\r\n inKJSThread = YES;\r\n [self performSelectorOnMainThread:@selector(evalJS:) withObject:code waitUntilDone:YES];\r\n inKJSThread = NO;\r\n } else {\r\n evalResult = [[(TiUIWebView *)[self view] stringByEvaluatingJavaScriptFromString:code] retain];\r\n }\r\n return (inKJSThread ? evalResult : [evalResult autorelease]);\r\n}\r\n{code}\r\n\r\nI copy ENSURE_SINGLE_ARG(code, NSString); to sdk 7.5.0 there is no error", "updateAuthor": { "name": "iblack.dum", "key": "iblack.dum", "displayName": "Sathaphorn Kerdmalai", "active": true, "timeZone": "Asia/Bangkok" }, "created": "2018-11-22T02:47:39.000+0000", "updated": "2018-11-22T02:47:39.000+0000" }, { "id": "443848", "author": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "body": "Do you have the issue as well with 7.4.2? Some issues were resolved in both 7.4.2 and 7.5.0 and were there in 7.4.1", "updateAuthor": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-11-22T14:30:50.000+0000", "updated": "2018-11-22T14:30:50.000+0000" }, { "id": "443849", "author": { "name": "iblack.dum", "key": "iblack.dum", "displayName": "Sathaphorn Kerdmalai", "active": true, "timeZone": "Asia/Bangkok" }, "body": "7.4.1.GA there is no error. I got this error on 7.5.0.GA", "updateAuthor": { "name": "iblack.dum", "key": "iblack.dum", "displayName": "Sathaphorn Kerdmalai", "active": true, "timeZone": "Asia/Bangkok" }, "created": "2018-11-22T14:33:37.000+0000", "updated": "2018-11-22T14:33:37.000+0000" }, { "id": "444003", "author": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "body": "I got this error too - I built my app with 7.5.0GA without any code change and suddenly app crashes after few seconds. There is no problem with 7.4.1GA... I use Ti.UI.WebView to display youtube videos...\r\nThanks", "updateAuthor": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "created": "2018-11-28T20:29:28.000+0000", "updated": "2018-11-28T20:29:28.000+0000" }, { "id": "444114", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~iblack.dum] [~max87], Please create a standalone sample code that reproduces the issue for iOS in SDK 7.5.0.GA. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-11-30T23:58:29.000+0000", "updated": "2018-11-30T23:58:29.000+0000" }, { "id": "444400", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello,\r\nI just wanted to follow up with you about this issue? Are you still experiencing this problem on 7.5.0.GA ? Did you manage to create a sample test project to reproduce the issue on our end\r\nPlease let us know if you need more help with this issue.", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-12-10T10:37:07.000+0000", "updated": "2018-12-10T10:37:07.000+0000" }, { "id": "444575", "author": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "body": "I think I also had this issue. Switching to run-on-main-thread: true and use-js-framework: true fixed the issue", "updateAuthor": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-12-13T11:12:56.000+0000", "updated": "2018-12-13T11:12:56.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }