Rank: Newbie Groups: Member
Joined: 12/26/2021 Posts: 4
|
When I use multiple headless batch login accounts, it will quickly display application errors. I have use the code"EO.Base.Runtime.EnableEOWP = true;" but no use, How to avoid this situation. ThreadRunner threadRunner = new ThreadRunner(); m_ WebView = threadRunner. CreateWebView(); threadRunner. Send(() => { //login code } you can handle EO. Base. Runtime. exception event to silent this message. Exception: System. Environment. GetStackTrace(Exception e, Boolean needFileInfo) System. Environment. get_ StackTrace() EO. Base. BaseException.. ctor(String ltw, Exception ltx) EO. WebBrowser. JSInvokeException.. ctor(JSInvokeResult xm, String xn) EO. WebBrowser. JSException.. ctor(String xp, Int32 xq, Int32 xr, Int32 xs, String xt) EO. WebBrowser. JSException. eojk(rhur xo) EO. WebBrowser. WebView. nwec(String gw, JSInvokeResult gx, rhur gy, Exception& gz) EO. WebBrowser. ScriptCall. oite(JSInvokeResult yt, bsjn yu, String yv) EO. WebBrowser. ScriptCall. qqok. pawg(bsjn yz) EO. Internal. bsne`3. igsy. svca(l opr) EO. Internal. bsne`3. aitc(l oom) EO. Internal. bsne`3. EO. Internal. bsjq<TInMsg>. oqif(Object rrc) EO. Internal. bsne`3. aitb() EO. Internal. bsne`3. aita(IntPtr ook, Int32 ool) EO. Internal. bsne`3. igsx. xfei(bshn opf) EO. Internal. bsne`3. igsx. thai(Object ope) System. Threading. ThreadHelper. ThreadStart_ Context(Object state) System. Threading. ExecutionContext. RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) System. Threading. ExecutionContext. Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) System. Threading. ExecutionContext. Run(ExecutionContext executionContext, ContextCallback callback, Object state) System. Threading. ThreadHelper. ThreadStart(Object obj)
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi, Make sure you provide a doneHandler when you initialize your ScriptCall object. For example:
Code: C#
private void OnScriptCallDone(object sender, ScriptCallDoneEventArgs e)
{
//check e.Call.Exception to see if any error has occurred
}
ScriptCall call = new ScriptCall("runSomeJavaScriptCode();", OnScriptCallDone);
webView.QueueScriptCall(call);
This way if an error has occurred, the Exception object is saved in e.Call.Exception and you can examine it in your code. If you do not provide a done handler, then the exception will be thrown. Thanks!
|
Rank: Newbie Groups: Member
Joined: 12/26/2021 Posts: 4
|
After debugging, it is found that the crash occurs when executing evalscript. Sometimes it is normal and sometimes this occurs. I guess this error may occur when the page cannot execute jscode immediately. IS any better suggestions.
|
Rank: Newbie Groups: Member
Joined: 12/26/2021 Posts: 4
|
Thank you for your reply. This is helpful.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
You are very welcome!
|