Skip to content
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] System.InvalidCastException error with Edge Canary version Version 88.0.670.0+ #535

Closed
xxi123 opened this issue Oct 14, 2020 · 6 comments
Labels
bug Something isn't working tracked We are tracking this work internally.

Comments

@xxi123
Copy link

xxi123 commented Oct 14, 2020

I receive System.InvalidCastException when running my winform application. My application Target CPU x86, Target Framework: 4.7.2 . I tested it on Windows 10 x64 bit and Windows 7 x64 bit with Edge Canary version 88.0.670.0. Both of them has same System.InvalidCastException. Then, I try to uninstall Edge Canary and install Edge Dev with version 87.0.658.0 and then I don't receive System.InvalidCastException anymore. And on my other computer, I try to install Edge Dev with version 87.0.658.0 without uninstalling the Canary, I don't receive System.InvalidCastException too and when I uninstall the Edge Dev I receive that exception again.

Error message:
System.InvalidCastException HResult=0x80004002 Message=Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Web.WebView2.Core.Raw.ICoreWebView2ExperimentalEnvironment'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{E01F1563-A31A-494E-BDF1-9C4E65373C19}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). Source=Microsoft.Web.WebView2.Core StackTrace: at Microsoft.Web.WebView2.Core.CoreWebView2CreateCoreWebView2EnvironmentCompletedHandler.Invoke(Int32 errCode, ICoreWebView2Environment created_environment)'

Screenshot_2

AB#29810717

@xxi123 xxi123 changed the title System.InvalidCastException error on setting WebView2.Source Edge Canary version Version 88.0.670.0 [Bug] System.InvalidCastException error on setting WebView2.Source Edge Canary version Version 88.0.670.0 Oct 14, 2020
@DjSt3rios
Copy link

I also have the same issue with this version. I guess we'll just have to wait for Microsoft to release a hotfix

@xxi123
Copy link
Author

xxi123 commented Oct 14, 2020

Tested on Canary Version 88.0.671.0 still receive System.InvalidCastException

@champnic champnic added bug Something isn't working tracked We are tracking this work internally. labels Oct 14, 2020
@champnic
Copy link
Member

Thanks for the report, I've filed a bug on our end to look into this! Sounds like the issue was recently introduced in a runtime update around 88.0.670.

In the meantime, you can continue development against Dev, Beta, or the WebView2 Runtime, all of which update at a slower cadence (though I imagine the next Dev release will probably run into the same issue :( )

@xxi123
Copy link
Author

xxi123 commented Oct 14, 2020

Thank you for the response. I use the Dev version now and my application run without exception

@champnic champnic changed the title [Bug] System.InvalidCastException error on setting WebView2.Source Edge Canary version Version 88.0.670.0 [Bug] System.InvalidCastException error with Edge Canary version Version 88.0.670.0+ Oct 14, 2020
@champnic champnic pinned this issue Oct 14, 2020
@champnic
Copy link
Member

We've tracked down the issue and have a fix in the works. The cause was an update to the runtime/browser that needed to happen, but it exposed a couple of issues in our .NET SDK. I'll update when we have the fix ready to deploy.

@champnic
Copy link
Member

This should be fixed in WebView2 SDK 1.0.674-prerelease. Unfortunately we weren't able to do a runtime fix for this, and so you'll have to upgrade the SDK from 0.9.628-prerelease. We will be marking that prerelease SDK as Deprecated and removing it shortly. Those of you on Dev and/or Beta will see this issue soon as the code moves through the runtime channels (when their version gets to 670+).

If this is still failing after updating the SDK please let us know. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tracked We are tracking this work internally.
Projects
None yet
Development

No branches or pull requests

3 participants