Package version creation is failing intermittently with error: Before you can use this duplicate rule, all associated matching rules must be active and have their fields mapped.
Summary
We have our CI-CD pipeline which creates a new version for every PR/Push, however, sometimes it gets failed intermittently with the error: ERROR running force:package:version:create: Before you can use this duplicate rule, all associated matching rules must be active and have their fields mapped.
So if we retry (without any changes) the process, it creates a package version successfully
PS: We always installed a new version of SFDX in our pipeline server
Steps To Reproduce: (in our unlocked package repo pipeline)
- Install sfdx:
npm i sfdx-cli --global - Dev-hub auth:
sfdx auth:jwt:grant --clientid *** --jwtkeyfile server.key --username *** --setdefaultdevhubusername -a <devHubAlias> - Create package version:
sfdx force:package:version:create -p onagsf -d force-app -k test1234 --wait 120 -v OnProd2.0 -c --definitionfile config/project-scratch-def.json
Expected result
It should create a new version.
Actual result (failed intermittently)
Error
ERROR running force:package:version:create: Before you can use this duplicate rule, all associated matching rules must be active and have their fields mapped.
System Information
- We run our CI-CD on GitHub actions
- We are using
npm i sfdx-cli --global
Additional information
- We have been facing this issue for the last three months (approx)
- Business and Development team escalated this as we need to rerun the process (re-try), and it doesn't make any sense that it gets failed once and then next try, it successfully creates version
- Sometimes, we need to run it 3 or 4 times until it successfully create a version
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.
We have determined that the issue you reported exists in code owned by another team that uses only the official support channels. To ensure that your issue is addressed, open an official Salesforce customer support ticket with a link to this issue. We encourage anyone experiencing this issue to do the same to increase the priority. We will keep this issue open for the community to collaborate on.
packaging team doesn't monitor github
This issue has not received a response in 60 days. It will auto-close in 7 days unless a response is posted.