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: What is a Gack?
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 the 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 and/or validation errors:
(-1177419986) - Flows
This code likely means that there is a missing required input parameter for a flow.
(-1201527775) - StandardValueSetTranslation
Unknown cause at this time, however was related to Standard Value Set Translation metadata type when this occurred.
(-1748883593) - Bulk API batch size is too large
This ID is likely surfaced when the Bulk API batch size is too large on a data deployment. We believe lowering the batch size in the settings can help work round this GACK code.
(-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.
(-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'
(-493896994) - Apex Class
Unknown cause at this time, however was related to an Apex Class metadata type when this occurred.
Update 27 June: Salesforce confirmed that this error type is associated with an existing bug. The bug fix will be released in patch 244.12, which is scheduled for 10th of July 2023 (Safe Harbor).
(-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 suggests 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.
(-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 39 MB.
(-673032061) - Document, Email Template or CustomMetadata
This ID has been surfaced with two causes that we know of:
This ID can be surfaced when a non-ASCII character has been used in the metadata or object name.
This ID is also surfaced if too large a batch of metadata objects are attempted to be retrieved from Salesforce. Try reducing the number of objects trying to be retrieved.
Also seen another metadata type causing this GACK code error which is
User Access Policies (Beta). You may remove this metadata type to resolve this error.
(-693245406) - Unsupported Group Type
Unknown cause at this time, however the Salesforce API returns an issue regarding Contact_Centre_Group.
(-776149881) - Layout
Unknown cause at this time, however the error was related to Layout
metadata type. We observed that all Layout
components that failed the validation were dependent on Quick action
metadata type - at this point it's unclear if this has any relevant to the error.
(-820934765) - Unexpected error while processing BULK-API
Failure is due to objects having different owners. For this code, group the knowledge articles by owner and break up the deployment.
(-84759894) - FlexiPage
Unknown cause at this time. This error may surface during a validation against a Salesforce org (API version 59 used).
Deployment and/or validation 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.
(1086055316) - Picklist Value
The picklist field throwing the error was marked for Field History Tracking
on the Object in the source org. However, the destination org was already at its maximum 20 out of 20 Fields for Field History Tracking.
(1090241698) - Lookup fields on Lightning pages
This is a known Salesforce issue as documented here.
Please follow the workaround provided by Salesforce to resolve the error.
(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.
(1169783681) - ApprovalProcess
Unknown cause at this time, however the error was related to ApprovalProcess
metadata type components and the Case
Custom object. Error occurred on a CI job.
(1214156259) - Email Templates
This is most likely due to private email templates with Modify All data permission unticked.
(1248150380) - NavigationMenu
Unknown cause at this time, however was related to the Navigation Menu metadata type when this occurred.
(1266517447) - Call center
Confirmed by Salesforce Support that this error is related to Call center metadata type. The recommendation is to exclude this metadata type from the filter if it continues causing an issue.
(1369604864) and (1988552325) - ContentAsset
Unknown cause at this time, however those two error IDs were related to the ContentAsset
metadata type when they occurred.
(1566163925) - Apex class
Unknown cause at this time, however it may have been related to unfinished code in one of the Apex classes.
(2088258282) - Flow
Unknown cause at this time. This error was related specifically to Flow
metadata type.
Additional context on the use case we've seen:
Flow's status was Active
in the source (Git branch), and the comparison in Gearset was run on API v 59, while the API version of the Flow pointed was v60 (in Flow's XML file). The recommendation is to run the comparison in our app using API version 60 to see if that resolves the error.
(2097016231) - Report types
Seems to be linked to the activation and deactivation of Sales Engagement studio. Causing report types to be associated with that.
(547557641) - DocumentTemplate
Programmer Error: transaction committed or rolled back while performing api save object: DocumentTemplateContentDoc. The error message gets thrown when attempting to deploy the doc template manually.
(776095663) - CustomField
Unknown cause at this time, however was related to CustomField
metadata type - it was a changed picklist field retrieved from the source that errored on the validation.
(886823606) - Flow
This error is encountered on deployment when their is a referenced component that is missing/not installed in the target org. This could be a package that is being used in the Flow.
(-373587910) - validation of test classes for orgs on UM3 instance
This error may affect deployments of metadata for some orgs residing on UM3 instance (ref: Salesforce Known Issues documentation), e.g. during Sandbox > Sandbox, or Sandbox > Prod deployments.
Workaround proposed by Salesforce:
"The customers can raise a case with support to disable test class validation perm during deployment."
We've also seen a Gack error with reference (-373587910)
surface on a Gearset user's backup job. It is recommended to contact Salesforce support to confirm the root cause of the issue.
---
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.