Skip to content

Error "Could not infer a metadata type" when retrieving source after successful decomposed metadata #3412

@smo17

Description

@smo17

Summary

Followed documentation to try out beta decomposed metadata commands : https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_decomposed_md_types.htm#sfdx_dev_ws_start_decompose

After successfully running sf command to decompose custom labels, permission set and sharing rules, new retrieve command on any other metadata from org result in error linked with custom label.

13:54:59.798 Starting SFDX: Retrieve This Source from Org
No components retrieved
\force-app\main\default\labels\ErrorMessage.label-meta.xml: Could not infer a metadata type

Steps To Reproduce

Expected result

Expecting retrieve command to work fine despite having decomposed metadata

Actual result

Getting error suggesting that decomposed folder/files under custom label are invalid

Additional information

System Information

Bash

{
  "architecture": "win32-x64",
  "cliVersion": "@salesforce/cli/2.108.6",
  "nodeVersion": "node-v22.12.0",
  "osVersion": "Windows_NT 10.0.26100",
  "rootPath": "C:\\Users\\User\\AppData\\Roaming\\npm\\node_modules\\@salesforce\\cli",
  "shell": "C:\\Program Files\\Git\\usr\\bin\\bash.exe",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.2.35 (core)",
    "@oclif/plugin-commands 4.1.33 (core)",
    "@oclif/plugin-help 6.2.33 (core)",
    "@oclif/plugin-not-found 3.2.68 (core)",
    "@oclif/plugin-plugins 5.4.47 (core)",
    "@oclif/plugin-search 1.2.31 (core)",
    "@oclif/plugin-update 4.7.7 (core)",
    "@oclif/plugin-version 2.2.33 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.48 (core)",
    "@oclif/plugin-which 3.2.40 (core)",
    "@salesforce/cli 2.108.6 (core)",
    "agent 1.24.13 (core)",
    "apex 3.8.1 (core)",
    "api 1.3.3 (core)",
    "auth 3.9.8 (core)",
    "code-analyzer 5.0.0 (user) published 160 days ago (Tue Apr 29 2025) (latest is 5.5.0)",
    "data 4.0.57 (core)",
    "deploy-retrieve 3.23.3 (core)",
    "info 3.4.88 (core)",
    "limits 3.3.67 (core)",
    "marketplace 1.3.8 (core)",
    "org 5.9.30 (core)",
    "packaging 2.20.5 (user) published 13 days ago (Tue Sep 23 2025)",
    "schema 3.3.82 (core)",
    "settings 2.4.48 (core)",
    "sobject 1.4.73 (core)",
    "telemetry 3.6.57 (core)",
    "templates 56.3.65 (core)",
    "trust 3.7.113 (core)",
    "user 3.6.38 (core)",
    "sfdmu 4.38.0 (user) published 282 days ago (Sun Dec 29 2024)",
    "sfdx-git-delta 6.21.0 (user) published 10 days ago (Fri Sep 26 2025)",
    "sfdx-hardis 6.6.0 (link) C:\\Users\\User\\gitrepo\\sfdx-hardis",
    "texei-sfdx-plugin 2.8.3 (user) published 210 days ago (Mon Mar 10 2025) (latest is 2.8.4)"
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    stalevalidatedVersion information for this issue has been validated

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions