Steps to Reproduce
create Alloy project running a WebView with a $.webview.setBasicAuthentication(param1, param2, param3) in it.
Actual Result
Titanium SDK 7.x and prior: everything's ok
Since SDK 8.x: App Crash
[ERROR] : Script Error {
[ERROR] : column = 35;
[ERROR] : line = 88;
[ERROR] : message = 'invalid method '(null)'';
[ERROR] : nativeStack = '3 TitaniumKit0x0000000112bd7ec2 __KrollCallAsFunction_block_invoke + 30
4 TitaniumKit0x0000000112bd7cce KrollCallAsFunction + 450
5 JavaScriptCore 0x000000010dd76053 _ZN3JSC16JSCallbackObjectINS_20JSDestructibleObjectEE4callEPNS_9ExecStateE + 531
6 JavaScriptCore 0x000000010e21bb64 _ZN3JSC5LLInt9setUpCallEPNS_9ExecStateENS_22CodeSpecializationKindENS_7JSValueEPNS_17LLIntCallLinkInfoE + 404
7 JavaScriptCore 0x000000010dd41011 llint_entry + 61950
8 JavaScriptCore 0x000000010dd4173b llint_entry + 63784
9 JavaScriptCore 0x000000010dd4101f llint_entry + 61964
10 JavaScriptCore 0x000000010dd31c59 vmEntryToJavaScript + 200
11 JavaScriptCore 0x000000010e117f03 _ZN3JSC11Interpreter11executeCallEPNS_9ExecStateEPNS_8JSObjectENS_8CallTypeERKNS_8CallDataENS_7JSValueERKNS_7ArgListE + 467
12 JavaScriptCore 0x000000010e35ded4 _ZN3JSC12profiledCallEPNS_9ExecStateENS_15ProfilingReasonENS_7JSValueENS_8CallTypeERKNS_8CallDataES3_RKNS_7ArgListE + 196
13 JavaScriptCore 0x000000010dd7d018 JSObjectCallAsFunction + 488
14 TitaniumKit0x0000000112bb4a1e TiBindingEventProcess + 670
15 TitaniumKit0x0000000112bd5f71 -[KrollContext invoke:] + 109
16 TitaniumKit0x0000000112bd5fe4 -[KrollContext enqueue:] + 93
17 TitaniumKit0x0000000112bdda9e TiBindingRunLoopEnqueue + 82
18 TitaniumKit0x0000000112bdc1c4 -[TiProxy fireEvent:withObject:propagate:reportSuccess:errorCode:message:] + 164
19 TitaniumKit0x0000000112bbcbce -[TiViewProxy fireEvent:withObject:propagate:reportSuccess:errorCode:message:] + 224
20 TitaniumKit0x0000000112bdbfce -[TiProxy fireEvent:withObject:propagate:] + 76
21 TitaniumKit0x0000000112bad097 -[TiUIView touchesEnded:withEvent:] + 110
22 UIKitCore 0x000000011fcda4e6 -[UIWindow _sendTouchesForEvent:] + 2547';
[ERROR] : sourceURL = 'file:///Users/dnasiri/Library/Developer/CoreSimulator/Devices/5952FC7C-2DBE-448F-8CCC-335B97F14C61/data/Containers/Bundle/Application/4F5F7478-C89F-407D-AA44-C2D97C81D44C/webviewtest.app/alloy/controllers/myWebview.js';
[ERROR] : stack = ' at [native code]
at Controller(/alloy/controllers/myWebview.js:88:35)
at createController(/alloy.js:428:53)
at doClick(/alloy/controllers/index.js:54:43)';
[ERROR] : toJSON = '<KrollCallback: 0x6000004a7c40>';
[ERROR] : }
Expected Result
no crash
Hi [~dbenhenni], In which platform do you experience this crash? Android or iOS?
Hi @jnaher, on iOS.
[~dbenhenni], Can you please verify that is the app is crashing on 8.1.1.GA?
The app runs properly with SDK 7.5.1 and prior. From SDK 8.0.0.GA till current Version 8.1.1.GA it crashes
[~dbenhenni], We tested the project attached by you. Clicking on "Hello World", we are getting following error on simulator:
Are you experiencing the same?
Yes. I am experiencing the same issue.
A decent solution is required urgently in terms of iOS 13 Update.
The following workaround helped to fix the error: * import module: ti.wkwebview from https://github.com/appcelerator-modules/ti.wkwebview/releases * replace $.webview.setBasicAuthentication(
https://docs.appcelerator.com/platform/latest/#!/guide/Communication_Between_WebViews_and_Titanium-section-29004919_CommunicationBetweenWebViewsandTitanium-Ti.AppEvents
This is a huge parity issue regressed in SDK 8.0.0. Summarized: iOS uses an Object-based access and Android expects a method with two parameters. Since the iOS WebView was reworked in SDK 8, it should be fixed on iOS. A fix is coming today.
Pull request: https://github.com/appcelerator/titanium_mobile/pull/11311 Test case:
Please escalate and schedule asap.
FR Passed. Waiting on Jenkins build.
merged to master
Verified on: Mac OS: 10.14.5 SDK: 8.3.0.v20191106125835 Appc CLI: 7.1.1 JDK: 1.8.0_162 Node: 10.5.0 Studio: 5.1.4.201909061933 XCode: 11.1 Device: iPhone X(v13.0), iPhone 7Plus(v12.3.1), iOS simulator 13.1