Uncaught-DOMException-Failed-to-read-the-'responseText'-property-from-'XMLHttpRequest' Error Message When Using a Component

Coveo for Salesforce 3.16 (August 2018)

Symptoms

When the CoveoQuickview component is used in a Lightning component with an API version over 40, you might encounter the following error message:

Uncaught DOMException: Failed to read the 'responseText' property from 'XMLHttpRequest': The value is only accessible if the object's 'responseType' is '' or 'text' (was 'document')

Cause

Salesforce Lightning Locker is activated on Lightning components with API versions over 40 and the default CoveoQuickview is not compliant with Lightning Locker. (see [Coveo for Salesforce Overview(/en/1104/)).

Resolution

You should replace the invalid CoveoQuickview component with the CoveoSalesforceQuickview component, which is compliant with Salesforce Lightning Locker.

  1. In Setup, search for and select Visualforce Component.
With Salesforce Lightning With Salesforce Classic
Under Platform Tools, select Custom Code > Visualforce Components. Under Build, select Develop > Visualforce Components.
  1. Next to your component, click Edit.
  2. Search for CoveoQuickview and replace it with CoveoSalesforceQuickview.