MicrosoftEdge / MicrosoftEdge/WebView2Feedback

WebView2 Unable to cast COM object of type

Open
#2,161 27 comments 0 reactions 1 assignee View on GitHub

@champnic is already working on this.

Since Jan 7, 2021.

bug tracked
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.