MPCatalog / scom-community-catalog-ui

GNU General Public License v3.0
6 stars 2 forks source link

Viewing settings view causes null reference exception #3

Open shadeon opened 6 years ago

shadeon commented 6 years ago

Issue

When clicking on the settings view under Management Packs (community) the error message below is shown:

image

This is then followed by a JIT exception (below). Clicking continue allows the SCOM console to continue functioning, clicking quit causes it to crash.

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Community.ManagementPackCatalog.UI.DataConnectors.ConfigurationPackConnector.GetPackUpdateMonitorSetting()
   at Community.ManagementPackCatalog.UI.CommunityCatalogSettings.CheckCurrentConfiguration()
   at Community.ManagementPackCatalog.UI.CommunityCatalogSettings..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at Microsoft.EnterpriseManagement.ConsoleFramework.Wpf.GenericWpfViewConstructor.CreateView(Object parent, Type viewType, IViewParameters viewParameters)
   at Microsoft.EnterpriseManagement.ConsoleFramework.ViewConstructor.BeginShow(ShowViewContext showViewContext, AsyncCallback callback, Object state)

Environment

SCOM 2012 R2 console version 7.1.10226.1360

P2P-Nathan commented 6 years ago

A new test build has been created that should resolve this issue.

In addition to the updated error handling settings for a proxy can be configured via 3 registry keys. A final key configures a direct URL to be used for connection to GitHub, without the use of the MPCatalog.net redirect.

The keys can be seen in my branch at: https://github.com/MPCatalog/scom-community-catalog-ui/blob/work/1.0.2.x-bug-fixes/Community.ManagementPackCatalog.UI/Models/GitHubRepository.cs#L114

Proxy configuration has a key for each of the following:

Repo URL configuration has a single key of:

The updated version of the pack can be found here: Community.ManagementPackCatalog.zip

Both registry configuration examples are available here: Registry Key Configurations.zip