Skip to main content
Version: 3.2.x

Troubleshooting

Overview

This guide helps you resolve common issues that may arise when working with the Optave Assistant for Salesforce.

Common Issues

Authentication Problems

Issue: Unable to authenticate or retrieve JWT token

Resolution:

  1. Verify that Named Credentials are correctly configured
  2. Check that External Credentials have the correct client ID and client secret
  3. Ensure the formula in the Authorization header is correctly formatted

WebSocket Connection Issues

Issue: WebSocket connection fails or disconnects frequently

Resolution:

  1. Verify the WebSocket URL in the Custom Metadata record
  2. Check the browser console for CORS-related errors
  3. Ensure the WebSocket URL is accessible from your Salesforce org
  4. Verify network connectivity and any proxy settings that might affect WebSocket connections

CORS and Whitelist Issues

Issue: Cross-Origin Resource Sharing (CORS) restrictions

Resolution:

  1. Navigate to Setup > CORS in your Salesforce org
  2. Add all necessary domains to the whitelist:
    • Optave API domain
    • WebSocket domain
    • Any other external resources used by the assistant
  3. Restart your browser after making changes

Dependency Update Issues

Issue: Problems after updating dependent libraries or packages

Resolution:

  1. Since Salesforce doesn't support npm packages directly, any updates to dependencies must be manually uploaded as minified files to Static Resources. For example, for a new version of the Optave JavaScript SDK, manually minify the SDK (or install the npm package in a test project and locate the file at node_modules/@optave/dist/optave.client.sdk.js) and then upload it.
  2. Ensure compatibility between all library versions
  3. Clear browser cache after updating static resources