Riva Insight: "Query Failed" Error

Grace Wannapongsai
Grace Wannapongsai
  • Updated

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:

  1. The CRM connection file path in webApp.config is incorrect, missing, or outdated.
  2. The old connection file path remains in the server-side cache after a path change.
  3. An invalid or missing field is referenced in the CRM connection's Object Definition.
  4. A custom module is not correctly configured in the CRM connection or Insight server configuration.

Steps

1. Verify the CRM Connection File Path

  1. Open the webApp.config file located in the Insight folder (e.g., C:\Riva\Riva Insight\Insight\).
  2. Locate the following key:
    <add key="Sync.Compatibility.connectionFilePath" value="C:\Program Files (x86)\Riva\Configuration\example@domain.com__www.your-crm.com.connection"/>
  3. 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:
      1. In Windows Explorer, navigate to \Riva\Configuration\.
      2. Hold Shift, right-click the CRM connection file, and select Copy as path.
      3. Paste the correct path into the Sync.Compatibility.connectionFilePath value and save the file.

2. Clear the Server-Side Cache

On the server:

  1. Stop IIS.
  2. Clear the contents of C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files.
  3. Start IIS.

On each client machine:

  1. In Riva Insight, click the Logout icon.
  2. Clear the browser cache. If using Outlook as the client, open Internet Explorer to clear the cache.
  3. Close all browser windows or close Outlook completely.
  4. 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.

  1. In the Riva CRM connection, open the Object Definition tab for the affected module (e.g., Contact, Organization).
  2. Review the fields on the right-hand side for any that are missing, invalid, or no longer present in the CRM.
  3. Remove and re-add any suspect fields.
  4. Save the CRM connection.
  5. 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.xml file. Example file location: C:\Riva\Riva Insight\Insight1\runtime\Insight\App_Data\Config\OnPremise\
  • Verify that the custom.settings file exists and contains valid XML at:
    \Riva\Custom\Connection$folder\en\settings\
  • If the Insight server is missing CRM connection custom configuration, copy the \en folder 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