[Bug 36797] Overwolf installer fails with Wine-Mono due to unimplemented System.Windows.Forms.WebBrowser.set_ObjectForScripting

WineHQ Bugzilla wine-bugs at winehq.org
Sat Apr 25 07:02:03 CDT 2020


https://bugs.winehq.org/show_bug.cgi?id=36797

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Overwolf installer fails    |Overwolf installer fails
                   |with Mono                   |with Wine-Mono due to
                   |                            |unimplemented
                   |                            |System.Windows.Forms.WebBro
                   |                            |wser.set_ObjectForScripting
             Status|UNCONFIRMED                 |NEW
           Keywords|dotnet                      |
                URL|http://www.overwolf.com/dow |https://web.archive.org/web
                   |nload                       |/20200425093318/https://dow
                   |                            |nload.overwolf.com/installe
                   |                            |r/web_dl_btn/OverwolfInstal
                   |                            |ler.exe
     Ever confirmed|0                           |1

--- Comment #4 from Anastasius Focht <focht at gmx.net> ---
Hello joaopa,

--- quote ---
fresh wineprefix; wine-5.6
--- quote ---

you might want to check the Wine releases when Wine-Mono got updated.

https://gist.github.com/rmi1974/a65b875934f87509b536a776347d007a

--- snip ---
$ git log --oneline | sed -nre 's/(\w+).*wine mono.* ([0-9]+([.][0-9]+)+).*/\1
\2/ipg' | \
    xargs -l bash -c 'echo -n "Wine-Mono $1 | " ; git -c "versionsort.suffix=-"
tag --sort=version:refname --contains $0 | head -n1'

Wine-Mono 5.0.0 | wine-5.7
Wine-Mono 4.9.4 | wine-4.20
Wine-Mono 4.9.3 | wine-4.17
Wine-Mono 4.9.2 | wine-4.14
Wine-Mono 4.9.0 | wine-4.11
Wine-Mono 4.8.3 | wine-4.7
Wine-Mono 4.8.1 | wine-4.6
Wine-Mono 4.8.0 | wine-4.3
Wine-Mono 4.7.5 | wine-4.0-rc6
Wine-Mono 4.7.3 | wine-3.13
Wine-Mono 4.7.1 | wine-2.14
Wine-Mono 4.7.0 | wine-2.4
Wine-Mono 4.6.4 | wine-2.0-rc1
Wine-Mono 4.6.3 | wine-1.9.12
Wine-Mono 4.6.2 | wine-1.9.8
Wine-Mono 4.6.0 | wine-1.9.5
Wine-Mono 4.5.6 | wine-1.7.38
Wine-Mono 4.5.4 | wine-1.7.32
Wine-Mono 4.5.2 | wine-1.7.8
Wine-Mono 0.0.8 | wine-1.5.16
--- snip ---

With Wine-Mono 5.0.0, part of Wine 5.7 release:

