Newtonsoft.Json.JsonReaderException: Error reading string. Unexpected token: StartObject. Path 'Steps[0].Actions[0].Properties.SqlPassword', line 25, position 29

Hi,
I am getting error while deploying package to Octopus. Before two days it was working correctly. I have attached image file and log with this issue.

Newtonsoft.Json.JsonReaderException: Error reading string. Unexpected token: StartObject. Path ‘Steps[0].Actions[0].Properties.SqlPassword’, line 25, position 29.

[11:38:49][Octopus Deploy] at Newtonsoft.Json.JsonReader.ReadAsStringInternal()
[11:38:49][Octopus Deploy] at Newtonsoft.Json.JsonTextReader.ReadAsString()
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateDictionary(IDictionary dictionary, JsonReader reader, JsonDictionaryContract contract, JsonProperty containerProperty, String id)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
[11:38:49][Octopus Deploy] at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
[11:38:49][Octopus Deploy] at Octopus.Client.OctopusClient.DispatchRequest[TResponseResource](OctopusRequest request, Boolean readResponse)
[11:38:49][Octopus Deploy] at Octopus.Client.OctopusClient.Get[TResource](String path, Object pathParameters)
[11:38:49][Octopus Deploy] at Octopus.Client.OctopusRepository.BasicRepository`1.Get(String idOrHref)
[11:38:49][Octopus Deploy] at OctopusTools.Commands.CreateReleaseCommand.Execute()
[11:38:49][Octopus Deploy] at OctopusTools.Commands.ApiCommand.Execute(String[] commandLineArguments)
[11:38:49][Octopus Deploy] at OctopusTools.Program.Main(String[] args)
[11:38:49][Octopus Deploy] Exit code: -3
[11:38:49][Octopus Deploy] Octo.exe exit code: -3

Hi Shyam,

Thanks for getting in touch. I took a look at your log and screenshot and I’m guessing the issue is likely because you’re running octo.exe version 2.6.3.60 with Octopus version 3.3.2. Older versions of octo.exe aren’t always compatible with newer features of Octopus. I’d suggest trying the version of octo.exe that matches your server. You can download it at the following URL. https://octopus.com/downloads/3.3.2

Let me know how you go.

Rob

Thanks Rob for your reply.
But currently I’m using latest Octopus Version 3.3.2.

Hi Shyam,

Thanks for following-up. I want to clarify that you’re using the appropriate Octopus server and command line tool versions. Please see the attached screenshots. You can see I’m using Octopus Server version 3.3.2 and the matching command line tools version for that release which is 3.3.8. I noticed in your screenshot of that you were running Octopus Server version 3.3.2 but the command line tools (octo.exe) version was 2.6.3.60 which is quite old.

I’d like to eliminate any problems with using the older version of the command line tools (i.e. octo.exe). If the problem persists using the newer version of the command line tools, can you provide an updated screenshot so I can investigate further.

Thanks

Rob

Hi Shyam,

Sorry, I attached the images this time.

Thanks

Rob

Thank you Rob for Reply.
As per your reply I’m using latest Octopus Server but I’m using older version for Teamcity Octopus Deployment Extension to create release.
However I’m deploying using older octopus release extension version 2 in Teamcity to deploy in Latest Octopus Version 3.3.2. (attached snapshot)
The problem is that is successfully deploy to my one Octopus Instance and while deploy to other Octopus it gives this kind of error. The thing is that before two days it was successfully deploy to my second instances and after two day it gives this kind of error.

(May be I must need to Update Octopus Deploy extension in teamcity but why it was working before two days.)

Hi Shyam,

Thanks for following-up and providing more details. I didn’t realise you were using our TeamCity plugin (it wraps octo.exe) and this helps me better understand your environment. That said, I do think it’s a good idea to upgrade your Octopus team city plugin from http://octopus.com/downloads/3.3.2. Unfortunately, I can’t explain why it started failing when it was working previously. I would guess it would have been driven by a change to one of the projects, or environment that wasn’t supported in the older version. If the problem persists after upgrading the plugin, we can dig in deeper.

Let me know how you go.

Rob

Hi Rob,

Appreciate your reply. I have upgrade the Plugin and My issue has been resolved.

Thanks.

Hi Shyam,

It’s great to hear that fixed your issue. I suspected something minor changed that caused it to failed with the old plugin.

Happy deploying! :slight_smile:

Rob