2

I have installed and configured the Ubuntu 20.04 and Visual Studio Code.

It is connected to the my org.

But a simple deploying in the production I gets "An internal server error".

Sometimes it stucks, other times it gets an error, it worked only once.

The command that I proceed to interface it just by clicking on "SFDX: Deploy Source to Org"

sfdx force:source:deploy --sourcepath /home/myUser/myProject/force-app/main/default/classes/collections/UsingListCollection.cls --json --loglevel fatal

How to fix that? How to troubleshooting the Error ID?

The output is an HTML like this:

<html>
<head><title>An internal server error has occurred</title></head>
<body>


<div style="display:none;" id="errorTitle">An internal server error has occurred</div>
<div style="display:none;" id="errorDesc">An error has occurred while processing your request. The salesforce.com 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 <a href="https://help.salesforce.com/apex/hthome">Salesforce Support</a>. 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. <br/><br/>Thank you again for your patience and assistance. And thanks for using salesforce.com!</div>
<table cellspacing=10>
<tr><td><span style="font-weight: bold; font-size: 12pt;">An internal server error has occurred</span></td></tr>
<tr><td>
An error has occurred while processing your request. The salesforce.com 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 <a href="https://help.salesforce.com/apex/hthome">Salesforce Support</a>. 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. <br/><br/>Thank you again for your patience and assistance. And thanks for using salesforce.com!
<br><br>
Error ID: 7538977-70447 (1534884652)
</td>
</tr>
<tr><td>
<br clear="all"><br><br>
</td></tr>
</table>
</td></tr>
</table>
</body>
</html>

There's another question similar to this.

The error message is the same but the cause I don't think is related to the scenario that I have provided here.

It is this one:

Internal Server Error - What Now?

The original apex code. It was only a test. There was nothing wrong.

public with sharing class UsingListCollection {
public UsingListCollection() {

}

public void showAccounts() {
    
    List<Account> listAccount = getAccounts();
    for(Account account : listAccount){
        System.debug(account);    
    }

}

public List<Account> getAccounts() {

     List<Account> listAccount = [
        SELECT 
            AccountNumber,
            AnnualRevenue,
            Name 
        FROM Account
    ];

    return listAccount;
}

}

3
  • 1
    do you run into the same issues even if you switch to use SOAP instead of REST. Use sfdx config:set restDeploy=false and then try again. See the following issue – Kris Goncalves Mar 23 at 23:39
  • Without more information, we can't help you. We'd need to see the source code involved. If you can't share the code, your best bet is to contact support with the error ID. We cannot see error codes and have no way to help you without more information. – sfdcfox Mar 23 at 23:40
  • Kris Goncalvez, you've got the solution! it worked. Tks! The system or someone marked the question as duplicate, but it is not. there is no mention of what you mentioned. – Olavo Alexandrino Mar 24 at 1:42
3

There are has been a known issue with deployments. You can read more about it here.

You can change it back to use SOAP Metadata API so these issues disappear. The steps are below

if you are using mdapi:deploy there is a --soapdeploy flag you can add

run the following sfdx config:set restDeploy=false --global to change it everywhere, or without --global to change it at the project level

If you're having problems with a CI environment where you can't modify the scripts, you can set SFDX_REST_DEPLOY=false in the environment. Here is how to change to SOAP deploy.

Update

As of latest, the changes are reverted so it uses SOAP by default now

1

In case it helps anyone. I was getting the same error consistently. (Win 10 / IntelliJ / Illuminated cloud) on any deploy. simply upgrading solved it for me

sfdx update

sfdx-cli: Updating CLI from 7.93.0-9e2365b to 7.93.1-762bca056d... done sfdx-cli: Updating CLI... done

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.