Error Deploying from TeamCity to Octopus after upgrade to 3.3

The Error log is below (lightly sanitized)

Build ‘CRIMS :: CRADIL :: Deploy to Development’ #1.0.1227
Started ‘Mon Mar 14 11:55:28 PDT 2016’ on
Finished ‘Mon Mar 14 11:55:29 PDT 2016’ with status 'FAILURE Unable to create or deploy release. Please check the build log for details on the error.'
TeamCity URL
TeamCity server version is 9.1.6 (build 37459)

[11:55:22]i: TeamCity server version is 9.1.6 (build 37459)
[11:55:22]E: bt51 (7s)
[11:55:22] : Collecting changes in 1 VCS root (1s)
[11:55:22] : [Collecting changes in 1 VCS root] VCS Root details
[11:55:22] : [VCS Root details] “Project Name” {instance id=121, parent internal id=37, parent id=Project Name, description: "mercurial: "}
[11:55:22]i: [Collecting changes in 1 VCS root] Loading current repository state for VCS root ‘Project Name’ (1s)
[11:55:22]i: [Loading current repository state for VCS root ‘Project Name’] VCS root ‘Project Name’: [C:\ProgramData\JetBrains\TeamCity\system\caches\mercurial\hg_5590102118684001745] hg version
[11:55:22]i: [Loading current repository state for VCS root ‘Project Name’] VCS root ‘Project Name’: [C:\ProgramData\JetBrains\TeamCity\system\caches\mercurial\hg_5590102118684001745] hg pull
[11:55:23]i: [Loading current repository state for VCS root ‘Project Name’] VCS root ‘Project Name’: [C:\ProgramData\JetBrains\TeamCity\system\caches\mercurial\hg_5590102118684001745] hg pull
[11:55:23]i: [Loading current repository state for VCS root ‘Project Name’] VCS root ‘Project Name’: [C:\ProgramData\JetBrains\TeamCity\system\caches\mercurial\hg_5590102118684001745] hg tags
[11:55:23]i: [Loading current repository state for VCS root ‘Project Name’] VCS root ‘Project Name’: [C:\ProgramData\JetBrains\TeamCity\system\caches\mercurial\hg_5590102118684001745] hg version
[11:55:23]i: [Loading current repository state for VCS root ‘Project Name’] VCS root ‘Project Name’: [C:\ProgramData\JetBrains\TeamCity\system\caches\mercurial\hg_5590102118684001745] hg bookmarks
[11:55:23]i: [Loading current repository state for VCS root ‘Project Name’] VCS root ‘Project Name’: [C:\ProgramData\JetBrains\TeamCity\system\caches\mercurial\hg_5590102118684001745] hg branches
[11:55:23]i: [Collecting changes in 1 VCS root] Waiting for completion of current operations for the VCS root ‘Project Name’
[11:55:23]i: [Collecting changes in 1 VCS root] Detecting changes in VCS root ‘Project Name’ (used in ‘Build & Package’, ‘Deploy to Development’)
[11:55:23]i: [Collecting changes in 1 VCS root] Will collect changes for ‘Project Name’ starting from revision 912909222a36
[11:55:28] : Skip checking for changes - changes are already collected
[11:55:28]i: Waiting for the agent to start the build
[11:55:28]i: Agent time zone: America/Los_Angeles
[11:55:28]i: Agent is running under JRE: 1.8.0_66-b17
[11:55:28] : Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp
[11:55:28] : Publishing internal artifacts
[11:55:28] : [Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[11:55:28] : [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[11:55:28] : Checkout directory: C:\TeamCity\buildAgent\work\332edfd920d4f054
[11:55:28] : Updating sources: server side checkout
[11:55:28] : [Updating sources] Using vcs information from agent file: 332edfd920d4f054.xml
[11:55:28] : [Updating sources] Building incremental patch for VCS root: Project Name; checkout rules: =>; revision: 912909222a36 --> 912909222a36
[11:55:28] : [Updating sources] Repository sources transferred
[11:55:29]i: ##teamcity[buildStatisticValue key=‘buildStageDuration:sourcesUpdate’ value=‘208.0’]
[11:55:29] : Build preparation done
[11:55:29]E: Step 1/1: Deploy To Development (OctopusDeploy: Create release)
[11:55:29]i: [Step 1/1] ##teamcity[buildStatisticValue key=‘buildStageDuration:firstStepPreparation’ value=‘116.0’]
[11:55:29]i: [Step 1/1] ##teamcity[buildStatisticValue key=‘buildStageDuration:buildStepRUNNER_54’ value=‘0.0’]
[11:55:29] : [Step 1/1] Octopus Deploy
[11:55:29] : [Octopus Deploy] Running command: octo.exe create-release --server http://teamcity:8080 --apikey --project --enableservicemessages --version 1.0.1227 --packageversion=1.0.1227
[11:55:29] : [Octopus Deploy] Creating Octopus Deploy release
[11:55:29] : [Octopus Deploy] Octopus Deploy Command Line Tool, version 2.6.3.60
[11:55:29] : [Octopus Deploy]
[11:55:29] : [Octopus Deploy] Handshaking with Octopus server: http://teamcity:8080
[11:55:29] : [Octopus Deploy] Handshake successful. Octopus version: 3.3.2; API version: 3.0.0
[11:55:29] : [Octopus Deploy] Finding project:
[11:55:29] : [Octopus Deploy] Finding deployment process for project:
[11:55:29] : [Octopus Deploy] Newtonsoft.Json.JsonReaderException: Error reading string. Unexpected token: StartObject. Path ‘Steps[16].Actions[0].Properties.Octopus.Action.WindowsService.CustomAccountPassword’, line 514, position 69.
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.JsonReader.ReadAsStringInternal()
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.JsonTextReader.ReadAsString()
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateDictionary(IDictionary dictionary, JsonReader reader, JsonDictionaryContract contract, JsonProperty containerProperty, String id)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
[11:55:29] : [Octopus Deploy] at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
[11:55:29] : [Octopus Deploy] at Octopus.Client.OctopusClient.DispatchRequest[TResponseResource](OctopusRequest request, Boolean readResponse)
[11:55:29] : [Octopus Deploy] at Octopus.Client.OctopusClient.Get[TResource](String path, Object pathParameters)
[11:55:29] : [Octopus Deploy] at Octopus.Client.OctopusRepository.BasicRepository`1.Get(String idOrHref)
[11:55:29] : [Octopus Deploy] at OctopusTools.Commands.CreateReleaseCommand.Execute()
[11:55:29] : [Octopus Deploy] at OctopusTools.Commands.ApiCommand.Execute(String[] commandLineArguments)
[11:55:29] : [Octopus Deploy] at OctopusTools.Program.Main(String[] args)
[11:55:29] : [Octopus Deploy] Exit code: -3
[11:55:29] : [Octopus Deploy] Octo.exe exit code: -3
[11:55:29] : [Step 1/1] Unable to create or deploy release. Please check the build log for details on the error.
[11:55:29]i: [Step 1/1] ##teamcity[buildStatisticValue key=‘buildStageDuration:buildStepRUNNER_54’ value=‘681.0’]
[11:55:29]E: [Step 1/1] Step Deploy To Development (OctopusDeploy: Create release) failed
[11:55:29]i: ##teamcity[buildStatisticValue key=‘buildStageDuration:buildFinishing’ value=‘10.0’]
[11:55:29] : Publishing internal artifacts
[11:55:29] : [Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[11:55:29] : [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[11:55:29]i: ##teamcity[buildStatisticValue key=‘buildStageDuration:artifactsPublishing’ value=‘54.0’]
[11:55:29] : Build finished

I’ve figured out the issue. I hadn’t changed the Octopus Version on the Create Release step from 2 to 3. Might be an opportunity to make a friendlier error message?

I’ve run into the same issue and was hoping to follow your resolution steps.

Were you talking about changing the ‘Create Release’ step from within TeamCity?

Hi @Swilliamson,

You’ll need to update the version on all the TeamCity Octopus steps. “Create Release” would be one of them, yes.

Thanks,
Dalmiro

I’ve tried updating all of the steps and the kicker is that there are other projects in TeamCity that have successfully deployed using Octopus.

I’m still getting the same error of

[09:03:28][Octopus Deploy] Newtonsoft.Json.JsonReaderException: Error reading string. Unexpected token: StartObject. Path 'Steps[0].Actions[0].Properties.Octopus.Action.WindowsService.CustomAccountPassword', line 22, position 69.

@Swilliamson - Did you update your TC plugin to the latest version after you upgraded Octopus to 3.3?

In that Octopus version we introduced a breaking change on the API that required you to upgrade the TC plugin. Grabbing the latest from here should do: https://octopus.com/downloads

We had migrated everything from an older version of octopus and updated things. the issue was resolved by re-configuring the project in octopus. this was done by going into octopus and resetting up the Deployment process for the project.

something didn’t sync right during the migration of the project from the older version of octopus.

Already resolved this problem.

I hadn’t changed yet the Octopus Version on TeamCity step “Create Release”.


Hello,

I just upgraded Octopus Deploy Server, Tentacles and TeamCity plugin, and I’m getting this error too on TeamCity.

Newtonsoft.Json.JsonReaderException: Error reading string. Unexpected token: StartObject. Path ‘Steps[0].Actions[0].Properties.Octopus.Action.WindowsService.CustomAccountPassword’, line 27, position 69.

The deployment is done in Octopus Deploy successfully. The error is just in TeamCity.

Thanks