https://bugs.winehq.org/show_bug.cgi?id=50492
Bug ID: 50492 Summary: Amazon Chime 4.x (.NET 4.5 app) reports 'Failed to InjectErrorHandlingScript, Unable to cast COM object of type 'System.__ComObject' to interface type 'mshtml.HTMLHeadElement'' Product: Wine Version: 6.0-rc5 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: mshtml Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Distribution: ---
Hello folks,
as it says. Extracted from bug 48474
Stable download link via Internet Archive:
https://web.archive.org/web/20200117134752/https://clients.chime.aws/win/rel...
Prerequisite: 'winetricks -q dotnet452'
---
Managed exception happens after clicking 'Join meeting without account':
Chime logs 'trace-2021-01-12.log':
--- snip ---- BibaSource Information 0 [1] 01/12/2021 16:25:33.002427: ***************** BibaSource Information 0 [1] 01/12/2021 16:25:33.141427: Starting Amazon Chime... BibaSource Information 0 [1] 01/12/2021 16:25:33.142427: Current Working Directory: C:\users***\Application Data\Chime BibaSource Information 0 [1] 01/12/2021 16:25:33.142427: Enabling TLS 1.2 BibaSource Error 2 [3] 01/12/2021 16:25:33.158427: Failed to handle dump files,Could not find a part of the path 'C:\users***\Application Data\Chime\dumpfiles'. BibaSource Information 0 [1] 01/12/2021 16:25:33.478429: .NET framework detected: 4.5 - Release #379893 BibaSource Information 0 [1] 01/12/2021 16:25:33.484429: Registering to Events BibaSource Information 0 [1] 01/12/2021 16:25:33.624429: Registering Windows BibaSource Information 0 [1] 01/12/2021 16:25:33.983431: Combined Identifier: 258989E2-A020-4BC9-A7B1-78F80C83DDF0-0-BFEBFBFF000306C3-Samsung-SSD-860-EVO-2TB-S3YVNX0N403389X BibaSource Error 2 [1] 01/12/2021 16:25:34.008431: Failed to get the hardware information from Win32_ComputerSystem Error: Error code: 0x80041002 BibaSource Error 2 [1] 01/12/2021 16:25:34.034431: Failed to get the hardware information from Win32_ComputerSystem Error: Error code: 0x80041002 BibaSource Error 2 [1] 01/12/2021 16:25:34.069431: Failed to get the hardware information from Win32_OperatingSystem Error: Error code: 0x80041002 Native library pre-loader is trying to load native SQLite library "C:\users***\Application Data\Chime\x86\SQLite.Interop.dll"... BibaSource Information 0 [1] 01/12/2021 16:25:35.010435: MetricsManager::SendCustomEvent type: App Active BibaSource Information 0 [1] 01/12/2021 16:25:35.017435: App:: user config directory = C:\users***\Local Settings\Application Data\Amazon\Chime.exe_Url_ekajjg3kle30m4k4edurcaufrxkea4tf\4.28.9164.0 BibaSource Information 0 [1] 01/12/2021 16:25:35.098435: Trying to create identity session from saved config. BibaSource Error 2 [1] 01/12/2021 16:25:35.105435: Login failed with saved credentials : Credential is invalid BibaSource Information 0 [1] 01/12/2021 16:25:35.109435: Create task bar icon BibaSource Information 0 [1] 01/12/2021 16:25:35.357436: WindowManager::ShowModalWindow:: Displaying the view IdentityLoginView BibaSource Information 0 [1] 01/12/2021 16:25:36.362440: web browser IE version = 6.0.2800.1106 BibaSource Information 0 [1] 01/12/2021 16:25:36.362440: subscribe to webbrowser's NavigateError BibaSource Information 0 [1] 01/12/2021 16:25:36.379440: Navigating to: https://signin.id.ue1.app.chime.aws/ BibaSource Error 2 [1] 01/12/2021 16:25:59.223533: Failed to InjectErrorHandlingScript,Unable to cast COM object of type 'System.__ComObject' to interface type 'mshtml.HTMLHeadElement'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{3050F561-98B5-11CF-BB82-00AA00BDCE0B}' failed due to the following error: Exception from HRESULT: 0x80004002 (E_NOINTERFACE). ... --- snip ---
It's non-fatal as the application wraps that part in exception handler. Nevertheless this shouldn't happen.
--- snip --- (dc.e0): CLR exception - code e0434352 (first chance) Exception object: 0297cdd0 Exception type: System.InvalidCastException Message: Unable to cast COM object of type 'System.__ComObject' to interface type 'mshtml.HTMLHeadElement'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{3050F561-98B5-11CF-BB82-00AA00BDCE0B}' failed due to the following error: Exception from HRESULT: 0x80004002 (E_NOINTERFACE). InnerException: <none> StackTrace (generated): <none> StackTraceString: <none> HResult: 80004002 OS Thread Id: 0xe0 (0) Child SP IP Call Site 0031dd94 7b00ff28 [HelperMethodFrame_1OBJ: 0031dd94] 0031de18 0cc5ac40 BibaApplication.Views.IdentityLoginView.InjectErrorHandlingScript() 0031de44 0cc5aab2 BibaApplication.Views.IdentityLoginView.WebBrowserNavigated(System.Object, System.Windows.Forms.WebBrowserNavigatedEventArgs) 0031de74 078c18d9 System.Windows.Forms.WebBrowser.OnNavigated(System.Windows.Forms.WebBrowserNavigatedEventArgs) 0031de78 06fcde76 System.Windows.Forms.WebBrowser+WebBrowserEvent.NavigateComplete2(System.Object, System.Object ByRef) 0031e1c4 01892552 [DebuggerU2MCatchHandlerFrame: 0031e1c4] 0031df70 01892552 [HelperMethodFrame_PROTECTOBJ: 0031df70] System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean) 0031e244 79a044bd System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[]) 0031e268 79a0294c System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo) 0031ecdc 01892552 [DebuggerU2MCatchHandlerFrame: 0031ecdc] 0031ecac 01892552 [GCFrame: 0031ecac] 0031ec90 01892552 [GCFrame: 0031ec90] 0031f3d8 01892552 [InlinedCallFrame: 0031f3d8] 0031f3d4 05043b34 DomainBoundILStubClass.IL_STUB_PInvoke(System.Windows.Interop.MSG ByRef) 0031f3d8 0502630d [InlinedCallFrame: 0031f3d8] MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef) 0031f40c 0502630d System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame) 0031f458 05026009 System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame) 0031f464 0501cf2f System.Windows.Threading.Dispatcher.Run() 0031f474 56878bdf System.Windows.Application.RunDispatcher(System.Object) 0031f480 5687885f System.Windows.Application.RunInternal(System.Windows.Window) 0031f4a4 5687861a System.Windows.Application.Run(System.Windows.Window) 0031f4b4 063e0084 BibaApplication.App.Main() 0031f638 01892552 [GCFrame: 0031f638] BibaSource Error: 2 : [1] 01/12/2021 16:35:44.393064: Failed to InjectErrorHandlingScript,Unable to cast COM object of type 'System.__ComObject' to interface type 'mshtml.HTMLHeadElement'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{3050F561-98B5-11CF-BB82-00AA00BDCE0B}' failed due to the following error: Exception from HRESULT: 0x80004002 (E_NOINTERFACE). --- snip ---
Relevant part of .NET app assembly, decompiled:
--- snip --- ...
public void onError(object arg1, object arg2, object arg3) { LogManager.Instance.LogError(string.Format("IdentityLoginView javascript error: msg={0}, document={1}, lineNumber={2}", arg1, arg2, arg3)); }
private void InjectErrorHandlingScript() { string str = " function noError(errorMsg, document, lineNumber) \r\n {\r\n window.external.onError(errorMsg, document, lineNumber);\r\n return true;\r\n } \r\n\r\n window.onerror = noError;"; HTMLDocument domDocument = (HTMLDocument) this.myWebBrowser.Document.DomDocument; if (domDocument == null) return; IHTMLScriptElement element = (IHTMLScriptElement) domDocument.createElement("SCRIPT"); element.type = "text/javascript"; element.text = str; foreach (DispHTMLHeadElement dispHtmlHeadElement in domDocument.getElementsByTagName("head")) dispHtmlHeadElement.appendChild((mshtml.IHTMLDOMNode) element); }
private void WebBrowserNavigated(object sender, WebBrowserNavigatedEventArgs e) { try { this.InjectErrorHandlingScript(); } catch (Exception ex) { LogManager.Instance.LogError("Failed to InjectErrorHandlingScript," + ex.Message); } if (!(e.Url != (Uri) null)) return; IEventManager instance = BibaApplication.Managers.EventManager.Instance; WebBrowserNavigatedEvent message = new WebBrowserNavigatedEvent(); message.Url = e.Url.ToString(); message.DocText = this.myWebBrowser.DocumentText; instance.Send<WebBrowserNavigatedEvent>(message); } ... --- snip ---
$ sha1sum Chime.4.28.9164.exe 505934bfaa22843788a880cdfd3bc04ece9a3728 Chime.4.28.9164.exe
$ du -sh Chime.4.28.9164.exe 53M Chime.4.28.9164.exe
$ wine --version wine-6.0-rc6
Regards
https://bugs.winehq.org/show_bug.cgi?id=50492
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://web.archive.org/web | |/20200117134752/https://cli | |ents.chime.aws/win/releases | |/Chime.4.28.9164.exe Keywords| |dotnet, download
https://bugs.winehq.org/show_bug.cgi?id=50492
Vijay Kamuju infyquest@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |4efad17a9ffc1be95663b1c6cc8 | |4c16fb7830d89 Status|NEW |RESOLVED Resolution|--- |FIXED CC| |infyquest@gmail.com
--- Comment #1 from Vijay Kamuju infyquest@gmail.com --- patch committed https://source.winehq.org/git/wine.git/commitdiff/4efad17a9ffc1be95663b1c6cc...
https://bugs.winehq.org/show_bug.cgi?id=50492
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.6.
https://bugs.winehq.org/show_bug.cgi?id=50492
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |6.0.x
https://bugs.winehq.org/show_bug.cgi?id=50492
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|6.0.x |---
--- Comment #3 from Michael Stefaniuc mstefani@winehq.org --- Removing the 6.0.x milestone from bug fixes included in 6.0.2.