Access-Control-Allow-Origin exception in Salesforce Chat

1. Check whether "Permitted Domains" have any URLs. If yes, then chat can be initiated only from those URLs.

2. If the issue is in your Test site connected to a Sandbox, check whether the Sandbox was recently refreshed. If yes, replace the code in the website with new code from Salesforce.

3. Do not use iFrames.