-
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
EnsureCoreWebView2Async is internally called a 2nd time and throws the exception #1781
Comments
Following as this appears to be part of the bigger issue reported by several users in the last 24 hours and that affects me, too |
Agreed. In fact I have now reverted to Build 1.0.902.49 as that is the only one that appears to work consistently for me across standalone WPF applications as well as our Outlook and Office Add-ins. |
Hey @SchreinerK - Thanks for the bug report! In general this new behavior is "By Design", in that we are trying to catch instances where devs were causing initialization to happen twice, and the second time was being silently ignored. For example, if the Source property was set (which triggers implicit initialization) and then the dev tried to call EnsureCoreWebView2Async with a specific environment setup, the environment was being silently ignored, causing unexpected behavior (missing browser args or settings, etc.). However, you have found a case where we don't want this to happen, which is setting the Source property after EnsureCoreWebView2Async has completed initialization, only within the WPF control. This shouldn't cause a new implicit initialization because initialization has already completed! The Winforms control correctly allows the Source property to be set after EnsureCoreWebView2Async without an error. The workarounds available to you are:
I've opened this bug on our backlog and we'll get a fix out shortly. Thanks! |
This should now be fixed in SDK packages 1.0.1020.30 and 1.0.1056-prerelease. Thanks! |
Hi all. I'm afraid this is still not working for me after upgrading to 1.0.1020.30 Can somebody please help as I am at my wit's end here. :( |
I just upgraded to 1.0.1020.30 and the exception is no longer thrown for WPF. |
Yes ignore my comment I think I'm still struggling with #1778 |
I posted the solution here: |
EnsureCoreWebView2Async is internally called a 2nd time and throws the exception
Steps to reproduce:
I think maybe the problem is that EnsureCoreWebView2Async is called because the Uri is set the first time
BUT should not be called because environment already set in NewWindowRequested handler.
(A)
(B)
InitCreationProperties() is not called in this case because Source is not null
SDK: 1.0.992.28
Framework: WPF
OS: Win10
AB#36602860
The text was updated successfully, but these errors were encountered: