Gravatar for ethan.xu@agencyq.com

Question by ethanx, Jul 9, 2018 3:07 PM

Coveo NullReferenceException Error at CoveoIndexFetcher.GetDistinctIndexByCommunication()

Hi, I suddenly get the following error this morning, I tried to rebuild solution, restart IIS, revert code to the latest known working state, but still couldn't fix it. I checked with other devs, and they are experiencing the same thing locally as well. Do you recognize this error?

I am using the latest version of Coveo 4.1.342.10 on Sitecore 8.2 update 2, I couldn't use the Coveo diagnostic page because it throws the same error.

Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.<br>Stack Trace:
&lt;pre&gt;[NullReferenceException: Object reference not set to an instance of an object.] Coveo.SearchProvider.ContentSearch.CoveoIndexFetcher.GetDistinctIndexByCommunication(IEnumerable`1 p_SearchIndexes) +184 Coveo.SearchProvider.Applications.Admin.CoveoDiagnosticPage.IsIndexPermissionsEnabled() +27 Coveo.SearchProvider.Applications.Admin.CoveoDiagnosticPage.RefreshSecurityProviderSection() +75 Coveo.SearchProvider.Applications.Admin.CoveoDiagnosticPage.HandleRefreshButtonClick(Object p_Sender, EventArgs p_Event) +56 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +11758479 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +149 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5027

Gravatar for flguillemette@coveo.com

Comment by François Lachance-Guillemette, Jul 9, 2018 3:34 PM

I would suggest that you take a look at the logs, I suspect there are other errors occurring before this exception, for instance, when the index gets initialized.

2 Replies
Gravatar for ethan.xu@agencyq.com

Answer by ethanx, Jul 10, 2018 3:23 PM

Well, found the root cause, the Sitecore account Coveo use was locked for some reason. Although there is no error in the log before this exception, everything initialized correctly, no warning or error at all until the site tries to talk to Coveo and shows the above error.

Gravatar for francisclin@gmail.com

Answer by francisclin, Mar 22, 2019 3:44 AM

You may also try this

1. Unlock sitecore account that coveo uses
2. Restart Coveo services
3. Try to index any item using the sitecore control panel admin tool

Hope this helps

Ask a question