force:package:version:create failing with sharing calculation error
Sharing , Metadata , Salesforce DX
Last updated 17 days ago ·Reference W-8984120 ·Reported By 1 users
In Review
Summary
force:package:version:create failing with sharing calculation error "The sharing calculation you requested can't be processed right now, because it interferes with another operation already in progress. Please try again later."
Repro
1. Create a scratch org
2. Change the sharing settings for Account and Contact to "Public Read Only"
3. Enable History Tracking for Account and Contact
4. Source pull $ sfdx force:source:pull <<< pulling the object metadata for Account and Contact
5. Add the objectSetting in the definition file
Example:
{
"orgName": "My Company",
"edition": "Developer",
"features": [],
"objectSettings": {
"account": {
"sharingModel": "read"
},
"contact": {
"sharingModel": "read"
}
}
}
6. Create an unlocked package and uploading it.
$ sfdx force:package:create -n t1 -t Unlocked -r force-app/
$ sfdx force:package:version:create -p t1 -x -w 40 -f config/project-scratch-def.json
7. You will notice below error.
Request in progress. Sleeping 30 seconds. Will wait a total of 2400 more seconds before timing out. Current Status='Queued'
Request in progress. Sleeping 30 seconds. Will wait a total of 2370 more seconds before timing out. Current Status='Initializing'
Request in progress. Sleeping 30 seconds. Will wait a total of 2100 more seconds before timing out. Current Status='Verifying features and settings'
Request in progress. Sleeping 30 seconds. Will wait a total of 2040 more seconds before timing out. Current Status='Verifying metadata'
ERROR running force:package:version:create: : The sharing calculation you requested can't be processed right now, because it interferes with another operation already in progress. Please try again later.
Workaround
As a workaround, try removing the <sharingModel>Read</sharingModel> xml tag which defines the sharing model from the Account.object-meta.xml and Contact.object-meta.xml files.
Reported By (1)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.
