package:version:create fails with error "Before you can use this duplicate rule, all associated matching rules must be active and have their fields mapped."
Summary
This issue seems to have started with the Winter '23 preview window as the error was not seen before, and there have been no source changes re: duplicate/matching rules. The issue is intermittent. In other words, the exact same source will fail, sometimes multiple times in succession, but then will eventually succeed.
Steps To Reproduce:
- Have provided a simple/sample project that has reproduced the issue. However as mentioned above, because the error is intermittent I can't guarantee the error will happen always.
- Run command
sfdx force:package:version:create -p grs_base -d grs_base ...on the attached project.
Expected result
New package version created successfully.
Actual result
Command fails with error:
Before you can use this duplicate rule, all associated matching rules must be active and have their fields mapped.
System Information
{
"cliVersion": "sfdx-cli/7.167.1",
"architecture": "win32-x64",
"nodeVersion": "node-v16.17.0",
"pluginVersions": [
"@oclif/plugin-autocomplete 1.3.0 (core)",
"@oclif/plugin-commands 2.2.0 (core)",
"@oclif/plugin-help 5.1.12 (core)",
"@oclif/plugin-not-found 2.3.1 (core)",
"@oclif/plugin-plugins 2.1.0 (core)",
"@oclif/plugin-update 3.0.0 (core)",
"@oclif/plugin-version 1.1.2 (core)",
"@oclif/plugin-warn-if-update-available 2.0.4 (core)",
"@oclif/plugin-which 2.1.0 (core)",
"alias 2.1.0 (core)",
"apex 1.2.0 (core)",
"auth 2.2.3 (core)",
"community 2.0.1 (core)",
"config 1.4.17 (core)",
"custom-metadata 2.0.0 (core)",
"data 2.1.2 (core)",
"generator 2.0.2 (core)",
"info 2.0.1 (core)",
"limits 2.0.1 (core)",
"org 2.2.0 (core)",
"packaging 1.6.0 (core)",
"schema 2.1.1 (core)",
"signups 1.2.0 (core)",
"source 2.0.13 (core)",
"telemetry 2.0.0 (core)",
"templates 55.1.0 (core)",
"trust 2.0.3 (core)",
"user 2.1.0 (core)",
"@salesforce/sfdx-plugin-lwc-test 1.0.1 (core)",
"salesforce-alm 54.8.1 (core)"
],
"osVersion": "Windows_NT 10.0.19042",
"shell": "cmd.exe",
"rootPath": "C:\\Users\\bassog2\\AppData\\Local\\sfdx\\client\\7.167.1-27670a3"
}
Additional information
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.
Hey @gsbasso 👋
can you try running the force:package:beta:version:create and see if it's still erroring?
This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted.
Hi @WillieRuemmele ,
I can try using the beta command, but as the issue is intermittent it will be difficult to conclude if that resolves the issue. In fact, it's been a while (week or two?) since I've seen the issue as I think on it (using the non-beta command).
This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted.
This just happened to me, but I was not able to replicate. sf version output:
"cliVersion": "@salesforce/cli/2.11.8",
"architecture": "win32-x64",
"nodeVersion": "node-v18.18.0",
"osVersion": "Windows_NT 10.0.22621",
"shell": "cmd.exe",
"rootPath": "C:\\Users\\ChrisDuncan\\AppData\\Roaming\\nvm\\v18.18.0\\node_modules\\@salesforce\\cli",
"pluginVersions": [
"@oclif/plugin-autocomplete 2.3.8 (core)",
"@oclif/plugin-commands 2.2.26 (core)",
"@oclif/plugin-help 5.2.19 (core)",
"@oclif/plugin-not-found 2.4.1 (core)",
"@oclif/plugin-plugins 3.8.2 (core)",
"@oclif/plugin-search 0.0.22 (core)",
"@oclif/plugin-update 3.2.3 (core)",
"@oclif/plugin-version 1.3.10 (core)",
"@oclif/plugin-warn-if-update-available 2.1.0 (core)",
"@oclif/plugin-which 2.2.32 (core)",
"@salesforce/cli 2.11.8 (core)",
"apex 2.3.15 (core)",
"auth 2.8.17 (core)",
"custom-metadata 2.1.23 (user)",
"data 2.5.12 (core)",
"deploy-retrieve 1.18.3 (core)",
"env 2.1.14 (user)",
"functions 1.21.10 (user)",
"info 2.6.45 (core)",
"limits 2.3.35 (core)",
"login 1.2.31 (core)",
"marketplace 0.2.2 (core)",
"org 2.10.8 (core)",
"packaging 1.26.1 (user)",
"schema 2.3.28 (core)",
"settings 1.4.30 (core)",
"signups 1.4.22 (user)",
"sobject 0.2.7 (core)",
"source 2.10.36 (core)",
"telemetry 2.3.4 (core)",
"templates 55.5.13 (core)",
"trust 2.6.15 (core)",
"user 2.3.32 (core)"
]
}