Initial post: 18 September 2019, 11:40am BST

What's the issue?

We're seeing an increased rate of comparisons failing with errors matching the format of INVALID_TYPE: sObject type '<objectname>__mdt' is not supported.

What's the cause?

It appears to be related to the recent Salesforce API upgrade to Winter '20. In particular, it seems to be affecting the Custom metadata item type.

What's the impact?

Comparisons and deployments in Gearset using any affected org as either source or target which include the Custom metadata metadata type in the filter will fail with an error. 

It will also stop metadata filters from populating the named items list, and may cause the org preview (see screenshot below) to fail or disappear after selecting an org from the compare and deploy page.

This issue can also impact listing of items for a metadata types when managing custom filters.  We are unable to populate the list of items - see areas marked in red for where we would expect the number of items and the list of items:

Is there a workaround with Gearset?

Removing Custom metadata from comparison filters should resolve the issue. For help on how to do this, see our article on custom metadata filters.

If you cannot remove the it initially due to wanting to combine or clone the packages you can follow the workaround: 

  1. Get the cached comparison from Comparison History (View comparison) or Draft Deployments (Open draft).

  2. Refresh the comparison (without Custom metadata).

What is Gearset doing?

We're investigating the cause and will post updates in this article as we learn more. We have reported the issue to Salesforce.

Update: 18 September 2019, 15:40 BST

Salesforce have acknowledged that this is a bug in the metadata API, and there is an open ticket they are looking into.

You can also reproduce the issue in Workbench:

  • You'll need an org which is on v47 of the API (Winter '20 - either a preview org, or a sandbox which has been upgraded) and has an installed managed package which adds custom metadata.

  • In Workbench, do a describe / list metadata on CustomMetadata using v46 of the API.

  • You will see a similar __mdt error message and the retrieve will fail.

This issue does not appear to be affecting orgs which are still on v46 of the API, only orgs which have been upgraded to v47 (Winter '20).

Update: 20 September 2019, 09:05 BST

Salesforce now have an open bug report on their CLI repository, including reproduction steps in Workbench and the SFDX CLI:

Update: 23 September 2019, 09:30 BST

The issue seems resolved for the testing orgs (instance EU8) that Gearset was using to replicate and monitor the issue, although we have not had an official confirmation from Salesforce yet. 

We are aware that this remains a problem with other Salesforce instances. Please see if the behaviour has been corrected and we can build up a picture of which Salesforce instances still need the fix applied. 

Update: 30 September 2019, 18:00 BST

The issue has been now been marked as fixed by Salesforce:

Did this answer your question?