System.AggregateException: A child activity failed

Hi

Since I’ve updated Octopus (from a version that didn’t handle automatic update to the latest release), I’m facing the following error :

Stage 3: Installation
2012-01-10 10:41:02 INFO Step: 1. PyramidVille.Beta
2012-01-10 10:41:21 ERROR System.AggregateException: A child activity failed. —> System.AggregateException: One or more child activities failed —> System.NullReferenceException: Object reference not set to an instance of an object.
at Octopus.Server.Tasks.Deploy.DeployPackageToTentacleActivity.GatherVariables() in c:\BuildAgent\work\93ea602cb1d1c3f2\source\Octopus.Server\Tasks\Deploy\DeployPackageToTentacleActivity.cs:line 56
at Octopus.Server.Tasks.Deploy.DeployPackageToTentacleActivity.Execute() in c:\BuildAgent\work\93ea602cb1d1c3f2\source\Octopus.Server\Tasks\Deploy\DeployPackageToTentacleActivity.cs:line 32
at Octopus.Shared.Activities.ActivityRuntime.RunTaskOnBackgroundThread(Object arguments) in c:\BuildAgent\work\93ea602cb1d1c3f2\source\Octopus.Shared\Activities\ActivityRuntime.cs:line 115
— End of inner exception stack trace —
at Octopus.Shared.Activities.ActivityRuntime.Execute(IEnumerable1 activities) in c:\BuildAgent\work\93ea602cb1d1c3f2\source\Octopus.Shared\Activities\ActivityRuntime.cs:line 55 at Octopus.Server.Tasks.Deploy.DeployPackageActivity.Execute() in c:\BuildAgent\work\93ea602cb1d1c3f2\source\Octopus.Server\Tasks\Deploy\DeployPackageActivity.cs:line 55 at Octopus.Shared.Activities.ActivityRuntime.RunTaskOnBackgroundThread(Object arguments) in c:\BuildAgent\work\93ea602cb1d1c3f2\source\Octopus.Shared\Activities\ActivityRuntime.cs:line 117 --- End of inner exception stack trace --- at Octopus.Shared.Activities.ActivityRuntime.Execute(IActivity activity) in c:\BuildAgent\work\93ea602cb1d1c3f2\source\Octopus.Shared\Activities\ActivityRuntime.cs:line 41 at Octopus.Server.Tasks.Deploy.InstallationActivity.Execute() in c:\BuildAgent\work\93ea602cb1d1c3f2\source\Octopus.Server\Tasks\Deploy\InstallationActivity.cs:line 43 at Octopus.Shared.Activities.ActivityRuntime.RunTaskOnBackgroundThread(Object arguments) in c:\BuildAgent\work\93ea602cb1d1c3f2\source\Octopus.Shared\Activities\ActivityRuntime.cs:line 117 ---> (Inner Exception #0) System.AggregateException: One or more child activities failed ---> System.NullReferenceException: Object reference not set to an instance of an object. at Octopus.Server.Tasks.Deploy.DeployPackageToTentacleActivity.GatherVariables() in c:\BuildAgent\work\93ea602cb1d1c3f2\source\Octopus.Server\Tasks\Deploy\DeployPackageToTentacleActivity.cs:line 56 at Octopus.Server.Tasks.Deploy.DeployPackageToTentacleActivity.Execute() in c:\BuildAgent\work\93ea602cb1d1c3f2\source\Octopus.Server\Tasks\Deploy\DeployPackageToTentacleActivity.cs:line 32 at Octopus.Shared.Activities.ActivityRuntime.RunTaskOnBackgroundThread(Object arguments) in c:\BuildAgent\work\93ea602cb1d1c3f2\source\Octopus.Shared\Activities\ActivityRuntime.cs:line 115 --- End of inner exception stack trace --- at Octopus.Shared.Activities.ActivityRuntime.Execute(IEnumerable1 activities) in c:\BuildAgent\work\93ea602cb1d1c3f2\source\Octopus.Shared\Activities\ActivityRuntime.cs:line 55
at Octopus.Server.Tasks.Deploy.DeployPackageActivity.Execute() in c:\BuildAgent\work\93ea602cb1d1c3f2\source\Octopus.Server\Tasks\Deploy\DeployPackageActivity.cs:line 55
at Octopus.Shared.Activities.ActivityRuntime.RunTaskOnBackgroundThread(Object arguments) in c:\BuildAgent\work\93ea602cb1d1c3f2\source\Octopus.Shared\Activities\ActivityRuntime.cs:line 117
—> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.
at Octopus.Server.Tasks.Deploy.DeployPackageToTentacleActivity.GatherVariables() in c:\BuildAgent\work\93ea602cb1d1c3f2\source\Octopus.Server\Tasks\Deploy\DeployPackageToTentacleActivity.cs:line 56
at Octopus.Server.Tasks.Deploy.DeployPackageToTentacleActivity.Execute() in c:\BuildAgent\work\93ea602cb1d1c3f2\source\Octopus.Server\Tasks\Deploy\DeployPackageToTentacleActivity.cs:line 32
at Octopus.Shared.Activities.ActivityRuntime.RunTaskOnBackgroundThread(Object arguments) in c:\BuildAgent\work\93ea602cb1d1c3f2\source\Octopus.Shared\Activities\ActivityRuntime.cs:line 115<—
<— [FAILED]

My package does only contain 1 Deploy.ps1 script and used to work with the previous version.
Actually the script is executed but still, since this exception is raised, my deployment appears as failed.

Hi,

I believe this problem was down to a data context going out of scope before that line was hit, and has been fixed in the latest version of Octopus. Please let me know if upgrading resolves the issue!

Paul