Problem Cloning Project

System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Octopus.Server.Web.Api.Rules.ConfigurationWillBeCopiedFromCloneRule.AfterStore(Project model, ProjectResource resource, ISpecialRuleContext context) in Y:\work\refs\tags\3.3.3\source\Octopus.Server\Web\Api\Rules\ConfigurationWillBeCopiedFromCloneRule.cs:line 49
   at Octopus.Server.Web.Infrastructure.Api.Responder`1.ExecuteRules[TRule](Action`2 ruleCallback) in Y:\work\refs\tags\3.3.3\source\Octopus.Server\Web\Infrastructure\Api\Responder.cs:line 188
   at Octopus.Server.Web.Infrastructure.Api.CreateResponseDescriptor`2.Responder.Execute() in Y:\work\refs\tags\3.3.3\source\Octopus.Server\Web\Infrastructure\Api\CreateResponseDescriptor.cs:line 85
   at Octopus.Server.Web.Infrastructure.Api.Responder`1.Respond(TDescriptor options, NancyContext context) in Y:\work\refs\tags\3.3.3\source\Octopus.Server\Web\Infrastructure\Api\Responder.cs:line 162
   at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
   at CallSite.Target(Closure , CallSite , Object , Object , NancyContext )
   at Octopus.Server.Web.Api.OctopusRestApiModule.<>c__DisplayClass0_0.<.ctor>b__0(Object o) in Y:\work\refs\tags\3.3.3\source\Octopus.Server\Web\Api\OctopusRestApiModule.cs:line 46
   at CallSite.Target(Closure , CallSite , Func`2 , Object )
   at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)

Hi Nik,

Thanks for reaching out. We shipped a fix for that in 3.3.4 last night: https://github.com/OctopusDeploy/Issues/issues/2437

Tip for future bug/issue reports: Try to let us know which version of Octopus are you running and where are you seeing the error (Web portal, Octopus logs, Event viewer, etc). Even though stack traces are helpful, we usually need more context to reproduce the reported issues.

Best regards,
Dalmiro

I also have problems cloning a project; some projects can be cloned successfully, others will result in an immediate error upon clicking the “Clone” button.
Also, some projects that can be cloned without error - have internal problems – they use the parent project’s Lifecycle regardless, and no changes will override this behavior.

I noticed these problems within 3.3.2, so I upgraded to 3.3.9… of which did not provide any successful resolution.

Up until today, I have not experienced any problems with Octopus Deploy - now, at least two major bugs exist (multiple cloning issues and adding new script-steps, of which other’s have also recently complained about).

STR:
1.) Select a project to Clone
2.) Clone the project

RESULT
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary2.get_Item(TKey key) at Octopus.Server.Web.Api.Rules.ConfigurationWillBeCopiedFromCloneRule.AfterStore(Project model, ProjectResource resource, ISpecialRuleContext context) in Y:\work\refs\tags\3.3.9\source\Octopus.Server\Web\Api\Rules\ConfigurationWillBeCopiedFromCloneRule.cs:line 59 at Octopus.Server.Web.Infrastructure.Api.Responder1.ExecuteRules[TRule](Action2 ruleCallback) in Y:\work\refs\tags\3.3.9\source\Octopus.Server\Web\Infrastructure\Api\Responder.cs:line 188 at Octopus.Server.Web.Infrastructure.Api.CreateResponseDescriptor2.Responder.Execute() in Y:\work\refs\tags\3.3.9\source\Octopus.Server\Web\Infrastructure\Api\CreateResponseDescriptor.cs:line 85
at Octopus.Server.Web.Infrastructure.Api.Responder1.Respond(TDescriptor options, NancyContext context) in Y:\work\refs\tags\3.3.9\source\Octopus.Server\Web\Infrastructure\Api\Responder.cs:line 162 at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at CallSite.Target(Closure , CallSite , Object , Object , NancyContext ) at Octopus.Server.Web.Api.OctopusRestApiModule.<>c__DisplayClass0_0.<.ctor>b__0(Object o) in Y:\work\refs\tags\3.3.9\source\Octopus.Server\Web\Api\OctopusRestApiModule.cs:line 46 at CallSite.Target(Closure , CallSite , Func2 , Object )
at Nancy.Routing.Route.<>c__DisplayClass4.b__3(Object parameters, CancellationToken context)

Hi Sean,

We had a bug with cloned projects and channels that was fixed for 3.3.4. Unfortunately due to the bug you have some cloned projects that have bad references so they cannot be used to clone another project or they will show this error.

You should be able to clone from the originally created project just not from clones themselves that were made during that period of time.

Sorry for the troubles.
Dalmiro

Ok, I can understand that. But, I cannot create a new “Script Step” successfully within 3.3.9 (other bug)– so I cannot create new Projects to clone.

Hi Sean - I’ve replied about that issue on this other thread.

Once again deep apologies for these 2 bugs that have bitten you in such a short time. Hopefully once we ship the fix for #2473 in 3.3.10 your experience will go back to be as consistent as it was before.

Best regards,
Dalmiro

Can you provide a T-SQL script that locates the ‘corrupted’ projects… so we know not to ever attempt to clone these?

Thanks

Hi Sean,

I don’t have one at hand, but we are working on one that we’ll bundle in an Octopus update, which will get executed along with the MSI updater: https://github.com/OctopusDeploy/Issues/issues/2484

We’ll try to fit this fix on the earliest build possible.

Thanks,
Dalmiro