Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DISTRIBUTED CACHE IS NOT UPDATED - Could not create an instance of type Umbraco.Forms.Core.Interfaces.IWorkflow #712

Closed
PerplexDaniel opened this issue Jan 28, 2022 · 1 comment

Comments

@PerplexDaniel
Copy link

PerplexDaniel commented Jan 28, 2022

This is a new variant of #687 where the Distributed cache crashes again but this time with a different exception:

Could not create an instance of type Umbraco.Forms.Core.Interfaces.IWorkflow.
Type is an interface or abstract class and cannot be instantiated.
Path '[0].Workflow.id'

Full stack trace available in Specifics.

I see this in version 9.2.1 which fixed another Distributed Cache exception (#687).

Specifics

Full stack trace (except actual JSON data of our forms):

[09:19:26 ERR] DISTRIBUTED CACHE IS NOT UPDATED. Failed to execute instructions (147: '<JSON_BLOB>'). Instruction is being skipped/ignored
Newtonsoft.Json.JsonSerializationException: Could not create an instance of type Umbraco.Forms.Core.Interfaces.IWorkflow. Type is an interface or abstract class and cannot be instantiated. Path '[0].Workflow.id', line 1, position 19.
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
   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.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, 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.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
   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 Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Umbraco.Cms.Core.Cache.PayloadCacheRefresherBase`2.Refresh(String json)
   at Umbraco.Forms.Core.Cache.WorkflowCacheRefresher.Refresh(String jsonPayload)
   at Umbraco.Cms.Core.Services.Implement.CacheInstructionService.NotifyRefreshers(CacheRefresherCollection cacheRefreshers, IEnumerable`1 instructions, HashSet`1 processed, CancellationToken cancellationToken)
   at Umbraco.Cms.Core.Services.Implement.CacheInstructionService.ProcessDatabaseInstructions(CacheRefresherCollection cacheRefreshers, IReadOnlyCollection`1 instructionBatch, CacheInstruction instruction, HashSet`1 processed, CancellationToken cancellationToken, Int32& lastId)
[09:19:26 INF] The current batch of instructions was not processed, app is shutting down

Steps to reproduce

It seems to crash on deserializing workflows so presumably to reproduce it's simply this:

  1. Create a Form with a Workflow.
  2. Save your form.

Expected result

Distributed cache is updated without problems.

Actual result

Distributed cache throws an exception

@AndyButland
Copy link

Thanks - can replicate and we've found a fix for this, to be released in the next patch update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants