Null reference error when running the EPiServer Find Content Indexing Job scheduled job

Vote:
 

Hello

When I run the EPiServer Find Content Indexing Job scheduled job I get the following error for all content: 
2019-05-07 09:30:02,195 [10] ERROR EPiServer.Find.Cms.ContentIndexer: MACHINE-NAME: An exception occurred while indexing content [Link 52] [GUID a2f77167-b085-4f15-b11a-72157c28bf3a] [Type FrontPage] [Name Start]: Object reference not set to an instance of an object. 
System.NullReferenceException: Object reference not set to an instance of an object. 
at EPiServer.DataFactory.GetAncestors(ContentReference contentLink) 
at EPiServer.Find.Cms.ContentExtensions.Ancestors(IContent content) 
at EPiServer.Find.DelegateValueProvider`2.GetValue(Object target) 
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue) 
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) 
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType) 
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 content, IndexOptions options) 
at EPiServer.Find.Cms.ContentIndexer.IndexBatch(IEnumerable`1 content, Action`1 statusAction, Int32& numberOfContentErrors, Int32& indexingCount, Boolean deleteLanguageRoutingDuplicatesOnIndex)

#203771
May 07, 2019 9:58
Vote:
 

Hey Benjamin,

Can you try running this job "Remove Unrelated Content Assets" and after that try to reindex.

Let me know if it works.

#203908
May 10, 2019 12:45
Vote:
 

Have you checked the logs because its seems like some property is empty/null or pointing to page/block that is not exist anymore.

#204592
Jun 10, 2019 17:27
* 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.