I have been trying to create a new Visualforce page with LWC but I am always getting a GACK, maybe I am messing up with something?

I am using Visual Studio Code to implement this, so I have created a new Lightning App:


<aura:application extends="ltng:outApp" access="global">
    <aura:dependency resource="lightning:button"/>


<?xml version="1.0" encoding="UTF-8"?>
<CustomApplication xmlns="http://soap.sforce.com/2006/04/metadata">

And a new Visualforce page:


<apex:page >
    <apex:includeLightning />
    <div id="lightningvf" />
        $Lightning.use("c:lwcComponents", function() {
                { label : "Press Me!" },
                function(cmp) {
                    console.log("button was created");


<?xml version="1.0" encoding="UTF-8"?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">

When trying to run the Visualforce page in browser, this is what I am getting:

An internal server error has occurred
Error ID: 188429498-1091988 (-1249547377)

As far as I can see in the Chrome Network tab, the problem is the $Lightning.use method is calling an URL which is throwing this error.

Thank you!

  • Welcome to SFSE! While there are a few people directly employed by Salesforce here, most of us are customers of Salesforce who are volunteering our knowledge and experience. If you're getting a GACK, chances are that you'll need to go through Salesforce's own Customer Support to get a resolution.
    – Derek F
    Apr 12, 2020 at 13:20

1 Answer 1


lwcComponents.app seems to be created in wrong folder. You have created in applications folder with wrong metadata.

You should be creating the lightning app in the aura folder. Create an Aura Application in the aura folder and deploy it to the org.

The other thing is use salesforce developer console.

  • You are right Mohith! The folder and metadata were wrong, creating the app in vscode with the SFDX: Create Lightning app command worked fine =)
    – jgmullor
    Apr 13, 2020 at 14:43
  • @jgmullor you might want to mark the answer as answered to assist others! Apr 13, 2020 at 14:47

You must log in to answer this question.

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