We recently upgraded Octopus Deploy from 3.1 to 3.4.14.
Previously we had an issue where releases would sometimes fail without a visible error. We would deploy the release, which featured the first step as a manual intervention. After proceeding past this, the deploy would fail but there would be no error in the Task Log.
After this, we upgraded to see if this would address the issue. Now, releases still seem to fail but we are seeing this error:
Newtonsoft.Json.JsonSerializationException: Error resolving type specified in JSON 'Octopus.Server.Orchestration.Deploy.DeploymentState, Octopus.Server'. Path 'StateObject.$type', line 1, position 444. ---> Newtonsoft.Json.JsonSerializationException: Could not find type 'Octopus.Server.Orchestration.Deploy.DeploymentState' in assembly 'Octopus.Server, Version=3.4.14.0, Culture=neutral, PublicKeyToken=null'.
at Newtonsoft.Json.Serialization.DefaultSerializationBinder.GetTypeFromTypeNameKey(TypeNameKey typeNameKey)
at Newtonsoft.Json.Utilities.ThreadSafeStore`2.AddValue(TKey key)
at Newtonsoft.Json.Serialization.DefaultSerializationBinder.BindToType(String assemblyName, String typeName)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, String qualifiedTypeName)
--- End of inner exception stack trace ---
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, String qualifiedTypeName)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadMetadataProperties(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue, Object& newValue, 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.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolvePropertyAndCreatorValues(JsonObjectContract contract, JsonProperty containerProperty, JsonReader reader, Type objectType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor`1 creator, 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.CreateValueInternal(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 Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Octopus.Core.RelationalStorage.RelationalTransaction.<Stream>d__33`1.MoveNext() in Z:\BuildAgent\work\cd33152532ae115f\source\Octopus.Core\RelationalStorage\RelationalTransaction.cs:line 403
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
at Octopus.Core.RelationalStorage.RelationalTransaction.LoadRequired[T](String id) in Z:\BuildAgent\work\cd33152532ae115f\source\Octopus.Core\RelationalStorage\RelationalTransaction.cs:line 91
at Octopus.Server.Web.Infrastructure.Api.LoadResponseDescriptor`2.Responder.TryLoadDocument(TModel& document, Response& errorResponse) in Z:\BuildAgent\work\cd33152532ae115f\source\Octopus.Server\Web\Infrastructure\Api\LoadResponseDescriptor.cs:line 60
at Octopus.Server.Web.Infrastructure.Api.LoadResponseDescriptor`2.Responder.Execute() in Z:\BuildAgent\work\cd33152532ae115f\source\Octopus.Server\Web\Infrastructure\Api\LoadResponseDescriptor.cs:line 35
at Octopus.Server.Web.Infrastructure.Api.Responder`1.Respond(TDescriptor options, NancyContext context) in Z:\BuildAgent\work\cd33152532ae115f\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 CallSite.Target(Closure , CallSite , Object , Object , NancyContext )
at Octopus.Server.Web.Api.OctopusRestApiModule.<>c__DisplayClass0_0.<.ctor>b__0(Object o) in Z:\BuildAgent\work\cd33152532ae115f\source\Octopus.Server\Web\Api\OctopusRestApiModule.cs:line 46
at CallSite.Target(Closure , CallSite , Func`2 , Object )
at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)
This error doesn’t always happen, but at the moment it is happening more often than not. I thought it was just happening on releases created via Team City rather than directly in Octopus, but after testing this isn’t the case.
I do know that if we remove the Manual Intervention step, this seems to get rid of the problem. If I try to add it back in, the problem returns. Is there an issue with this process step?