Overview
This article explains how to troubleshoot the Query Failed error in the Riva Insight sidebar. This error usually occurs when Riva Insight cannot properly access or load the CRM connection required to perform the search. Common causes include an incorrect CRM connection file path, cached server-side configuration, invalid fields in the CRM connection Object Definition, or missing custom module configuration on the Insight server.
Issue
When searching in the Riva Insight sidebar, the following error is displayed:
Query Failed
This may also appear alongside related errors such as:
[ServerError] CrmConnectionBase is null Failed to retrieve information from the SDK CRM connection error. Unable to locate the CRM connection.
Cause
Potential causes include:
- The CRM connection file path in
webApp.configis incorrect, missing, or outdated. - The old connection file path remains in the server-side cache after a path change.
- An invalid or missing field is referenced in the CRM connection's Object Definition.
- A custom module is not correctly configured in the CRM connection or Insight server configuration.
Steps
1. Verify the CRM Connection File Path
- Open the
webApp.configfile located in the Insight folder (e.g.,C:\Riva\Riva Insight\Insight\). -
Locate the following key:
<add key="Sync.Compatibility.connectionFilePath" value="C:\Program Files (x86)\Riva\Configuration\example@domain.com__www.your-crm.com.connection"/> -
Copy the file path value and paste it into a browser window.
- If the file opens, the path is correct — proceed to Step 2.
-
If the file does not open, correct the path:
- In Windows Explorer, navigate to
\Riva\Configuration\. - Hold Shift, right-click the CRM connection file, and select Copy as path.
- Paste the correct path into the
Sync.Compatibility.connectionFilePathvalue and save the file.
2. Clear the Server-Side Cache
On the server:
- Stop IIS.
- Clear the contents of
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files. - Start IIS.
On each client machine:
- In Riva Insight, click the Logout icon.
- Clear the browser cache. If using Outlook as the client, open Internet Explorer to clear the cache.
- Close all browser windows or close Outlook completely.
- Reopen Outlook or the browser and log back into Riva Insight if required.
Note: If using Windows AD, you will be automatically logged back in — this is expected.
3. Check the CRM Connection Object Definition for Invalid Fields
If the path is correct and the cache has been cleared but the error persists, a field referenced in the CRM connection's Object Definition may be invalid or no longer available in the CRM.
- In the Riva CRM connection, open the Object Definition tab for the affected module (e.g., Contact, Organization).
- Review the fields on the right-hand side for any that are missing, invalid, or no longer present in the CRM.
- Remove and re-add any suspect fields.
- Save the CRM connection.
- Restart IIS.
4. Check Custom Module Configuration
If the error relates to a custom object or module, verify the following:
- Confirm that the custom module is correctly defined in the
TrackConfiguration.xmlfile. Example file location:C:\Riva\Riva Insight\Insight1\runtime\Insight\App_Data\Config\OnPremise\ -
Verify that the
custom.settingsfile exists and contains valid XML at:\Riva\Custom\Connection$folder\en\settings\ - If the Insight server is missing CRM connection custom configuration, copy the
\enfolder from the production sync server and overwrite the corresponding folder on the Insight server, then restart Insight services.
Still Experiencing Issues?
If the above steps do not resolve the error, contact Riva Support Team and provide the following:
- A screenshot of the error
- The Riva Insight WebAPI logs
- The client-side logs