on salesforce side done this work

1) CORS Whitelist Origin set to https://*.herokuapp.com.

2) on sandbox created App dxTest2App

  <aura:application access="GLOBAL" extends="ltng:outApp" >
    <c:dxTest2 />   

created Component dxTest2 

 <aura:component access="GLOBAL">

On origin Server node js side done this work i have passed oauth.access_token after authentication in index.js file of nodejs. In Index.hjs work to load Lightning app is done.

• for this purpose i have included • created script

  The function setupLightning() is called in index.hjs is created in app.js .All needed code for loading done in this.

index.hjs is:

<!DOCTYPE html>
   <script src="/socket.io/socket.io.js"></script>
   <script type="text/javascript">   
  <body onload="setupLightning();">
    <input name="Token" Id="Token" type="hidden" value="{{oauth.access_token}}"/>

  <div id="messages" style="background: lightblue; height: 400px; width: 400px;></div>
     <div id="future"></div>
    <script src="XXXXXXmy.salesforce.com/lightning/lightning.out.js"></script>
    <script src="./javascripts/app.js"></script>

app.js code is :-

function setupLightning() {

    var oauth_token = document.getElementById('Token').value;   
    var url   = 'https://mcnabb--devsanbox.lightning.force.com';

    $Lightning.use("c:dxTest2App", function() {

         { label : " Comp" },
       }, url, oauth_token);    

Here is code for loading App in function setupLightning.but i have got this warning while loading component.

WARNING: Callback failed: aura://ComponentController/ACTION$getApplication

  • Any resolution on this even am getting error WARNING: Callback failed: aura://ComponentController/ACTION$getApplication
    – Raj_SFDC
    Commented Aug 1, 2016 at 17:20
  • Usually when they are completely and totally vague like this it's some form of bad syntax and lightning gives the horribly vague message. What I do is examine the most recently edited code for syntax problems. I've gotten this when i used a : instead of a ; to terminate a line of code. and many other syntax errors. Another thing I do is in recently edited code put a system.log('made it here'); message and check the console log. then move it a couple lines down and do it again. when the message no longer appears in the console log you no know what lines of code it doesn't like
    – Ohmicron
    Commented Aug 8, 2016 at 12:39

1 Answer 1


You have to add aura:dependency to both App and Component.

  • 1
    Please also show how to add it to the code as well as putting in the short answer - see How to Answer. Thanks.
    – Dave Humm
    Commented Nov 4, 2016 at 9:51

You must log in to answer this question.

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