0

I am getting following error in console on load of a VF page that embeds lightning component.

Error:

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://MYRDomain-dev-dev-ed--c.na30.visual.force.com') does not match the recipient window's origin 'https://MYRDomain-dev-dev-ed.my.salesforce.com').

VF Page:

<apex:page >
<script src="https://MYRDomain-dev-dev-ed.my.salesforce.com/lightning/lightning.out.js" />
<apex:includeLightning />

    <div id="lightning" />

<script>
$Lightning.use("c:UserPageApplication", function() {
    $Lightning.createComponent("c:UserPageComponent",
                               {},
                               "lightning",
                               function(cmp) {
                                   //do something
                               });
});
</script>

1 Answer 1

3

You don't need your script: <src="https://MYRDomain-dev-dev-ed.my.salesforce.com/lightning/lightning.out.js" />

Remove it and keep the <apex:includeLightning /> one, this will be enough to make Lightning Out work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .