locked
[W81] WebView self destruct sequence found?

    Question

  • Download, build and run "XAML WebView control sample (C#)" for Windows 8.1

    http://code.msdn.microsoft.com/windowsapps/XAML-WebView-control-sample-58ad63f7
    (Updated: 4/2/2014)

    When the example starts,

    1. Select "1) Navigate to a URL".
    2. Enter "http://readwrite.com" and click "Go".
    3. After the sample finishes loading the content and the button returns to "Go" from "Stop". Enter "https://www.google.com" and click "Go" again.
    4. The sample terminates itself just after it logs "Loading content for https://www.google.com/".

    What's going on? Am I clicking the go button too fast??

    Anyhow, it seems some javascript/html5 codes from readwrite.com are triggering something for the following HTTPS connection. https://yahoo.com also terminates the example.

    If this is a bug, is there any workaround that prevents such termination.
    I'm not interested in opening readwrite.com or google.com websites.
    I'm concerned about the javacript or/and html5 code that triggers such catastrophe.

    Thanks.

    Tuesday, July 01, 2014 3:15 PM

Answers

  • I don't know why your experience is different than mine.  Google.com throws the javascript exception every time I navigate to it.

    Regardless, it's not a WebView self-destruct sequence, it's a javascript problem.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    • Marked as answer by choung.park Wednesday, July 02, 2014 10:35 PM
    Wednesday, July 02, 2014 12:12 PM
    Moderator

All replies

  • It's a bug in the Google webpage in Javascript. VS caught the exception that is thrown in JS and is presenting it to you for debugging purposes. This is not a bug in WebView. See my blog post for an explanation:

    http://blogs.msdn.com/b/wsdevsol/archive/2012/10/18/nine-things-you-need-to-know-about-webview.aspx#AN10


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, July 01, 2014 7:33 PM
    Moderator
  • I seems the JIT feature mentioned in your blog is only available in the full version of VS. I'm currently using expression version 12.0.30501.00 Update 2.

    I'm not seeing any debugger when that self termination happens...

    Also, when I directly open Google first, or open other website firsts (ex. microsoft.com, engadget.com etc.) and then open google.com, WebView loads the https://google.com just fine.

    It only happens when I open http://readwrite.com and then https://www.google.com. Also, http://readwrite.com and then https://www.yahoo.com.

    Tuesday, July 01, 2014 8:33 PM
  • I don't know why your experience is different than mine.  Google.com throws the javascript exception every time I navigate to it.

    Regardless, it's not a WebView self-destruct sequence, it's a javascript problem.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    • Marked as answer by choung.park Wednesday, July 02, 2014 10:35 PM
    Wednesday, July 02, 2014 12:12 PM
    Moderator
  • Thanks for looking into this problem.

    I hope my problem with WebView is isolated to my system only.

    Perhaps some beta visual studios I installed and uninstalled previously are causing this mysterious issue.

    Thanks again.

    Wednesday, July 02, 2014 10:35 PM