We recently updated a self-hosted from 3.13.10 (I believe) to 2020.5.0.
Currently, accessing Library->Step Templates the following error is displayed:
Error reading row 4, column 4. Unexpected token while deserializing object: PropertyName. Path ‘Packages[0].AcquisitionLocation’, line 1, position 1026… Compiled reader expression: (DbDataReader reader, DocumentReaderContext context) => { Type deserializeAsType = Octopus.Core.Model.Projects.ActionTemplate 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 Int32 temp2 = reader.GetInt32(2) context.Column = 3 String temp3 = IIF(reader.IsDBNull(3), null, reader.GetString(3)) context.Column = 4 ActionTemplate deserializedFromJson = context.DeserializeText(reader, 4, deserializeAsType) context.Column = 5 String temp5 = IIF(reader.IsDBNull(5), null, reader.GetString(5)) context.Column = 6 String temp6 = IIF(reader.IsDBNull(6), null, reader.GetString(6)) ActionTemplate result = deserializedFromJson if (result != null) { result.Id = temp0 result.Name = temp1 result.Version = temp2 result.ActionType = temp3 result.CommunityActionTemplateId = temp5 result.SpaceId = temp6 } result } Unexpected token while deserializing object: PropertyName. Path ‘Packages[0].AcquisitionLocation’, line 1, position 1026.
Similar errors are presented when trying to download a package from the internal package repository.
Using some sleuthing we have identified that Some, not All step templates have the issue buy doing incremental calls to https://deployit/api/Spaces-1/actiontemplates?take=1&skip=1 incrementing the skip to see which ones result in an error and which don’t. We’ve correlated that with the rows from the database in the ActionTemplate which have an ActionType = ‘Octopus.TentaclePackage’
The indicated JSON property of AcquisitionLocation is set to ‘Server’
We have another Octopus instance that was also updated to 2020.5.0, but from a much more recent version that does not have this. So far we can’t see the appreciable difference in the JSON in the ActionTemplate table that could be causing the issue.
Also as Mentioned, we have a same/similar issue when trying to download packages from the package repository:
Error reading row 1, column 4. Unexpected token while deserializing object: PropertyName. Path ‘Steps[11].Actions[0].Packages[0].AcquisitionLocation’, line 1, position 23403…\r\nCompiled reader expression:\r\n\r\n(DbDataReader reader, DocumentReaderContext context) => \r\n{\r\n Type deserializeAsType = Octopus.Core.Model.Projects.DeploymentProcess\r\n context.Column = 0\r\n String temp0 = IIF(reader.IsDBNull(0), null, reader.GetString(0))\r\n context.Column = 1\r\n String temp1 = IIF(reader.IsDBNull(1), null, reader.GetString(1))\r\n context.Column = 2\r\n Boolean temp2 = IIF(reader.IsDBNull(2), default(Boolean), Convert(reader.GetValue(2), Boolean))\r\n context.Column = 3\r\n Int32 temp3 = reader.GetInt32(3)\r\n context.Column = 4\r\n DeploymentProcess deserializedFromJson = context.DeserializeText(reader, 4, deserializeAsType)\r\n context.Column = 5\r\n ReferenceCollection temp5 = Convert(value(Octopus.Core.RelationalStorage.TypeHandlers.UntypedReferenceCollectionTypeHandler).ReadDatabase(reader, 5), ReferenceCollection)\r\n context.Column = 6\r\n String temp6 = IIF(reader.IsDBNull(6), null, reader.GetString(6))\r\n DeploymentProcess result = deserializedFromJson\r\n if (result != null)\r\n {\r\n result.Id = temp0\r\n result.OwnerId = temp1\r\n result.IsFrozen = temp2\r\n result.Version = temp3\r\n result.SpaceId = temp6\r\n }\r\n\r\n result\r\n}\r\n\r\nUnexpected token while deserializing object: PropertyName. Path ‘Steps[11].Actions[0].Packages[0].AcquisitionLocation’, line 1, position 23403.
Interestingly this only applies to packages that existed prior to the update. I manually uploaded a package and was able to download it again without issue. That was a wholey new package, not used in any steps or deployments so may not be a good indication of the core issue.
Any help would be appreciated.