Whenever JS passes jsplainobject to OC, the console reports the following error:
WebViewJavascriptBridge: WARNING: Error when trying to fetch data from WKWebView: Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=1, WKJavaScriptExceptionMessage=TypeError: JSON.stringify cannot serialize cyclic structures., WKJavaScriptExceptionColumnNumber=1523, WKJavaScriptExceptionSourceURL=http://mobile3.nstc.com.cn/sxcc/mobile/#account-balance-and-details, NSLocalizedDescription=A JavaScript exception occurred}。
WebViewError:
WebViewJavascriptBridge: WARNING: ObjC got nil while fetching the message queue JSON from webview. This can happen if the WebViewJavascriptBridge JS is not currently present in the webview, e.g if the webview just loaded a new page.
So,If the JS side does not handle, if the problem is fixed?
It seem that Javascript have Cross domain operation. And the other doman don't register method correctly. Also please check the 'data' why that Javascript can't stringify?
Whenever JS passes jsplainobject to OC, the console reports the following error:
WebViewJavascriptBridge: WARNING: Error when trying to fetch data from WKWebView: Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=1, WKJavaScriptExceptionMessage=TypeError: JSON.stringify cannot serialize cyclic structures., WKJavaScriptExceptionColumnNumber=1523, WKJavaScriptExceptionSourceURL=http://mobile3.nstc.com.cn/sxcc/mobile/#account-balance-and-details, NSLocalizedDescription=A JavaScript exception occurred}。
WebViewError:
WebViewJavascriptBridge: WARNING: ObjC got nil while fetching the message queue JSON from webview. This can happen if the WebViewJavascriptBridge JS is not currently present in the webview, e.g if the webview just loaded a new page.
So,If the JS side does not handle, if the problem is fixed?
Cheers, @marcuswestin