|
Rank: Advanced Member Groups: Member
Joined: 12/10/2014 Posts: 137
|
Hello EO team,
We are still facing some webview crash / not loading resulting in a blank page (starting with <!-- EO blank -->)
Is there any way we could list to an event to know when those page are displayed ?
OR
Personnalize them with a message like "Something went wrong, reload?" with a button that could trigger c# code ?
Thanks,
best regards
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
If you see, "<EO blank>", then the WebView has not crashed. If you believe it should not display that, please try to isolate the problem into a test project and then send the test project to us.
If you wish to display custom message when the WebView has crashed, you can handle WebView.Closed event and then check the event argument's Reason property to see if it is "Normal". If it is not "Normal", then it's a crash and then you can display some custom message to the end user.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 4/5/2016 Posts: 1
|
Hi,
My team experiences the same issues. Instead of showing EO Blank, it would be helpful to trigger a reload potentially so the user can get out of this state? If you have any other ideas for us to try, please let us know. This occurs fairly often and we have multiple instances of EO running.
Thank you.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
doots wrote:Hi,
My team experiences the same issues. Instead of showing EO Blank, it would be helpful to trigger a reload potentially so the user can get out of this state? If you have any other ideas for us to try, please let us know. This occurs fairly often and we have multiple instances of EO running.
Thank you. Hi, There are two different scenarios. <!-- EO blank --> and WebView crashes. They both look exactly the same but they are different. We can not replace <!-- EO blank --> with a custom page since that page serves a special purpose. If that page does not go away, then something in the engine is wrong and just replacing that page will not fix the problem for you. So you will need to find out exactly which case it is first. Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 12/10/2014 Posts: 137
|
Yes I noticed that, sometimes the page is just blank with no url loaded sometimes the page is blank and all new webview will be blank too until we restart webCore
|
|
Rank: Advanced Member Groups: Member
Joined: 7/20/2015 Posts: 52
|
Same issue here using 16.1.54, WPF. My app has several WebViews, all are loaded on the Main thread using LoadUrl method. Sporadically, 1 or 2 of them display EO.Blank. I have put logging in place to confirm that after the NavigationTask is done, the Url property of WebView is what I expect it to be. Something happens to the WebView internally because in a subsequent operation, I can see that Url is back to being an empty string. I am calling LoadUrl after WebControl has been Loaded. This is very difficult to reproduce and therefore debug.
It's difficult to produce a sample project to exhibit this. Is there any code internally that would set Url back to an empty string?
|
|
Rank: Advanced Member Groups: Member
Joined: 7/20/2015 Posts: 52
|
Also want to note that I don't think the WebView has crashed since I can right-click on the white area and get the context menu to view source. Also, no exception is logged and I am handling EO exceptions. Should I be looking at the Closed event and then reacting to it? Please advise.
|
|
Rank: Advanced Member Groups: Member
Joined: 12/10/2014 Posts: 137
|
JK wrote:Same issue here using 16.1.54, WPF. My app has several WebViews, all are loaded on the Main thread using LoadUrl method. Sporadically, 1 or 2 of them display EO.Blank. I have put logging in place to confirm that after the NavigationTask is done, the Url property of WebView is what I expect it to be. Something happens to the WebView internally because in a subsequent operation, I can see that Url is back to being an empty string. I am calling LoadUrl after WebControl has been Loaded. This is very difficult to reproduce and therefore debug.
It's difficult to produce a sample project to exhibit this. Is there any code internally that would set Url back to an empty string? You described the problem we face perfectly : / Btw, we are loading/setting url 2-3 webviews at the same time
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
The code does internally set it to blank Url however that is the "initializing Url". That Url will not be loaded if another Url is submitted. We are not able to reproduce the problem here so we can't go much further. We will update this thread again if we managed to catch it.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 7/20/2015 Posts: 52
|
Hi EO Support!
This issue didn't go away (we are upgraded to 16.2.1 at this point), but I recently found a workaround that may provide a clue to you.
First, the facts: 1.) After calling WebView.LoadUrl NavigationTask is completely successful 2.) WebView and EO Runtime are still fully functional
Regardless, we still sometimes see the EO.Blank page instead of our desired page. Very frustrating because it's not easily reproducible.
Now, I have put some code in place that ensures a few things before I ever call WebView.LoadUrl. This seems to work (for now). Without these checks, we sporadically get EO.Blank: 1.) The control containing WebControl IsLoaded 2.) The WebControl IsLoaded 3.) The WebView StatusMessage is not null 4.) The WebView IsCreated
It would be awesome if there was a "IsReadyToLoadUrl" property and "IsReadyToLoadUrlChanged" event on WebView.
Additionally, I have proven that sometimes our desired page loads and then goes backward to EO.Blank after the user starts using it. We've proven that backspace key can cause this but it also happens inexplicably sometimes. So, I've added some javascript to JsInitCode that checks whether the page is blank (url starts with data:text) every 2 seconds and fires extInvoke, which calls LoadUrl again on the C# side. It's a hack but it should reduce the support calls hopefully:
var lastValidUrl; window.onload = function () { document.onkeydown = function(event) { backspaceIsPressed = event.which == 8; }; document.onkeyup = function(event) { backspaceIsPressed = false; }; window.onbeforeunload = function(e) { if(backspaceIsPressed) { var dialogText = 'Are you sure you want to leave this page?'; e.returnValue = dialogText; return dialogText; } };
setInterval(function() { if(window.location.href.startsWith('data:text') && lastValidUrl) { eoWebBrowser.extInvoke('BlankScreenDetected', arguments); } else { lastValidUrl = window.location.href; } }, 2000); };
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Thanks for sharing. By design the WebView will always load a blank Url (to initialize) before loading the actual Url. However your work around does bring up an interesting point is that if user load an actual Url and then accidently press back key, it will navigate "back" to the initial blank page. This is not desired since the initial blank page is an internal implementation and should not be visible to user. We will look into this and see if we can correct this in our next build.
|
|
Rank: Advanced Member Groups: Member
Joined: 7/20/2015 Posts: 52
|
Great - if you can make it so that the EO.Blank page is never displayed to a user once a real page has been loaded, I think that would likely take care of the problem overall.
Note also that sometimes it goes back to the blank page even when no user interaction has occurred and it truly seems somehow related to those properties I'm checking. Since I've put those checks in, we've had zero"no-user-interaction" blanks. Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 12/10/2014 Posts: 137
|
Hi,
We used a different and simpler workaround that seems to fit our "blank page problem" :
We just listen to webView Closed event and if the reason is an engine crash we reload a new webview
if (e.Reason == WebViewCloseReason.EngineCrash) reloadWebview();
It's not the best because the load is a bit delayed, but it seems to be working great in our case.
Thanks for your informations JK
Regards
|
|
Rank: Advanced Member Groups: Member
Joined: 7/20/2015 Posts: 52
|
Hi Eurice,
Thanks for the info! In our case, WebView never closes and the engine never crashes. Still looks like some good defensive code you've got there. I may borrow it!
Regards,
JK
|
|
Rank: Advanced Member Groups: Member
Joined: 12/10/2014 Posts: 137
|
Hi JK,
I still face the problem with customer using window 7; Are you guys using it too ?
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 7/20/2015 Posts: 52
|
Yes, Windows 7.
|
|