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.
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:
<pre>[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
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.
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