"YourLinqIsTooStrongException" error can be thrown in Experience Profile when trying to filter contacts by channel


Description

The exception below might appear in the logs when trying to filter contacts in the Experience Profile application with the selected Channel checkbox and leaving the From Date and To Date fields empty.

ERROR [Sitecore Services]: HTTP POST
URL http://sc920.sc/sitecore/api/ao/v1/contacts/search?pageSize=20&pageNumber=1&sort=visitCount desc&Match=*&FromDate=null&ToDate=null

Exception System.AggregateException: One or more errors occurred. ---> Sitecore.XConnect.Search.YourLinqIsTooStrongException: Unsupported query: (VisitMethodCall): PartialEvalException (InvalidOperationException ("Nullable object must have a value."), Convert(null)).ToUniversalTime()

Solution

To resolve the issue, proceed as follows:

  1. Open the \sitecore\shell\client\Applications\ExperienceProfile\Search\Search.js file.
  2. Uncomment the following line:
    var searchText = decodeURIComponent(cintelUtil.getQueryParam(textProperty));
    self.SearchTextBox.set(textProperty, searchText);
    self.setDefaultDate();
    self.toggleFiltersVisibility();
    self.findContacts();