0

I am getting below error after enabling Lightning locker service.

XMLHttpRequest cannot load https://c.la10.salesforceliveagent.com/content/g/js/38.0/deployment.js. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://-developer-edition.ap2.force.com' is therefore not allowed access.

Let me know, if any of you is able to resolve this issue.

Thanks in Advance.

Regards, Raj

0

I can't tell from the error if it's complaining about:

1) Trying to load scripts from an external source, in which case you'd need to store them as Static Resources in Salesforce and load them with the ltng:require tag.

or

2) Trying to access a "private" API, which might be solved by creating a CSP Trusted Site once Spring 17 goes live. More info on that at: https://releasenotes.docs.salesforce.com/en-us/spring17/release-notes/rn_lightning_csp_trusted_sites.htm

If it's not one of those two things, hopefully some others can chime in with suggestions.

1
  • Hi Flo, Thanks for your reply. I tried the first way. Stored the script in static resource and its working without locker enabled. But once i enable locker, It work for time being... means the live agent is on but if we click it nothing happens. Also, after some time it automatically goes offline. Event thought agent is still online. Can you suggest something here...? – Rajendra Singh Nagar Feb 10 '17 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.