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
Emmanuel Petrelli 23Emmanuel Petrelli 23 

An internal server error has occurred Error ID 435276104-25533 (-2090061783)

I would like to receive information regarding the Error: "An internal server error has occurred Error ID: 435276104-25533 (-2090061783)"

This error appears when, by pressing a button in a lightning component, I call a method @AuraEnabled and in this method I do 2 DML-deletion: one for the PermissionSetAssignments and one for the PermissionSets.

Method:
       @AuraEnabled
    public static String deleteExistingCBAPermissionSets(){
       try{
            map<Id,PermissionSet> mapIdToPermissionSet = new map<Id,PermissionSet>();
            for(PermissionSet ps : [Select Name, Label from PermissionSet where Name like 'CBA_%']){
                mapIdToPermissionSet.put(ps.Id, ps);
            }
            list<PermissionSetAssignment> permissionsSetAssignToDelete = new list<PermissionSetAssignment>();
            for(PermissionSetAssignment psa : [Select Id, PermissionSetId
                                                from PermissionSetAssignment
                                                where PermissionSetId IN: mapIdToPermissionSet.keyset()]){
                permissionsSetAssignToDelete.add(psa);
            }
            if(permissionsSetAssignToDelete.size()>0){
                delete permissionsSetAssignToDelete;
            }
            if(mapIdToPermissionSet.size()>0){
                delete mapIdToPermissionSet.values();
            }
            return 'OK';
        }catch (exception e){
            return e.getMessage()+' at line '+e.getLineNumber();
        }

    }

I run the same code from Execute Anonymous and it works correctly. It deletes the desired permissions.
I also tried to declare the class "without sharing" but the result is the same.

Does anyone know the kind of error?
Thanks in advance for your answers.
Best Answer chosen by Emmanuel Petrelli 23
NagendraNagendra (Salesforce Developers) 
Hi Emmanuel,

This type of error indicates that an error has occurred that hasn't been trapped by the platform - a low-level java exception for example.  All you can really do in terms of resolution is to file a support case with Salesforce and provide them the error ID that you are getting to get more information.
 
If you need to move quicker than, start removing functionality from the component to isolate where the problem occurs and see if there are any other mechanisms you can use.

You can follow a support case by following these [1] directions:
  • https://help.salesforce.com/apex/HTViewSolution?id=000123530&language=en_US
Please mark this as solved if the information helps.

Regards,
Nagendra.

All Answers

NagendraNagendra (Salesforce Developers) 
Hi Emmanuel,

This type of error indicates that an error has occurred that hasn't been trapped by the platform - a low-level java exception for example.  All you can really do in terms of resolution is to file a support case with Salesforce and provide them the error ID that you are getting to get more information.
 
If you need to move quicker than, start removing functionality from the component to isolate where the problem occurs and see if there are any other mechanisms you can use.

You can follow a support case by following these [1] directions:
  • https://help.salesforce.com/apex/HTViewSolution?id=000123530&language=en_US
Please mark this as solved if the information helps.

Regards,
Nagendra.
This was selected as the best answer
David Roberts 4David Roberts 4
It can be something seemingly trivial so removing elements until you isolate is the only solution.

For example, I had the following attribute definition which caused such an error:
<aura:attribute name="theSalesRep" type="Contact"  default="Fred Smith"/>

I removed the line altogether and the error dissapeared. I then tried without the default and it was also OK.
<aura:attribute name="theSalesRep" type="Contact"  />

A bit more research led me to the correct definition of a default for an object.
<aura:attribute name="theSalesRep" type="Contact"  default="{'sobjectType':'Contact', 'Name':'Fred Smith'}"/>