Error upon opening Configuration->Settings page after upgrade

authentication

(Christian McCarty) #1

I’m currently preparing an Octopus upgrade for our company, making a leap from version 3.11.13 to 2018.4.2. To do so, we duplicated the VM which holds our current Octopus server and upgraded that, after removing all target machines and environments besides a test bed. Upgrading went smoothly and everything seems to be fine; the deployment to the test bed works great and I’m already liking the new UI.

However, when I go to the new (for us) Settings tab of the Configuration page, I get the following error:

The “full exception” is as follows:

Octopus v2018.4.2

An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = ConfigurationSectionListResponder (DelegateActivator), Services = [Octopus.Server.Web.Api.Actions.Configuration.ConfigurationSectionListResponder], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership = ExternallyOwned —> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = ConfigurationSectionListResponder (ReflectionActivator), Services = [Octopus.Server.Web.Api.Actions.Configuration.ConfigurationSectionListResponder], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership = OwnedByLifetimeScope —> An exception was thrown while invoking the constructor 'Void .ctor(System.Collections.Generic.IEnumerable1[Octopus.Node.Extensibility.Extensions.Infrastructure.Configuration.IHasConfigurationSettingsResource], Octopus.Server.Web.Routes.ApiRoutes)' on type 'ConfigurationSectionListResponder'. ---> Object reference not set to an instance of an object. (See inner exception for details.) (See inner exception for details.) (See inner exception for details.) Autofac.Core.DependencyResolutionException at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters)
at Autofac.Core.Resolving.InstanceLookup.Execute()
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable1 parameters) at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable1 parameters)
at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable1 parameters, Object& instance) at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable1 parameters)
at Octopus.Server.Web.Infrastructure.OctopusNancyModule.<>c__DisplayClass14_0.<get_Routes>b__1(Object x)
at Nancy.Routing.Route.<>c__DisplayClass4.b__3(Object parameters, CancellationToken context)

–Inner Exception–
An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = ConfigurationSectionListResponder (ReflectionActivator), Services = [Octopus.Server.Web.Api.Actions.Configuration.ConfigurationSectionListResponder], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership = OwnedByLifetimeScope —> An exception was thrown while invoking the constructor 'Void .ctor(System.Collections.Generic.IEnumerable1[Octopus.Node.Extensibility.Extensions.Infrastructure.Configuration.IHasConfigurationSettingsResource], Octopus.Server.Web.Routes.ApiRoutes)' on type 'ConfigurationSectionListResponder'. ---> Object reference not set to an instance of an object. (See inner exception for details.) (See inner exception for details.) Autofac.Core.DependencyResolutionException at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters)
at Autofac.Core.Resolving.InstanceLookup.Execute()
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable1 parameters) at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable1 parameters)
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)

–Inner Exception–
An exception was thrown while invoking the constructor 'Void .ctor(System.Collections.Generic.IEnumerable1[Octopus.Node.Extensibility.Extensions.Infrastructure.Configuration.IHasConfigurationSettingsResource], Octopus.Server.Web.Routes.ApiRoutes)' on type 'ConfigurationSectionListResponder'. ---> Object reference not set to an instance of an object. (See inner exception for details.) Autofac.Core.DependencyResolutionException at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable1 parameters)
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)

–Inner Exception–
Object reference not set to an instance of an object.
System.NullReferenceException
at Octopus.Server.Web.Api.Actions.Configuration.ConfigurationSectionMetadata…ctor(String id, String name, String description)
at Octopus.Server.Web.Api.Actions.Configuration.ConfigHelper.<>c.<.ctor>b__3_0(IHasConfigurationSettingsResource c)
at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1…ctor(IEnumerable1 source) at System.Linq.OrderedEnumerable1.GetEnumerator
at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Octopus.Server.Web.Api.Actions.Configuration.ConfigurationSectionListResponder..ctor(IEnumerable1 configurations, ApiRoutes apiRoutes)
at lambda_method(Closure , Object[] )
at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()

I’m assuming that this is either A: some issue with upgrading over such a large number of versions, or B: a problem with having the two versions of Octopus live and using the same license at the same time, but I’m not sure how to resolve this. It doesn’t seem to actually impact the functionality of deployments besides not letting us view settings in this window. Any insight into the matter would be much appreciated.


(Shannon Lewis) #3

Hi Christian,

Thanks for reaching out. I’ve done some testing and have confirmed this is a bug in one of the APIs used to load the page layout metadata for the settings. We’ve created an issue, which you can follow in GitHub. It was introduced in 2018.4.2, and as you’re seeing should have no impact on deployments or anything else in the system. The team are working on the fix right now and we should have the patch in 2018.4.3 within a couple of hours.

Sincere apologies for the inconvenience caused.

Regards
Shannon


(Christian McCarty) #4

Thanks so much! That’s a great turnaround. Looks great!