All Collections
Troubleshooting
Salesforce Validation Errors
Resolving UNKNOWN Errors - "UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support:"
Resolving UNKNOWN Errors - "UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support:"

Error includes "UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support"

Vincent Maltby avatar
Written by Vincent Maltby
Updated over a week ago

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 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 Errors:

(-1201527775) - StandardValueSetTranslation

Unknown cause at this time, however was related to Standard Value Set Translation metadata type when this occurred.

(-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 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.

(-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, Email Template or CustomMetadata

This id is likely surfaced when a non-ASCII character has been used in the metadata or object name.

(-693245406) - Unsupported Group Type

Unknown cause at this time, however the Salesforce api returns an issue regarding Contact_Centre_Group.

(-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.

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.

(1248150380) - NavigationMenu

Unknown cause at this time, however was related to the Navigation Menu metadata type when this occurred.

(1988552325) - ContentAsset

Unknown cause at this time, however was related to the ContentAsset metadata type when this occurred [last time reported: 13 July 2023].

(1566163925) - Apex class

Unknown cause at this time, however it may have been related to unfinished code in one of the Apex classes.

(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.

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.

Did this answer your question?