When deploying a package on your environment using K2 Package and Deployment, the workflow fails to deploy with the following error returned:

"The "SourceCode.DeploymentTasks.ExportProcessTask" task failed unexpectedly.
System.Exception: Authentication required for session 6AD37D0543ADE2C1BAD440FBEF696FF3
at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnection.RemoteCall(String TypeName, String MethodName, Object[] Parameters, Boolean[] NullList, MarshalMessageType CallType)
at SourceCode.Hosting.Client.ManagementAPI.GetServerFrameworkVersion()
at SourceCode.DeploymentTasks.ExportProcessTask.CheckServerFrameworkSupport(Version targetFramework)
at SourceCode.DeploymentTasks.ExportProcessTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()"


The same package can successfully be deployed to other environments, except for this one.

Troubleshooting Steps

To resolve the issue, please complete the steps below:

1. On the environment you are unable to deploy the workflow, open the K2 Workspace or Management site and navigate to the Environment Library.

2. Ensure that the values  are updated accordingly for all environment variables.