2019.3.3 LTS - The given key was not present in the dictionary

(Jeff Waskiewicz) #1

Hi,

We are getting the error, The given key was not present in the dictionary, on one of our projects. I found the following article…

…which indicated the problem was resolved in the latest release. I upgraded our server from 2018.9.6 but the issue persisted.

I ran the SQL script from the above ticket with the following results.

(122 rows affected)

(0 rows affected)
Found 0 projects with invalid versioning-strategy packages

(0 rows affected)
Found 0 projects with invalid release-creation-strategy packages

(1 row affected)
Found 1 channel rules with invalid packages
Updating project versioning-strategies

(0 rows affected)
Updating project release-creation-strategies

(0 rows affected)
Updating channel rules

This did not resolve our issue either. The full exception is

Octopus v2019.3.3

The given key was not present in the dictionary.

System.Collections.Generic.KeyNotFoundException

   at System.ThrowHelper.ThrowKeyNotFoundException()

   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)

   at Octopus.Server.Web.Mapping.DeploymentActionPackageNameMapper.MapToNames(String projectId, IEnumerable`1 models)

   at Octopus.Server.Web.Mapping.ResourceMappings.<>c__DisplayClass10_4.<CreateBaseMappings>b__114(ChannelVersionRule rule)

   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()

   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)

   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)

   at Octopus.Server.Web.Mapping.ResourceMappings.<>c.<CreateBaseMappings>b__10_51(Channel channel, ChannelResource resource, IResourceMappingContext ctx, AllRoutes routes)

   at Octopus.Server.Web.Mapping.ActionResourceEnricher`2.EnrichResource(TModel model, TResource resource)

   at Octopus.Server.Extensibility.HostServices.Infrastructure.EnumerableExtensions.ForEach[T](IEnumerable`1 these, Action`1 action)

   at Octopus.Server.Web.Mapping.ResourceMapper.ModelToResource(Object model, Object resource, Boolean detailed, IResourceMapping resourceMapping)

   at Octopus.Server.Web.Mapping.ResourceMapper.<>c__DisplayClass4_0.<ConvertTo>b__0(IResourceMapping mapping)

   at Octopus.Server.Web.Mapping.ResourceMapper.ConvertTo(Object model, Type resourceType, ResourceMapperMode mode)

   at Octopus.Server.Web.Mapping.ResourceMapper.ConvertTo[TResource](Object model, ResourceMapperMode mode)

   at Octopus.Server.Web.Infrastructure.Api.ListAllResponseDescriptor`2.Responder.Execute()

   at Octopus.Server.Web.Infrastructure.Api.Responder`1.ExecuteRegistered()

   at Octopus.Server.Web.Infrastructure.Api.Responder`1.Respond(TDescriptor options, NancyContext context)

   at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)

   at Octopus.Server.Web.Infrastructure.OctopusNancyModule.<>c__DisplayClass14_0.<get_Routes>b__1(Object x)

   at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)

OctopusDeploy-636933906304272707.7z (86.3 KB)

(Jeff Waskiewicz) #2

Hi,

This issue is blocking our ability to release.

Thanks.

(Michael Richardson) #4

Hi Jeff,

I’ve replied via email.