If you see the error DataCloneError: Failed to execute 'postMessage' on 'MessagePort' in the browser console or on the Salesforce interface when making or receiving calls via Salesforce Voice, this article explains why it happens and how to fix it.

Why this happens

Salesforce Voice requires secure communication between Salesforce and the SCV Connector. This security is enforced by Lightning Web Security, a Salesforce setting that must be enabled. When it is disabled, the secure channel between the two systems cannot be established, which causes the error and prevents calls from working.

How to fix it

Steps:

  1. Make sure you are on the latest version of the Aircall Salesforce Voice package.
  2. In Salesforce, go to Setup.
  3. In the Quick Find box, search for Session Settings.
  4. Under Lightning Web Security, enable the setting Use Lightning Web Security for Lightning web components and Aura Components.

    image-sv1.webp
  5. Save your changes.
  6. Once saved, right-click anywhere on the page and select Inspect to open the browser developer tools.

    image-sv2.webp
  7. Click and hold the refresh icon in the browser toolbar, then select Empty cache and hard reload.
image-sv3.webp

Inbound and outbound calls should now work as expected.

Important: Both steps are required. Enabling Lightning Web Security alone is not sufficient — you must also perform the empty cache and hard reload to apply the changes correctly.