3

I have run into a large blocker regarding the use of Lightning Out to inject a Lightning component into a Visualforce page. I have used the method outlined in the documentation here in order to load a Lightning component in the classic service console.

The code I am using to inject the component is below:

<apex:page standardController="Case" showHeader="false" sidebar="false">

    <apex:slds />
    <apex:includeLightning />
    <apex:includeScript value="/support/console/40.0/integration.js"/>

    <style>
        .slds-form-element__label {
            font-size: 0.8125rem !important;
        }
    </style>
    <body class="slds-scope">
        <!-- Page div used to inject Lightning component -->
        <div id="assetManagerDiv"></div>
    </body>
    
    <!-- Script that uses the Lightning javascript library to inject a lightning component into the VF page div -->
    <script type="text/javascript">
        (function() {
            // Script to inject Lightning component into the Visualforce page
            $Lightning.use("c:AttachAssetToCaseEditorApp", function() {
                $Lightning.createComponent("c:AttachAssetToCaseEditorCmp",
                                            {
                                                "tabId" : '{!$CurrentPage.parameters.Id}'
                                            },
                                            "assetManagerDiv",
                                            function(component) {});
            });
        }());
    </script>
    
</apex:page>

I have used this method many times before and it has worked successfully. However, when I try to load the Lightning component in the Firefox browser I receive the following error in the browser console and the Lightning component will not load at all:

SecurityError: The operation is insecure - aura_proddebug.js:23749

TypeError: $A.initAsync is not a function - lightning.out.delegate.js:126:10

This is only happening in Firefox. It is working fine in the Chrome browser. I am using the current 55.0.3 64-bit version of Firefox.

Is there some issue with Firefox and Lightning Out that is currently happening? I am not sure how to figure out what is causing this issue.

5
  • Did u make sure c:AttachAssetToCaseEditorApp extends="ltng:outApp"? Commented Sep 27, 2017 at 23:10
  • @RaviJayaramappa Yes it does extend. Otherwise, I don't think it would work in Chrome either. I am looping back around to this issue because I am experiencing it again now. Commented Jan 8, 2018 at 21:39
  • did you added dependency in your app <aura:dependency resource="c:AttachAssetToCaseEditorApp"/> Commented Jan 9, 2018 at 5:33
  • please include the lightning app and component codes.
    – A.Bretto
    Commented Jan 9, 2018 at 11:36
  • @DanielFuller Please provide the complete markup, controller code for your lightning components to repro this issue. A simpler repro, if possible, would be easier to diagnose the issue. Also, please log a Salesforce case to help you track the issue. Commented Jan 9, 2018 at 19:27

1 Answer 1

2

I found the solution for this issue. Somehow, there was an issue in the Firefox browser cache that was conflicting with Lightning Out. I cleared my Firefox browser cache and that resolved the issue. I'm not sure what in the cache was the culprit, however.

You must log in to answer this question.

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