Explanation of the error:
This Salesforce error that Gearset is surfacing is usually encountered when running a Compare and Deploy or a Data Backup Job where metadata is being retrieved from or deployed to Salesforce.
The ErrorId that is returned is one returned to Gearset by Salesforce and is called a GACK code.
Salesforce explains why these codes occur here
As an example - Salesforce returns the error "An unexpected error occurred. Please include this ErrorId if you contact support: 1234567890-1234 (-547594032)".
In this error the code 1234567890-1234 is created by Salesforce and is unique to the error occurrence. This reference helps Salesforce locate the error in their logs when raised with their support team.
The secondary number in brackets (-547594032) is created off the back of the error, and may give an indication of metadata type that is causing the issue.
Due to our experience in this sector, we have noticed a few trends with GACK codes. The
list below was created by spotting patterns. We have seen there are a few possible common GACK codes that are linked to metadata types, we have also linked what we believe is the cause of the error:
Retrieval Errors:
(-465392833) - Milestone
This id is likely surfaced when a non-ASCII character has been used in the metadata or object name or there is a missing character causing a parse error.
Can be caused by Apex code, and has been known to have been caused by an extra ' or missing '
(-547594032) - Document
This id is likely caused by the hitting limits of either deploying 10,000 files at once or having a zip larger than 39MB.
(-673032061) - Document or Email Template
This id is likely surfaced when a non-ASCII character has been used in the metadata or object name.
(-28317623) - Email Template or Email Alert
This id is likely caused by the hitting limits of either deploying 10,000 files at once or having a zip larger than 39MB.
(-534360317) - PermissionSetGroup
This id is likely caused by a Salesforce Summer'23 Known Issue (KI).
The KI link for further details on this can be found here.
Salesforce suggest a couple of options to try and resolve the issue:
Refreshing the sandbox org or cloning a new sandbox from production to avoid the issue.
Trying to match licenses with the production org to create standard PermissionSets with new ids.
Add created PermissionSets to PermissionSetGroups.
Deployment Errors:
(1042929838) - Picklist Value
This is caused by a picklist value that is no longer active on the target. Either remove the picklist value from the deployment, or activate it on the target org.
(1140994461) - ContentDocuments
This is caused due to an invalid file type in ContentDocuments where the FileType is not known. This is known to occur when converting Attachments to ContentDocuments using this tool which doesn't support some file types.
As further examples are encountered, we will add them into this document.
There can be multiple codes for a metadata type. Each code indicates a slightly different issue within that metadata type that Salesforce should be able to advise further on.
Please note that the codes listed above are not definitive; the reason why is better described here
Resolution:
To resolve this issue please raise the error with Salesforce support to locate why the problem is occurring when trying to retrieve the metadata from the Metadata API.
As a workaround to this issue, exclude the metadata type causing the error from your deployment or data backup job until the cause of the error is provided by Salesforce support.
Further examples of this Salesforce validation error can be found here:
Disclaimer: This error is returned by Salesforce directly, rather than Gearset. Even so, we offer guidance based on our combined experience with the Metadata API. Where possible, we try to help guide you to fix or avoid this error. In the case that this isn't possible, we may need to direct you to Salesforce support for further clarification.