Unable to delete old project

I’m trying to get rid of a very old disabled project, but I’ve got this error, which I think is related to upgrades:

Error reading row 2, column 4. Unexpected token while deserializing object: PropertyName. Path 'Steps[0].Actions[0].Packages[0].AcquisitionLocation', line 1, position 869.. Compiled reader expression: (DbDataReader reader, DocumentReaderContext context) => { Type deserializeAsType = Octopus.Core.Model.Projects.DeploymentProcess context.Column = 0 String temp0 = IIF(reader.IsDBNull(0), null, reader.GetString(0)) context.Column = 1 String temp1 = IIF(reader.IsDBNull(1), null, reader.GetString(1)) context.Column = 2 Boolean temp2 = IIF(reader.IsDBNull(2), default(Boolean), Convert(reader.GetValue(2), Boolean)) context.Column = 3 Int32 temp3 = reader.GetInt32(3) context.Column = 4 DeploymentProcess deserializedFromJson = context.DeserializeText(reader, 4, deserializeAsType) context.Column = 5 ReferenceCollection temp5 = Convert(value(Octopus.Core.RelationalStorage.TypeHandlers.UntypedReferenceCollectionTypeHandler).ReadDatabase(reader, 5), ReferenceCollection) context.Column = 6 String temp6 = IIF(reader.IsDBNull(6), null, reader.GetString(6)) DeploymentProcess result = deserializedFromJson if (result != null) { result.Id = temp0 result.OwnerId = temp1 result.IsFrozen = temp2 result.Version = temp3 result.SpaceId = temp6 } result } Unexpected token while deserializing object: PropertyName. Path 'Steps[0].Actions[0].Packages[0].AcquisitionLocation', line 1, position 869.

Is there a simple workaround to delete it? Not critical, we can live with it.

Hi @scarabetta,

Thank you for contacting Octopus Support. I’m sorry you are running into this issue.

Since you are deleting the Project, you may try to delete the Releases in the event that’s what is blocking you. We have a handy script that can do this for you here.

Otherwise, if it is an issue with the current Deployment Process, you may be able to use a GET in the swaggerui, clear the Steps field, then do a PUT to effectively delete the Steps in the Project (assuming that is what is blocking based on the error).

To do this, you’ll need to navigate to http://YOUR_OCTOPUS_URL/swaggerui, then find the DeploymentProcess heading, then the GET for /projects/{projectId}/deploymentprocesses

You’ll also need the Project ID, which you can get by modifying the URL slightly. For example, http://YOUR_OCTOPUS_URL/app#/Spaces-XXX/projects/project-name/deployments would become http://YOUR_OCTOPUS_URL/api/Spaces-XXX/projects/project-name

Below is an example Project with no Steps:

Once you clear the Steps field (no Steps = "Steps": [],), you can try pasting the JSON for the Project as shown below.

I hope one of those two options works to allow you to delete the Project. If not, please let me know and we’ll continue to troubleshoot further.

Best Regards,

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.