Skip to content

WebView2 Unable to cast COM object of type #2161

@jadav1982

Description

@jadav1982

I am getting below error.

System.InvalidCastException
HResult=0x80004002
Message=Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Web.WebView2.Core.Raw.ICoreWebView2Controller'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{7CCC5C7F-8351-4572-9077-9C1C80913835}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
Source=mscorlib
StackTrace:
at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease)
at Microsoft.Web.WebView2.Core.Raw.ICoreWebView2Controller.Close()
at Microsoft.Web.WebView2.Core.CoreWebView2Controller.Close()
at Microsoft.Web.WebView2.WinForms.WebView2.Dispose(Boolean disposing)
at System.ComponentModel.Component.Finalize()

AB#38123381

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtrackedWe are tracking this work internally.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions