smatechnologies / opcon-web-installer

This utility downloads and launches OpCon's installation software.
6 stars 1 forks source link

System.InvalidOperationException #2

Open anankee26 opened 2 years ago

anankee26 commented 2 years ago

Hello,

Version 1.7 crashes on my computer:

Application : OpCon Web Installer.exe
Version du Framework : v4.0.30319
Description : le processus a été arrêté en raison d'une exception non gérée.
Informations sur l'exception : System.InvalidOperationException
   à System.Linq.Enumerable.First[[SMA.OpCon.WebInstaller.Products.Actions.ActionType, OpCon Web Installer, Version=1.7.0.0, Culture=neutral, PublicKeyToken=null]](System.Collections.Generic.IEnumerable`1<SMA.OpCon.WebInstaller.Products.Actions.ActionType>, System.Func`2<SMA.OpCon.WebInstaller.Products.Actions.ActionType,Boolean>)
   à SMA.OpCon.WebInstaller.Products.Actions.AvailableActionGovernor.CalculateDefaultAction(Package, SMA.OpCon.WebInstaller.Products.Actions.ActionType ByRef, PackageVersion ByRef)
   à SMA.OpCon.WebInstaller.Products.Actions.AvailableActionGovernor.PopulateActions(System.Collections.Generic.IEnumerable`1<Package>)
   à OpCon_Web_Installer.WindowMain+<NavigateForward>d__19.MoveNext()
   à System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   à System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   à System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   à System.Windows.Threading.DispatcherOperation.InvokeImpl()
   à MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
   à System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   à System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   à System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   à MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
   à System.Windows.Threading.DispatcherOperation.Invoke()
   à System.Windows.Threading.Dispatcher.ProcessQueue()
   à System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   à MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   à MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   à System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   à System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   à System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   à MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   à MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   à System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   à System.Windows.Application.RunDispatcher(System.Object)
   à System.Windows.Application.RunInternal(System.Windows.Window)
   à OpCon_Web_Installer.App.Main()

Nom de l’application défaillante OpCon Web Installer.exe, version : 1.7.0.0, horodatage : 0xfb985a5a
Nom du module défaillant : KERNELBASE.dll, version : 10.0.19041.1503, horodatage : 0xb2acaea9
Code d’exception : 0xe0434352
Décalage d’erreur : 0x0000000000034f69
ID du processus défaillant : 0x14e8
Heure de début de l’application défaillante : 0x01d83849088f0caf
Chemin d’accès de l’application défaillante : \\RRRRRR\softdist\INFRA\SMA\OpCon\OWI\OpCon Web Installer.exe
Chemin d’accès du module défaillant: C:\Windows\System32\KERNELBASE.dll
ID de rapport : 5a6d5f96-334d-485e-8330-03541db41a55
Nom complet du package défaillant : 
ID de l’application relative au package défaillant : 

When I download the 1.7 version, the crash occurs immediately. When I update the 1.6 version, the update is ok, OWI opens in v1.7 but crashes when i click on Next

The old version 1.6 is ok but has not the "safe mode" despite of release notes for this version (?) Thanks for the support.

wpool-sma commented 2 years ago

@anankee26,

My first thought is to check the path in the "config.yml" file located in the same path as the "OpCon Web Installer.exe". There is an entry called "workingDirectory" and then a path will follow. Please make sure the path is valid. If not, please change it to a valid path that you have rights too and see if the problem continues.

If it does, then it may be a .NET compatibility issue. What operating system and .NET version are you running on the machine that is presenting this error? Does it happen on any other machines that you have?

Look forward to hearing your results and resolving this issue as quickly as we can.

anankee26 commented 2 years ago

Hello @wpool-sma,

I tested different points:

I created another folder and download a component in online mode, restart in offline = it's ok I go back to the first folder in offline = crash

There is a problem with the files in "opcon release" already present in local: I have folders of old versions, downloaded in the past by OWI (I think) and which do not appear any more in OWI in dowload (even with "show all packages" checked). When I move them away, OWI works, when I put them back, KO. These are the versions with the structure in the attached screenshot (20.3, 20.7 e.g.). I don't tested with agents, connectors, etc...

2022-03-18_19h27_12

anankee26 commented 2 years ago

I downloaded again everything from OWI 1.7, the latest versions of the components. When restarting OWI, some components are not available offline! And the opcon 21.3 folder makes OWI crash... (I move away this, OWI is OK...) Don't understand... 2022-03-18_20h11_53

Version .NET:

>=4.x        : 4.8 or later
v4\Client    : Installed
v4\Full      : Installed
v3.5         : Installed
v3.0         : Installed
v2.0.50727   : Installed
v1.1.4322    : Not installed (no key)
wpool-sma commented 2 years ago

@anankee26,

I tested all of the scenarios you described above on a couple of different machines and cannot reproduce what you are experiencing.

The reason some agents/connectors/etc. do not show up in Offline Mode is because they are download only and there is nothing else that OWI can do with those packages.

image image

If I understand your last post, you are running .NET Framework v4.8 or newer, is that correct? From your screen shots, I am assuming you are on Windows 10, is that also correct?

I will continue to troubleshoot the problem on my side and try a couple of older versions of Windows 10 to see if I can reproduce the issue.

Thank you for all of your research and assistance in attempting to figure out this issue. Until we can resolve it, are you ok with using OWI 1.7.0 without Offline Mode as that sounds like it works in your environment?

anankee26 commented 2 years ago

Hi,

The reason some agents/connectors/etc. do not show up in Offline Mode is because they are download only and there is nothing else that OWI can do with those packages. => ok, I guess they are .zip packages (e.g.) and so OWI can't trigger their installation.

For .NET, the exact versions for me:

PSChildName                      Version        Release
-----------                      -------        -------
v2.0.50727                       2.0.50727.4927        
v3.0                             3.0.30729.4926        
Windows Communication Foundation 3.0.4506.4926         
Windows Presentation Foundation  3.0.6920.4902         
v3.5                             3.5.30729.4926        
Client                           4.8.04084      528372 
Full                             4.8.04084      528372 
Client                           4.0.0.0     

under windows 10 enterprise 21H2 (build 19044.15226)

Most importantly, OWI 1.7 also crashes when I run it from opcon servers (4 differents servers in Win server 2016 datacenter) v1607 (build 14393.946) .NET Version for these servers:

PSChildName                      Version        Release
-----------                      -------        -------
v2.0.50727                       2.0.50727.4927        
v3.0                             3.0.30729.4926        
Windows Communication Foundation 3.0.4506.4926         
Windows Presentation Foundation  3.0.6920.4902         
v3.5                             3.5.30729.4926        
Client                           4.7.03062      461814 
Full                             4.7.03062      461814 
Client                           4.0.0.0       

It's hard to do without the offline mode because it's useful for the users: the network flow is not open from all the computers. My team is in charge of "updating" the OWI cache and the users come to look for this cache in offline mode. For the moment, we prefer to go back to the 1.6.