Skip to content
September 5, 2019 / kiranpatils

NullReferenceException when trying to load Coveo indexes in Indexing Manager

Challenge:

After successful configuration of Coveo instance, We thought to add Coveo transform files in our deployment process and do deployment.

As soon as we did deployment we started noticing following Stacktrace:

120 13:19:48 ERROR [Sitecore Services]: HTTP GET URL https://scbasics/coveo/api/index/v1/indexes   Exception System.NullReferenceException: Object reference not set to an instance of an object.  at Coveo.SearchProvider.AbstractSearchIndexSummary.<get_NumberOfDocuments>b__42_1()  at Coveo.SearchProvider.AbstractSearchIndexSummary.TryPerformCallToIndexCommunication[T](Func`1 p_CallToIndexCommunication, T p_DefaultValue) .................................................................System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()  at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)  at System.Linq.Enumerable.ToList[TSource]System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown ---

If you are already facing this error and trying to find a solution. Then this post might help you.

Solution:

  • We also checked Coveo Diagnostics page, and it was showing all green.
  • Command center was not showing list of indexes
  • Sitecore log file was showing above stack trace for each Command center screen load
  • As you do, we also did quick google search and came across this post from my colleague – Dan S.

https://connect.coveo.com/s/question/0D50d00006UQwvjCAD/nullreferenceexception-when-trying-to-load-indexes-in-indexing-manager

We checked all our config files. But we haven’t found anything suspicious.

After spending lot of time, we could figure this out. After looking at log file from start — We found following entry:

As soon as we seen this, We thought to check Coveo admin user (We recommend different user for Coveo) was locked out somehow.

This might have been locked out due to deployment errors/transformation errors. But stacktrace what we seen in staring of this post didn’t help us pin point that.

So, It is good to check full log file. As there are few main errors will happen during Initialization only.

Special thanks to Varun to work along with me to troubleshoot this.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: