Failed to retrieve metadata. Status: FAILED Message: SfError The specified metadata type is unsupported: [expressionsetobjectalias]

Issue #2470 resolved
Tony White created an issue

There seems to be an issue with retrieving https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_expressionsetobjectalias.htm

Failed to retrieve metadata. Status: FAILED Message: SfError The specified metadata type is unsupported: [expressionsetobjectalias]

Steps to reproduce:

  1. Sign up for a BRE Org with Samples -
    https://trailhead.salesforce.com/content/learn/modules/advanced-rules-with-business-rules-engine/get-ready-to-create-advanced-business-rules#:~:text=public health portal.-,Sign Up for a Developer Edition Org with Business Rules Engine,-To complete this
  2. Connect IC2 to this org and setup a sfdx project
  3. Add to the metadata selection

    • decisionMatrixDefinition
    • decisionMatrixVersion
    • expressionSetDefinition
    • expressionSetObjectAlias
    • expressionSetVersion
  4. Retrieve
    Result: error

Comments (9)

  1. Tony White reporter

    Here is the Meta retrieve logs

    2023-11-30 08:14:38,922 [172938062] FINE - #com.illuminatedcloud.intellij.builder.ForceComBuilder - Creating a metadata package for module BRE_TrailHead.
    2023-11-30 08:14:38,922 [172938062] FINE - #com.illuminatedcloud.intellij.builder.ForceComBuilder - Creating a metadata package based on package.xml file manifest/package.xml.
    2023-11-30 08:14:40,361 [172939501] INFO - #com.illuminatedcloud.intellij.builder.RetrieveAction - Retrieving metadata from requested connection BusinessRuleTrailHead into module BRE_TrailHead
    2023-11-30 08:14:40,362 [172939502] FINE - #com.illuminatedcloud.intellij.builder.RetrieveAction - Retrieving for connection BusinessRuleTrailHead: { DecisionMatrixDefinition[Additional_Subsidy], DecisionMatrixDefinition[Age_Based_Subsidy], DecisionMatrixDefinition[Applicant_Age_Based_Subsidy], DecisionMatrixDefinition[Base_Premium], DecisionMatrixDefinitionVersion[Additional_Subsidy_V1], DecisionMatrixDefinitionVersion[Age_Based_Subsidy_V1], DecisionMatrixDefinitionVersion[Applicant_Age_Based_Subsidy_V1], DecisionMatrixDefinitionVersion[Base_Premium_V1], ExpressionSetDefinition[Insurance_Payment], ExpressionSetDefinition[Insurance_Subsidy], ExpressionSetDefinition[Insurance_Subsidy_Calculation], ExpressionSetObjectAlias[InsurancePremium], ExpressionSetDefinitionVersion[Insurance_Payment_V1], ExpressionSetDefinitionVersion[Insurance_Payment_V2], ExpressionSetDefinitionVersion[Insurance_Subsidy_V1] }.
    2023-11-30 08:14:40,362 [172939502] FINE - #com.illuminatedcloud.intellij.builder.ForceComSfdxMetadataRetriever - Retrieving metadata for module BRE_TrailHead
    2023-11-30 08:14:40,367 [172939507] INFO - #com.illuminatedcloud.intellij.builder.ForceComSfdxMetadataRetriever - Using the Salesforce CLI to retrieve metadata for project 'BRE_TrailHead' from connection 'BusinessRuleTrailHead'.
    2023-11-30 08:14:40,373 [172939513] FINE - #com.illuminatedcloud.util.VariableLengthPollingInterval - /usr/local/bin/sfdx force:source:retrieve -u tony.white@qbcc.qld.gov.au.breth -x /Users/tonywhite/Sync/Workspaces/BRE_TrailHead/manifest/package.xml --json: Using polling interval 1000 ms for polling iteration 1.
    2023-11-30 08:14:40,418 [172939558] FINE - #com.illuminatedcloud.intellij.builder.ForceComBuilder - Handling file deleted event for filename manifest, file /Users/tonywhite/Library/Caches/JetBrains/WebStorm2023.2/tmp/BRE_TrailHead-BusinessRuleTrailHead-retrieve1/tmp/manifest, parent /Users/tonywhite/Library/Caches/JetBrains/WebStorm2023.2/tmp/BRE_TrailHead-BusinessRuleTrailHead-retrieve1/tmp.
    2023-11-30 08:14:40,418 [172939558] FINE - #com.illuminatedcloud.intellij.builder.ForceComBuilder - shouldProcess = false, deleteForMove = false
    2023-11-30 08:14:40,418 [172939558] FINE - #com.illuminatedcloud.intellij.builder.ForceComBuilder - Skipping delete handling for this event.
    2023-11-30 08:14:40,418 [172939558] FINE - #com.illuminatedcloud.intellij.builder.ForceComBuilder - Handling file deleted event for filename manifest, file /Users/tonywhite/Library/Caches/JetBrains/WebStorm2023.2/tmp/BRE_TrailHead-BusinessRuleTrailHead-retrieve1/tmp/manifest, parent /Users/tonywhite/Library/Caches/JetBrains/WebStorm2023.2/tmp/BRE_TrailHead-BusinessRuleTrailHead-retrieve1/tmp.
    2023-11-30 08:14:40,418 [172939558] FINE - #com.illuminatedcloud.intellij.builder.ForceComBuilder - shouldProcess = false, deleteForMove = false
    2023-11-30 08:14:40,418 [172939558] FINE - #com.illuminatedcloud.intellij.builder.ForceComBuilder - Skipping delete handling for this event.
    2023-11-30 08:14:41,378 [172940518] FINE - #com.illuminatedcloud.util.VariableLengthPollingInterval - /usr/local/bin/sfdx force:source:retrieve -u tony.white@qbcc.qld.gov.au.breth -x /Users/tonywhite/Sync/Workspaces/BRE_TrailHead/manifest/package.xml --json: Using polling interval 1000 ms for polling iteration 2.
    2023-11-30 08:14:42,383 [172941523] FINE - #com.illuminatedcloud.util.VariableLengthPollingInterval - /usr/local/bin/sfdx force:source:retrieve -u tony.white@qbcc.qld.gov.au.breth -x /Users/tonywhite/Sync/Workspaces/BRE_TrailHead/manifest/package.xml --json: Using polling interval 1000 ms for polling iteration 3.
    2023-11-30 08:14:43,396 [172942536] WARN - #com.illuminatedcloud.intellij.sfdx.SfdxUtil - Salesforce CLI stderr deprecation contents:
    (node:95138) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
    2023-11-30 08:14:43,409 [172942549] INFO - #com.illuminatedcloud.intellij.builder.ForceComSfdxMetadataRetriever - Retrieve completed in 3 s 42 ms.
    2023-11-30 08:14:43,410 [172942550] FINE - #com.illuminatedcloud.intellij.builder.ForceComSfdxMetadataRetriever - Received retrieve response:
    {
    "status": 1,
    "exitCode": 1,
    "message": "The specified metadata type is unsupported: [expressionsetobjectalias]",
    "name": "SfError",
    "commandName": "Retrieve",
    "stack": "SfError: The specified metadata type is unsupported: [expressionsetobjectalias]\n at ComponentSetBuilder.build (/usr/local/lib/node_modules/@salesforce/cli/node_modules/@salesforce/source-deploy-retrieve/lib/src/collections/componentSetBuilder.js:134:23)\n at async Retrieve.retrieve (/usr/local/lib/node_modules/@salesforce/cli/node_modules/@salesforce/plugin-source/lib/commands/force/source/retrieve.js:73:29)\n at async Retrieve.run (/usr/local/lib/node_modules/@salesforce/cli/node_modules/@salesforce/plugin-source/lib/commands/force/source/retrieve.js:34:9)\n at async Retrieve._run (/usr/local/lib/node_modules/@salesforce/cli/node_modules/@salesforce/plugin-source/node_modules/@oclif/core/lib/command.js:117:22)\n at async Config.runCommand (/usr/local/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/config/config.js:400:25)\n at async run (/usr/local/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/main.js:85:16)",
    "actions": [],
    "warnings": [
    "We plan to deprecate this command in the future. Try using the \"project retrieve start\" command instead.",
    "The \"-u\" flag has been deprecated. Use \"--target-org | -o\" instead."
    ]
    }
    2023-11-30 08:14:43,410 [172942550] FINE - #com.illuminatedcloud.intellij.builder.ForceComSfdxMetadataRetriever - Retrieve appears to have failed. Adding details.
    2023-11-30 08:14:43,410 [172942550] WARN - #com.illuminatedcloud.intellij.builder.ForceComSfdxMetadataRetriever - Failed to retrieve metadata.

    Status: FAILED
    Message: SfError
    The specified metadata type is unsupported: [expressionsetobjectalias]

  2. Scott Wells repo owner
    • changed status to open

    Thanks for filing, Tony. I'll have to set up an environment to reproduce this. Due to some conflicts late this week, it'll likely be early next week before I can do so. I'll let you know how that goes and whether I have any additional questions about how to reproduce it.

  3. Tony White reporter

    No problem, IF I am going to need it, will not be until next year ;) but I am sure someone else out there will need it too

  4. Scott Wells repo owner

    Tony, I’ve been following this set of examples to try to reproduce the issue you’re seeing:

    https://help.salesforce.com/s/articleView?id=sf.task_clone_an_expression_set.htm&type=5

    So far I’m able to create and retrieve DecisionMatrixDefinition and ExpresssionSetDefinition metadata (and their own subordinates) but I haven’t yet produced an ExpressionSetObjectAlias. Just for sake of getting to the problem, can you let me know what I need to do to have one of those in my org so I can try to retrieve it?

  5. Scott Wells repo owner

    Thanks. Yep, it’s an issue with the CLI. You can reproduce it directly via CLI commands (using the “old” syntax here):

    $ sfdx force:source:retrieve -m ExpressionSetDefinition 
    Warning: We plan to deprecate this command in the future. Try using the "project retrieve start" command instead.
    Retrieving v59.0 metadata from <username> using the v59.0 SOAP API
    Preparing retrieve request... done
    === Retrieved Source
    
     FULL NAME                     TYPE                    PROJECT PATH                                                                                                  STATE   
     ───────────────────────────── ─────────────────────── ───────────────────────────────────────────────────────────────────────────────────────────────────────────── ─────── 
     Insurance_Payment             ExpressionSetDefinition force-app\main\default\expressionSetDefinition\Insurance_Payment.expressionSetDefinition-meta.xml             Created
     Insurance_Subsidy             ExpressionSetDefinition force-app\main\default\expressionSetDefinition\Insurance_Subsidy.expressionSetDefinition-meta.xml             Created
     Insurance_Subsidy_Calculation ExpressionSetDefinition force-app\main\default\expressionSetDefinition\Insurance_Subsidy_Calculation.expressionSetDefinition-meta.xml Created
    
    $ sfdx force:source:retrieve -m ExpressionSetObjectAlias
    Warning: We plan to deprecate this command in the future. Try using the "project retrieve start" command instead.
    Preparing retrieve request... Error
    Error (1): The specified metadata type is unsupported: [expressionsetobjectalias]
    

    However, IC2 is able to retrieve all of that metadata without any issues in a metadata format project using the API directly instead of the CLI:

    It looks like I do need to add those as XML file type extensions for metadata format projects (they’re fine in source format since they named *-meta.xml), but otherwise you can retrieve and work with those files until/unless the CLI is involved. I’d recommend you log this as an issue in the CLI public issue tracker.

  6. Scott Wells repo owner

    Resolving here as what seems to be a CLI-specific issue. Note that I did update IC2's XML metadata file type extensions to include those for the (known?) BRE types for inclusion in the next build.

  7. Log in to comment