The package step provided could not be found in the project's deployment process

I dont have any package that needs to be included during deployment.
So when I am trying to update lifecycle or change settings its giving me “The package step provided could not be found in the project’s deployment process.”

Does Octopus allow the deployment without adding any package?

Hi,

Thanks for getting in touch! This looks very similar to an issue that came through a little while ago. Generally this happens when the project’s JSON document has a reference for a step that no longer exists.
The following is a link to an old discussion that covers this including a fix. However, I’ll paste the relevant information here also.
http://help.octopusdeploy.com/discussions/problems/48848-the-package-step-provided-could-not-be-found-in-the-projects-deployment-process#comment_41606863

The way to spot this is by browsing [octopus url]/api/project/[project id] and looking for:

  "AutoCreateRelease": true,
  "ReleaseCreationStrategy": {
    "ReleaseCreationPackageStepId": "9f33d94e-16f3-4069-8f2b-657f0012bbc5",
    "ChannelId": "Channels-222"
  },

If AutoCreateRelease is set to True and ReleaseCreationPackageStepId has a GUID value, this means the the project is still tied to the step that no longer exists.

Using the below API script you can set AutoCreateRelease to False and ReleaseCreatingPackageStepId to "" so the project no longer depends on the deleted step.

While I’m not sure what version of Octopus you are on, this seems to be a rather rare occurrence and I have not seen it in any recent versions. If this does not fix your issue, would you be able to attach a screenshot of where this happens and let me know what version of Octopus you are currently running?

Let me know how you go. :slight_smile:

Best regards,
Daniel

I’ve just hit this exact issue, I gave the script you linked a shot but got a 500 error each time:

System.Net.SyncMemoryStream
{
  "ErrorMessage": "Error converting value \"@{Octopus.ControlType=SingleLineText}\" to type 'System.Collections.Generic.IDictionary`2[System.String,System.String]'. Path 'Templates[0].DisplaySettings', line 25, position 85.",  "FullException": "Newtonsoft.Json.JsonSerializationException: Error converting value \"@{Octopus.ControlType=SingleLineText}\" to type 'System.Collections.Generic.IDictionary`2[System.String,System.String]'. Path 'Templates[0].DisplaySettings', line 25, position 85. ---> System.ArgumentException: Could not cast or convert from System.String to System.Collections.Generic.IDictionary`2[System.String,System.String].
     at Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable(Object value, Type initialType, Type targetType)
     at Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast(Object initialValue, CultureInfo culture, Type targetType)
     at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
     --- End of inner exception stack trace ---
     at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
     at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
     at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
     at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
     at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
     at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
     at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
     at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
     at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
     at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
     at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
     at Octopus.Server.Web.Infrastructure.Api.Responder`1.Bind[TModel]() in Y:\\Work\\refs\\tags\\3.4.13\\source\\Octopus.Server\\Web\\Infrastructure\\Api\\Responder.cs:line 72
     at Octopus.Server.Web.Infrastructure.Api.Responder`1.BindAndValidate[TModel]() in Y:\\Work\\refs\\tags\\3.4.13\\source\\Octopus.Server\\Web\\Infrastructure\\Api\\Responder.cs:line 77
     at Octopus.Server.Web.Infrastructure.Api.ModifyResponseDescriptor`2.Responder.Execute() in Y:\\Work\\refs\\tags\\3.4.13\\source\\Octopus.Server\\Web\\Infrastructure\\Api\\ModifyResponseDescriptor.cs:line 42
     at Octopus.Server.Web.Infrastructure.Api.Responder`1.Respond(TDescriptor options, NancyContext context) in Y:\\Work\\refs\\tags\\3.4.13\\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 Octopus.Server.Web.Api.OctopusRestApiModule.<>c__DisplayClass0_0.<.ctor>b__0(Object o) in Y:\\Work\\refs\\tags\\3.4.13\\source\\Octopus.Server\\Web\\Api\\OctopusRestApiModule.cs:line 46
     at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)"
 }

I ended up taking the steps you were completing in the script and doing them by hand in the Project table (really, really not recommended). After I finished the modification the project became usable again straight way with no ill effects.

I’m on Octopus 3.4.13 and I believe it happened because I was generating the version number from a project step and then removed that step, but that’s a guess. No other projects in our environment had this issue.

Hi Jon,

Thanks for passing through this information. I’m sorry that the script didn’t work, though I am glad to hear that you got this working now. If you have any issues here still, please let me know.

Best regards,
Daniel