--- snip ---
$ WINE_MONO_TRACE=all wine ./OverwolfInstaller.exe >>log.txt 2>&1
...
00ea:Call KERNEL32.CreateProcessW(00000000,0040a578
L"\"C:\\users\\focht\\Temp\\nsv2f13.tmp\\OWinstaller.exe\"
Channel=web_dl_btn&Sel=0  -exepath
Z:\\home\\focht\\Downloads\\OverwolfInstaller.exe
",00000000,00000000,00000000,00000000,00000000,00000000,00430200,0032f92c)
ret=00405547 
...
00ea:trace:process:CreateProcessInternalW started process pid 00ee tid 00ef 
...
00ea:Ret  KERNEL32.CreateProcessW() retval=00000001 ret=00405547 
...
[000000EF: 432.07565 121] ENTER:c
System.Diagnostics.FileVersionInfo:GetVersionInfo_internal
(string)(this:021BD1E0[System.Diagnostics.FileVersionInfo mscorlib.dll],
[STRING:021BCEB0:C:\windows\system32\mshtml.dll])
[000000EF: 432.09548 121] LEAVE:c
System.Diagnostics.FileVersionInfo:GetVersionInfo_internal (string)(
[000000EF: 432.09567 120] LEAVE:c
System.Diagnostics.FileVersionInfo:GetVersionInfo
(string)([System.Diagnostics.FileVersionInfo:021BD1E0]
[000000EF: 432.09731 120] ENTER:c
System.Diagnostics.FileVersionInfo:get_FileMajorPart
()(this:021BD1E0[System.Diagnostics.FileVersionInfo mscorlib.dll])
[000000EF: 432.09752 120] LEAVE:c
System.Diagnostics.FileVersionInfo:get_FileMajorPart ()(result=6
[000000EF: 432.09904 120] ENTER:c
System.Diagnostics.FileVersionInfo:get_FileMinorPart
()(this:021BD1E0[System.Diagnostics.FileVersionInfo mscorlib.dll])
[000000EF: 432.09924 120] LEAVE:c
System.Diagnostics.FileVersionInfo:get_FileMinorPart ()(result=0
[000000EF: 432.10081 120] ENTER:c
System.Diagnostics.FileVersionInfo:get_FileBuildPart
()(this:021BD1E0[System.Diagnostics.FileVersionInfo mscorlib.dll])
[000000EF: 432.10104 120] LEAVE:c
System.Diagnostics.FileVersionInfo:get_FileBuildPart ()(result=2800
[000000EF: 432.10259 120] ENTER:c
System.Diagnostics.FileVersionInfo:get_FilePrivatePart
()(this:021BD1E0[System.Diagnostics.FileVersionInfo mscorlib.dll])
[000000EF: 432.10279 120] LEAVE:c
System.Diagnostics.FileVersionInfo:get_FilePrivatePart ()(result=1106
...
[000000EF: 432.10392 120] ENTER:c System.Version:.ctor
(int,int,int,int)(this:021BD4D8[System.Version mscorlib.dll], 6, 0, 2800, 1106)
[000000EF: 432.10424 120] LEAVE:c System.Version:.ctor (int,int,int,int)(
...
[000000EF: 432.14390 119] LEAVE:c System.Version:ToString
(int)([STRING:021BD540:6.0.2800.1106]
[000000EF: 432.14410 118] LEAVE:c System.Version:ToString
()([STRING:021BD540:6.0.2800.1106]
[000000EF: 432.14662 118] ENTER:c
OWInstaller.OverwolfInstallerAnalytics:WebBrowserInit
(string)(this:02105760[OWInstaller.OverwolfInstallerAnalytics mscorlib.dll],
[STRING:021BD540:6.0.2800.1106])
...
[000000EF: 434.12877 132] LEAVE:c string:Format
(string,object)([STRING:021C3578:WebBrowser control version: 6.0.2800.1106 is
not supported]
...
--- snip ---

Decompiled installer C# code:

--- snip ---
// Type: OWInstaller.InstallerWindowWebView
// Assembly: ##_Installer, Version=2.145.0.0, Culture=neutral,
PublicKeyToken=null
// MVID: EA6DF905-E0BA-4075-9204-518FDE066933
// Assembly location: Z:\home\focht\Downloads\overwolf\OWInstaller.exe

using OverWolf.Client.CommonUtils.Logging;
using OWInstaller.CommandLine;
using OWInstaller.WebApp.Manifest;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace OWInstaller
{
  public class InstallerWindowWebView : InstallerWindowBase
  {
    private static ILogger _logger;
    private IInstallerWindowWebViewDelegate _delegate;
    private WebBrowserExtended _webBrowser;
    private AppManifestWindow _properties;
    private object _scriptingObject;
    private WebbrowserControlErrorHidingPatch _webbrowserErrHidingPatch;
    private bool _failedToLoadWebApp;
    private IContainer components;

    public WebBrowser WebBrowser
    {
      get
      {
        return (WebBrowser) this._webBrowser;
      }
    }

...
    public bool InitializeWindow(AppManifestWindow windowOptions, object
scriptingObject)
    {
      this._properties = windowOptions;
      this._scriptingObject = scriptingObject;
     
this._overwolfInstaller.Analytics.WebBrowserInit(this._webBrowser.Version.ToString());
      if (this._webBrowser.Version.Major < 11)
      {
        InstallerWindowWebView._logger.LogError(string.Format("WebBrowser
control version: {0} is not supported", (object) this._webBrowser.Version));
        return false;
      }
      this.SetWindowStyles(windowOptions);
      this._webBrowser.ObjectForScripting = this._scriptingObject;
      this._webBrowser.ScriptErrorsSuppressed =
!this._options.ShowScriptErrors;
      this._webBrowser.Visible = false;
      this._webBrowser.Navigate(windowOptions.IndexFile);
      return true;
    }
--- snip ---

Although it does cause some sort of abort, it doesn't seem to affect the
overall installer. It shows main UI later. With 'winetricks -q dotnet40':

--- snip ---
...
25/04/2020 13:51:01.945 [ 1] <   0.00MB> (Information) OverwolfInstaller -
Initializing Installer Object
25/04/2020 13:51:02.102 [ 1] <   0.00MB> (Information) OverwolfInstaller - OW
Installer - TenDigitsSemiUniqueOW_Name: 1236230617
25/04/2020 13:51:02.109 [ 1] <   0.00MB> (Information) GoogleAnalyticsHelper -
Overwolf setup - Auditing To Google event category Funnel2, Action Installer
Launched, label 4 Client, 4 Full
25/04/2020 13:51:02.114 [ 1] <   0.00MB> (Information) GoogleAnalyticsHelper -
Overwolf setup - Auditing to Datacenter counter
Manual_Funnel2_Installer_Launched
25/04/2020 13:51:02.115 [ 1] <   0.00MB> (Information) GoogleAnalyticsHelper -
Overwolf setup - Auditing to Datacenter counter Manual_Installer_Launched
25/04/2020 13:51:02.169 [ 1] <   0.00MB> (Information) AppManifest - web
app_version = 143.0.6
25/04/2020 13:51:02.478 [ 1] <   0.00MB> (Information) InstallerWindowWebView -
Initializing Web Installer Window
25/04/2020 13:51:02.680 [ 1] <   0.00MB> (Information) StateBase - Started
state: idle
25/04/2020 13:51:02.740 [ 1] <   0.00MB> (Information) GoogleAnalyticsHelper -
Overwolf setup - Auditing to analyticsnew installer_webbrowser_init
25/04/2020 13:51:02.772 [ 1] <   0.00MB> (Error      ) InstallerWindowWebView -
WebBrowser control version: 6.0.2800.1106 is not supported
25/04/2020 13:51:02.772 [ 1] <   0.00MB> (Error      ) WebViewController - Fail
to initialize main window
25/04/2020 13:51:02.779 [ 1] <   0.00MB> (Error      ) InstallerWindowManager -
Failed to initialize WebViewController: : System.Exception: Error initialize
webapp window
   at OWInstaller.WebViewController..ctor(IInstallerWindowWebViewDelegate
webViewDelegate, Options options, OverwolfInstaller overwolfInstaller)
   at OWInstaller.InstallerWindowManager.InitializeWebViewController()
25/04/2020 13:51:02.783 [ 1] <   0.00MB> (Information) OverwolfInstaller -
Initializing Installer Object
...
--- snip ---

The blocking problem for Wine-Mono:

--- snip ---
..
[000000EF: 631.66142 343] ENTER:c
OWInstaller.Helpers.JSHandler:add_DoneLoadingInnerFrame
(System.EventHandler)(this:021C9210[OWInstaller.Helpers.JSHandler
mscorlib.dll], [System.EventHandler:02290A80])
[000000EF: 631.66170 344] ENTER:c System.Delegate:Combine
(System.Delegate,System.Delegate)(00000000, [System.EventHandler:02290A80])
[000000EF: 631.66197 344] LEAVE:c System.Delegate:Combine
(System.Delegate,System.Delegate)([System.EventHandler:02290A80]
[000000EF: 631.66220 343] LEAVE:c
OWInstaller.Helpers.JSHandler:add_DoneLoadingInnerFrame (System.EventHandler)(
[000000EF: 631.66437 343] ENTER:c (wrapper remoting-invoke-with-check)
System.Windows.Forms.WebBrowser:set_ObjectForScripting
(object)(this:02204DD8[System.Windows.Forms.WebBrowser mscorlib.dll],
[OWInstaller.Helpers.JSHandler:021C9210])
[000000EF: 631.66738 344] ENTER:c
System.Windows.Forms.WebBrowser:set_ObjectForScripting
(object)(this:02204DD8[System.Windows.Forms.WebBrowser mscorlib.dll],
[OWInstaller.Helpers.JSHandler:021C9210])
[000000EF: 631.66886 345] ENTER:c
System.Runtime.InteropServices.Marshal:IsTypeVisibleFromCom
(System.Type)([TYPE:OWInstaller.Helpers.JSHandler])
[000000EF: 631.67056 346] ENTER:c (wrapper runtime-invoke)
object:runtime_invoke_void__this__
(object,intptr,intptr,intptr)([System.NotImplementedException:02290AC0],
00000000, 0032F22C, 08F1B2F8)
[000000EF: 631.67084 347] ENTER:c System.NotImplementedException:.ctor
()(this:02290AC0[System.NotImplementedException mscorlib.dll])
[000000EF: 631.67107 348] ENTER:c System.SystemException:.ctor
(string)(this:02290AC0[System.NotImplementedException mscorlib.dll],
[STRING:0336A0A0:The method or operation is not implemented.])
[000000EF: 631.67133 349] ENTER:c System.Exception:.ctor
(string)(this:02290AC0[System.NotImplementedException mscorlib.dll],
[STRING:0336A0A0:The method or operation is not implemented.])
...
--- snip---

Console output with old installer from comment #1:

--- snip ---
Unhandled Exception:
System.NotImplementedException: The method or operation is not implemented.
  at System.Windows.Forms.WebBrowser.set_ObjectForScripting (System.Object
value) [0x00010] in <4055c35822884d58876b1c889fdafb80>:0 
  at (wrapper remoting-invoke-with-check)
System.Windows.Forms.WebBrowser.set_ObjectForScripting(object)
  at OWInstaller.InstallerWindow..ctor (System.Boolean i_BetaMan,
System.Boolean i_TesterMode, System.Boolean i_MiniSTP, System.Boolean
i_TestHTMLs, System.Boolean i_DebugErrorWindows,
OverWolf.Client.CommonUtils.Logging.Logger i_Logger,
System.Collections.Generic.IDictionary`2[TKey,TValue] i_ParsedArguments,
System.Boolean i_IsSilent) [0x00151] in <1ba919d0b48a44ea97da4a6e3771cac0>:0 
  at (wrapper remoting-invoke-with-check)
OWInstaller.InstallerWindow..ctor(bool,bool,bool,bool,bool,OverWolf.Client.CommonUtils.Logging.Logger,System.Collections.Generic.IDictionary`2<string,
string>,bool)
  at OWInstaller.Program.Main (System.String[] args) [0x0027b] in
<1ba919d0b48a44ea97da4a6e3771cac0>:0 
--- snip ---

https://github.com/madewokherd/wine-mono/tree/wine-mono-5.0.0

https://github.com/mono/mono/blob/9aac8d0/mcs/class/System.Windows.Forms/System.Windows.Forms/WebBrowser.cs#L182

--- snip ---
        [MonoTODO ("Stub, not implemented")]
        [BrowsableAttribute(false)]
       
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
        public object ObjectForScripting {
            get { return objectForScripting; }
            set { objectForScripting = value; }
}
--- snip ---

Launcher/installer log file:

'C:\users\focht\Local Settings\Application
Data\Overwolf\Log\InstallerTrace_238_2020-04-25_11-51.log'

--- snip ---
25/04/2020 11:51:28.850 [ 1] <   0.00MB> (Information) Program - Installer
version: 2.145.0.0
25/04/2020 11:51:29.777 [ 1] <   0.00MB> (Information) Program - Command line:
Channel=web_dl_btn&Sel=0, -exepath,
Z:\home\focht\Downloads\OverwolfInstaller.exe, 
25/04/2020 11:51:30.392 [ 1] <   0.00MB> (Information) Program - 
Account name: N550\focht
IsSystemAccount: false
IsAnonymous: false
IsGuest: false
IsAuthenticated: true
25/04/2020 11:51:31.285 [ 1] <   0.00MB> (Information) TagExtract - Tag args
result: Channel=web_dl_btn&Sel=0
25/04/2020 11:54:26.225 [ 1] <   0.00MB> (Information) TagExtract - Tagger
information:
Channel: web_dl_btn
ExtensionId: 
PartnerId: 
Language: 
NoAds: False
Thank You: 
SelectedApp: False
AppName: 
UTM: source:, medium:, campaign:, term:, content:, extra:
RafToken: 
...
25/04/2020 12:01:47.638 [ 1] <   0.00MB> (Error      ) InstallerWindowManager -
failed to initialize native view: : System.NotImplementedException: The method
or operation is not implemented.
  at System.Runtime.InteropServices.Marshal.IsTypeVisibleFromCom (System.Type
t) [0x00000] in <084b4366b7b24485afe7dc701f3d4323>:0 
  at System.Windows.Forms.WebBrowser.set_ObjectForScripting (System.Object
value) [0x00010] in <4055c35822884d58876b1c889fdafb80>:0 
  at (wrapper remoting-invoke-with-check)
System.Windows.Forms.WebBrowser.set_ObjectForScripting(object)
  at OWInstaller.InstallerWindowNativeView..ctor
(OWInstaller.CommandLine.Options options) [0x000cb] in
<ea6df905e0ba40759204518fde066933>:0 
  at (wrapper remoting-invoke-with-check)
OWInstaller.InstallerWindowNativeView..ctor(OWInstaller.CommandLine.Options)
  at OWInstaller.InstallerWindowManager.InitializeNativeView () [0x00000] in
<ea6df905e0ba40759204518fde066933>:0 
...
--- snip ---

$ sha1sum OverwolfInstaller.exe 
a6d22bdbb2434aeaaa18d11d5a16e0f19bfd5163  OverwolfInstaller.exe

$ du -sh OverwolfInstaller.exe 
1.4M    OverwolfInstaller.exe

$ wine --version
wine-5.7

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list