Package and Deployment: Deploy fails with 'Index was outside the bounds of the array'
KBS100084
PRODUCTIssue
During the deployment of a package while attempting to deploy a workflow, the following error is shown:
"System.Reflection.TargetInvocationException: C:ProgramDataTemp45238460f946415c8162209830722610DeploymentRequestManagement.msbuild(79,5) : error : Notification Service: Task Error: Index was outside the bounds of the array."
Symptoms
The package will fail to deploy with the above error and the following error will also be present in the Deployment Logs:
"C:ProgramDataTemp820f18ea83214e9093053b87118fb4eaDeploymentK2.CMN.WKF.EmailGeneration.msbuild(79,5) : error : Notification Service: Task Error: Index was outside the bounds of the array. C:ProgramDataTemp820f18ea83214e9093053b87118fb4eaDeploymentK2.CMN.WKF.EmailGeneration.msbuild(79,5) : error MSB4018: The 'SourceCode.DeploymentTasks.NotificationService.NotificationTask' task failed unexpectedly. System.IndexOutOfRangeException: Index was outside the bounds of the array. at SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder.ParseConnectionString(String connectionString) at SourceCode.DeploymentTasks.NotificationService.Common.Publish() at SourceCode.DeploymentTasks.NotificationService.NotificationTask.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() InnerException: C:ProgramDataTemp820f18ea83214e9093053b87118fb4eaDeploymentK2.CMN.WKF.EmailGeneration.msbuild(79,5) : error : Notification Service: Task Error: Index was outside the bounds of the array."
Troubleshooting Steps
Make sure that you are on the latest Cumulative Update, you can download the CU from the K2 Portal Site.
If the latest CU does not solve the issue, make sure that the SmartObject Server is set to default here:
Pre K2 Blackpearl 4.7:
Workspace > Management Console > [K2 Server] > Environment Library > [Default Environment] > Field Management
K2 Blackpearl 4.7 and K2 Five:
K2 Management > Environment Library > [Default Environment]
Search and Edit SmartObject Server