function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Receiving an 'Internal Server Error' for LCC

Problem: Clicking on a custom button (Lightning component) on an Opportunity LEX page produces an internal server error.
An internal server error has occurred
An error has occurred while processing your request. The support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience.

Thank you again for your patience and assistance. And thanks for using!

Error ID: 760508275-302660 (-277500788)

Custom button in Classic:  View Executive PDF- clicking on the button produces a custom PDF view of the Opportunity record based on security associated with the VF page. As a system administrator, I have access to view the PDF.

In LEX, our dev created a Lightning component which includes the button, View Executive PDF. Clicking on the button should display the custom PDF. LCC visibility is set on the page layout.  When clicking on the View Exec PDF button, the internal server error is displayed. Same error is received when an authorized user clicks on the button in LEX.  Both the user profile and system admin profiles are included in the VF page security.

Below is the code for the LCC:

<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" controller="opportunityPrintoutController" >
    <ltng:require styles="{! $Resource.pdfcss}" />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    <aura:attribute name="entityId" type="String" access="public" default="{!v.recordId}" />
    <aura:attribute name="url" type="String" access="public" />
    <div style="background-color:white;padding:10px;border-radius:5px">
            <fieldset><legend>View Opp PDFs</legend>
            <p style="text-align:center">
        <lightning:button variant="Neutral" label="View Executive PDF" title="View Pdf" onclick="{! c.handleClick }"/>
        <lightning:button variant="Neutral" label="View PDF" title="View Pdf" onclick="{! c.handleClick2 }"/>


    doInit: function(cmp,event,helper) {
        var action= cmp.get("c.getSfUrl");
        action.setCallback(this, function(response) {           
            var responseValue = response.getReturnValue();
            handleClick : function(component, event, helper) {
        var getId = component.get( "v.entityId" );
        var url=component.get( "v.url");       +'/apex/ExecPdfView?id='+getId);
    handleClick2 : function(component, event, helper) {
        var getId = component.get( "v.entityId" );
        var url=component.get( "v.url");    '/apex/RegPdfView?id='+getId);

Debug logs are not providing any good hints or information as to what the problem may be.

I appreciate anyone's input who has had experience with this problem.

Thank you!
SwethaSwetha (Salesforce Developers) 
I have checked the backend logs for the GACK ID and it points to this error message:" java. lang.RuntimeException: saved must be null"

Please consider logging a case with Salesforce support( and share the case number here if you need further assistance. 

If this information helps, please mark the answer as best.

Thank you,
Swetha Maddali
Salesforce Support
Thank you, Swetha.  I have logged a case with SF Support, per your suggestion.