-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: v1.0.1722.32 doesn't get past EnsureCoreWebView2Async #3375
Comments
Thanks for reporting the issue. I've assigned this to a dev that can help follow up on this. |
I believe I am seeing a similar issue. Happened when I updated to "Method not found: 'Void Microsoft.Web.WebView2.Core.CoreWebView2Profile.add_Deleted(System.EventHandler`1<System.Object>)'."} | System.Exception {System.MissingMethodException}" |
Hey all - Thanks for reaching out, and sorry you're hitting this. We're looking into this ASAP and will consider deprecating the current SDK if this turns out to be widespread. I just tried to repro in a Winforms app using 1.0.1722.32 and runtime 112.0.1722.39 and didn't see this crash or hang. Can you share what runtime versions you are seeing this with? And is there any other specific context necessary, like running under a debugger, or breaking on handled exceptions? Thanks! |
Using the latest runtimes as of yesterday (112.0.1722.39 is what I have). From what I can tell the runtime doesn't matter - it's the .NET library that's causing the problem since reverting back to the prior version makes it work. This is in WPF applications. I've just double checked both of my commercial desktop apps, and they are showing the same behavior. Here's Markdown Monster starting up and failing to load the two WebViews with The GitHub sample app should demonstrate. Installed version runs - change the WV version and it stops working. |
Thanks for investigating. Seeing this in Debug or Release builds, with or without debugger attached. I've also uninstalled + reinstalled the WebView2 runtime. |
I get a consistent repro on my WPF sample app as well, crashing on |
Full stack: (actually, I'm a bit confused. I think this is a second failure when trying to recover or something?).
|
The error trace I see in my logs looks like this:
Looks like here too it's From what I can tell it looks like it has to do with the environment folder not being created. I've tried with different paths just to see if it might be some weird permissions issue, but whether I provide a folder, or use the default global folder doesn't make a difference - it hangs either way. |
What's interesting that I see mostly hanging operations - IOW it hits the |
I think we've root-caused the issue, including why it's not an issue on Winforms. It's related to being unable to catch MissingMethodExceptions in a simple try-catch. We have a potential fix that I'm validating now. Given this seems to be hitting WPF WebView2 100% we'll be moving forward with the deprecation of the 1.0.1722.32 SDK and releasing a new one hopefully soon. |
Thanks you for the quick turnaround @champnic!
But it works in WinForms? That seems like it would be a runtime/language issue independent of the UI platform? |
The code is actually different in the two UI platforms, so my fix is to bring the missing code from the Winforms control to the WPF control. It looks like it's working, so now we'll work on getting it checked in and released in a new SDK package. |
Really appreciate the WebView2 team's quick response and investigation on this issue. We work with a lot of different companies which don't come anywhere close to the level of responsive and diligence shown here. Well done! |
Just to confirm latest version Thanks for getting this fixed quickly. Aloha... |
Hi ! Exception thrown: 'System.MissingMethodException' in Microsoft.Web.WebView2.Wpf.dll try The main symptom is that the webView never displays anything, and it seem to derail the initialization of the xaml Control it is part of, but I get no other error / exception. The exception is supposed to be caught, so it should not be reported in the Console output ? |
Could you try to update to 1.0.2210.55? The try-catch was still there in 2151, however MissingMethodExceptions sometimes could not be caught by simple try-catch. The issue should go away in newer 2210 SDK where the related API has been promoted to stable public API and is not missing method any more. |
Thanks for the quick answer, I will try and report back |
Amazing, it worked, thanks! |
I just switched one of my samples to use the latest WebView (to
v1.0.1722.32
fromv1.0.1661.34
and noticing that the latest version is failing by not completing the load operation.Specifically
WebBrowser.EnsureCoreWebView2Async(env)
fails to ever complete - the call is made and it hangs without ever continuing which of course keeps content from loading.Here's the relevant code, which is called from the host form's ctor, with a wrapping WebViewHandler. This fails with
v1.0.1722.32
but works just fine withv1.0.1661.34
:If you want to try this out you can find the code here:
Westwind.WebView Component Github Repo
You can clone the project, and run the WPF Sample. Click on the Emojii Viewer.
The Westwind.WebView control project for now uses
v1.0.1661.34
and the EmojiiViewer works fine. Then change the WebView version tov1.0.1722.32
, recompile and re-run and you'll see the application hang or rather not draw the emoji view which is what displays in the WebView.The relevant code lives in
Westwind.WebView.WebViewHandler::InitializeAsync()
which exhibits the hanging situation.AB#44135105
The text was updated successfully, but these errors were encountered: