Problems when indexing after upgrade

Vote:
 

Hi,

I did some software upgrades for our customer the other day, everything seemed to work fine, but when I try to re-index stuff, no pages will be indexed, instead I got loads of errors ( in the logs ), this happens both when the "EPiServer Find Content Indexing Job" and when I for ex publish a page.

Nothing is changed in the code, except for new software versions.

Parts of packages.config ( now, after upgrade )

<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net471" />
<package id="EPiServer.CMS" version="11.13.1" targetFramework="net471" />
<package id="EPiServer.CMS.AspNet" version="11.13.1" targetFramework="net471" />
<package id="EPiServer.CMS.Core" version="11.13.1" targetFramework="net471" />
<package id="EPiServer.CMS.TinyMce" version="2.8.1" targetFramework="net471" />
<package id="EPiServer.CMS.UI" version="11.21.7" targetFramework="net471" />
<package id="EPiServer.CMS.UI.Core" version="11.21.7" targetFramework="net471" />
<package id="EPiServer.Find" version="13.2.4" targetFramework="net471" />
<package id="EPiServer.Find.Cms" version="13.2.4" targetFramework="net471" />
<package id="EPiServer.Find.Framework" version="13.2.4" targetFramework="net471" />
<package id="EPiServer.Forms" version="4.25.1" targetFramework="net471" />
<package id="EPiServer.Forms.Core" version="4.25.1" targetFramework="net471" />
<package id="EPiServer.Forms.UI" version="4.25.1" targetFramework="net471" />
<package id="EPiServer.Framework" version="11.13.1" targetFramework="net471" />
<package id="EPiServer.Framework.AspNet" version="11.13.1" targetFramework="net471" />
<package id="EPiServer.Logging.Log4Net" version="2.2.2" targetFramework="net471" />
<package id="EPiServer.ServiceLocation.StructureMap" version="2.0.2" targetFramework="net471" />




Parts of packages.config ( before upgrade )

<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net471" />
<package id="EPiServer.CMS" version="11.10.6" targetFramework="net471" />
<package id="EPiServer.CMS.AspNet" version="11.11.0" targetFramework="net471" />
<package id="EPiServer.CMS.Core" version="11.11.0" targetFramework="net471" />
<package id="EPiServer.CMS.TinyMce" version="2.7.1" targetFramework="net471" />
<package id="EPiServer.CMS.UI" version="11.13.2" targetFramework="net471" />
<package id="EPiServer.CMS.UI.Core" version="11.13.2" targetFramework="net471" />
<package id="EPiServer.Find" version="13.0.5" targetFramework="net471" />
<package id="EPiServer.Find.Cms" version="13.0.5" targetFramework="net471" />
<package id="EPiServer.Find.Framework" version="13.0.5" targetFramework="net471" />
<package id="EPiServer.Forms" version="4.22.0" targetFramework="net471" />
<package id="EPiServer.Forms.Core" version="4.22.0" targetFramework="net471" />
<package id="EPiServer.Forms.UI" version="4.22.0" targetFramework="net471" />
<package id="EPiServer.Framework" version="11.11.0" targetFramework="net471" />
<package id="EPiServer.Framework.AspNet" version="11.11.0" targetFramework="net471" />
<package id="EPiServer.Logging.Log4Net" version="2.2.2" targetFramework="net471" />
<package id="EPiServer.ServiceLocation.StructureMap" version="2.0.1" targetFramework="net471" />

Parts of the Errors from logs ( this is when I try to publish/Index even my simplest "ContainerPage", code for that one below ), I remove stuff that's just reapeated
2019-10-09 08:59:18,021 [100] ERROR EPiServer.Find.Cms.ContentEventIndexer: An exception occurred while indexing (IContent). Self referencing loop detected for property 'ManifestModule' with type 'System.Reflection.RuntimeModule'. Path 'Property[0].LinkMapper.Accessor.Method.Module.Assembly'. The loop was detected in VolvoFinansBank.Web.Models.Pages.ContainerPage. To correct this you can exclude one of the properties (or otherwise mapped fields) that are causing the loop by modifying the Client class' conventions. You may also modify the serializer to ignore self references. If you require the fields causing the loop to be serialized you may annotate the one of the classes in the loop with [JsonObject(IsReference = true)] or modify the JsonContract for one of the types to use IsReference = true which also can be done by modifying the Client class' conventions..
EPiServer.Find.SelfReferencingLoopException: Self referencing loop detected for property 'ManifestModule' with type 'System.Reflection.RuntimeModule'. Path 'Property[0].LinkMapper.Accessor.Method.Module.Assembly'. The loop was detected in VolvoFinansBank.Web.Models.Pages.ContainerPage. To correct this you can exclude one of the properties (or otherwise mapped fields) that are causing the loop by modifying the Client class' conventions. You may also modify the serializer to ignore self references. If you require the fields causing the loop to be serialized you may annotate the one of the classes in the loop with [JsonObject(IsReference = true)] or modify the JsonContract for one of the types to use IsReference = true which also can be done by modifying the Client class' conventions. ---> Newtonsoft.Json.JsonSerializationException: Self referencing loop detected for property 'ManifestModule' with type 'System.Reflection.RuntimeModule'. Path 'Property[0].LinkMapper.Accessor.Method.Module.Assembly'.
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CheckForCircularReference(JsonWriter writer, Object value, JsonProperty property, JsonContract contract, JsonContainerContract containerContract, JsonProperty containerProperty)

...

EPiServer.Find.SelfReferencingLoopException: Self referencing loop detected for property 'ManifestModule' with type 'System.Reflection.RuntimeModule'. Path 'Property[0].LinkMapper.Accessor.Method.Module.Assembly'. The loop was detected in VolvoFinansBank.Web.Models.Pages.ContainerPage. To correct this you can exclude one of the properties (or otherwise mapped fields) that are causing the loop by modifying the Client class' conventions. You may also modify the serializer to ignore self references. If you require the fields causing the loop to be serialized you may annotate the one of the classes in the loop with [JsonObject(IsReference = true)] or modify the JsonContract for one of the types to use IsReference = true which also can be done by modifying the Client class' conventions. ---> Newtonsoft.Json.JsonSerializationException: Self referencing loop detected for property 'ManifestModule' with type 'System.Reflection.RuntimeModule'. Path 'Property[0].LinkMapper.Accessor.Method.Module.Assembly'.

...

at EPiServer.Find.Api.BulkActionConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)
--- End of inner exception stack trace ---
at EPiServer.Find.Api.BulkActionConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at EPiServer.Find.Json.Serializer.SerializeToTextWriter(JsonSerializer serializer, Object value, TextWriter textWriter)
at EPiServer.Find.Json.Serializer.SerializeObjectsToJsonRequest(JsonSerializer serializer, IJsonRequest jsonRequest, IEnumerable values)
at EPiServer.Find.Api.BulkCommand.Execute(List`1& serializationFailures)
at EPiServer.Find.Api.BulkCommand.Execute()
at EPiServer.Find.Cms.ContentIndexer.IndexWithRetry(IContent[] contents, Int32 maxRetries, Boolean deleteLanguageRoutingDuplicatesOnIndex)
at EPiServer.Find.Cms.ContentIndexer.Index(IEnumerable`1 contents, IndexOptions options)
at EPiServer.Find.Cms.ContentEventIndexer.Index(IEnumerable`1 contentLinks)
at EPiServer.Find.Cms.ContentEventIndexer.Sync(IEnumerable`1 contentToIndex, HashSet`1 contentToIndexSet, Func`1 index)
at EPiServer.Find.Cms.ContentEventIndexer.IndexPageQueue(IEnumerable`1 contentToIndex)
at EPiServer.Find.Cms.ContentEventIndexer.IndexPageQueue()

Code for ContainerPage

public class ContainerPage : PageData, IContainerPage, Business.Descriptors.Icons.IUseContainerPageTreeIcon
{
public override void SetDefaultValues(ContentType contentType)
{
base.SetDefaultValues(contentType);
VisibleInMenu = false;
}
}

 

Also, in a InitModule, I tried to add handling for ReferenceLoopHandling ( did not need that before upgrade ), but that did not help either 

    [InitializableModule]
    [ModuleDependency(typeof(FrameworkInitialization))]
    public class WebApiInitialization : IInitializableModule
    {
        public void Initialize(InitializationEngine context)
        {
            // Enable Web API routing
            GlobalConfiguration.Configure(config =>
            {
...
                var settings = jsonFormatter.SerializerSettings;
                settings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore; // added this line, but it did not helt
...

 

Will be very happy if you have any ideas on how to solve this :)

#207942
Oct 09, 2019 9:11
Vote:
 

Hi,

I can't find the word "NestedConventions" in my source code, also it seems like the post you are referring to is about searching, not indexing, but thanx anyway :)

#207963
Oct 09, 2019 13:31
Vote:
 

I would try:

  • Add the attribute [JsonIgnore] to all properties on ContainerPage. 
  • Check if indexing work.
  • If indexing works, try removing the attributes one by one, until you can pinpoint what property causes the issues.

Example:

[JsonIgnore]
public string SuspectProperty { get; set; }


Joels comment in this thread might be interesting:
http://world.episerver.com/forum/developer-forum/EPiServer-Search/Thread-Container/2014/8/Indexing-issues/


#207964
Edited, Oct 09, 2019 13:41
Vote:
 

Hi,

The problem is that it's not even possible to index this class ( without custom properties ):

[ContentType(DisplayName = "RAVerySimplePage", GUID = "EB44C08C-F8BC-4586-A594-26DF166C5B8E")]
public class AVerySimplePage : PageData
{
}

Same errors

#207966
Oct 09, 2019 13:47
Vote:
 

Were you ever able to get this resolved? I'm getting the same error:

Self referencing loop detected for property 'ManifestModule' with type 'System.Reflection.RuntimeModule'

with Episerver 11.20.17 + Find 13.5.2. Downgrading Find to 13.0.5 gets rid of the error, but comes with a set of dependencies that won't work except for just trying out stuff locally...

#294779
Edited, Jan 16, 2023 17:28
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.