Open kevingosse opened 6 years ago
It looks like this sequence produces the same result:
WebView.Navigate((Uri)null);
Wait for the navigation to complete
WebView.NavigateToString("crash");
crashes
Just as before, the issue occurs in Windows::Web::UI::WebViewControlBase::get_Source
which in turn calls WebViewControlWinRTHelpers::CreateWinRTUriFromString
. I obviously don't have access to the source code of Edge, but I get the feeling that this happens when querying Source
while the Uri is null.
My workaround is to implement a custom IUriToStreamResolver
that returns my string, then use NavigateToLocalStreamUri
to load it.
After that, calling InvokeScriptAsync
works properly, which seems to confirm my hypothesis: the crash is caused by Source
being read while the uri is null.
@joshholmes. We do a check while navigating to determine if the process has the appropriate permission:
There are a few cases we previously discussed during triage where we fail fast and we shouldn't
I'm submitting a...
Current behavior
I'm hosting a WebView control in a simple WPF application. I call
NavigateToString
to load a script. Then the application always crash onInvokeScriptAsync
.Native callstack:
Minimal reproduction of the problem with instructions
Repro project: WpfApp1.zip
Just launch it and click on the button
Environment