I have a Visualforce page which loads a Lightning Aura Component using LightningOut.

When the Lightning component executes this line:


I get this error:

This page has an error. You might just need to refresh it. Error in $A.getCallback() [Cannot read property 'fire' of undefined] Callback failed: apex://CustomProcessController/ACTION$clearSessionCache Failing descriptor: {c:CustomProcess}

I guess that $A.get('e.force:refreshView').fire() is not supported in LightningOut?


What alternatives do I have to get the page to refresh?

And how can the Lightning component detect that it's running inside LightningOut such that I can use the alternative method?


1 Answer 1


Credit to Adrian Larson.

By adding this line:

<aura:dependency resource="markup://force:*" type="EVENT"/>

To my LightningOutContainerApp.app it worked.

<aura:application access="GLOBAL" extends="ltng:outApp" >
    <aura:dependency resource="c:CustomProcess"/>
    <aura:dependency resource="markup://force:*" type="EVENT"/>

You must log in to answer this question.

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