Coveo Component Displays Something Went Wrong Message With the Coveo for Salesforce Free Edition

Free edition only

Symptoms

In your component, instead of results, you get the following error message:

Something went wrong.
If the problem persists contact the administrator.

This may happen for the administrator account, or for a guest or user account.

Cause

When you get this error with an administrator account, there are two main causes:

  • The user that linked Coveo for Salesforce to your Coveo Cloud organization was deleted, leading Coveo for Salesforce to be unable to query your Salesforce index.
  • You have entered an invalid query in your component.

When you get this error with a user or guest account, but not with an administrator account, there are a few possible causes:

  • Your user profile is not allowed in the Coveo for Salesforce Connected App.
  • You have not pre-authorized all admin approved users.
  • Your user profile does not have API Enabled. Since the Coveo for Salesforce Free edition queries the Salesforce index by using the Salesforce API, if a profile does not have API Enabled, Coveo for Salesforce cannot impersonate that user.
  • Your user has the same username as another user in any Salesforce organization. Due a bug in Salesforce, if a user has the same username as another user, even if they are from different communities, the JWT flow will fail and no result will be able to be returned in your Coveo components (see Error While Performing JWT Flow for the Requested User When Using Customer Community or Portal User With the Coveo for Salesforce Free Edition).

Resolution

Depending on your cause, you need to follow these points:

  • When the issue is for the administrator account:

    • Relink Coveo for Salesforce to your Coveo Cloud organization. Ensure this user has access to all the objects and fields you want to return as results, is a member of your Coveo Cloud organization (see Adding and Managing Members), and is never going to be deleted from your Salesforce organization.

      Coveo recommends creating a dedicated Salesforce user that answers to those requirements (see Going to Production with Coveo for Salesforce).

    • Review the query that your component sends. Ensure that it follows the Coveo Cloud query syntax (see Coveo Cloud Query Syntax Reference). This query can be sent in your selected tab, search interface, or as part of custom code you have written.

      You can view the final query your component sends in the Network tab of your browser Developer Console. For each performed query, two v2/ events are sent. The second one contains the sent query.

  • When the issue is for the user or guest account:

    • Ensure you have followed every step to allow user impersonation (see Allowing User Impersonation).
    • Ensure your profile has API Enabled (see User Permissions).
    • Ensure your user’s username is exactly unique.
    • When allowing anonymous access to your Coveo component, ensure you have created a guest user (see Creating a Guest User Profile for Your Community). Also ensure that this user is part of a profile that is allowed to access your component, and respects all of the above criteria.