Scratch orgs hit Internal Server Error when trying to add a role to a user record in the newly created org.
Last updated 2022-02-10 ·Reference W-6149550 ·Reported By 68 users
Summary
When the customer creates a scratch org they hit an Internal Server Error when trying to add a role to a user record in the new org.
The errors can be -2074079576 or -117023207 (or others)
R&D have advised that if they wishes to use Salesforce's "out-of-the-box" Roles, they should use a scratch org that contains sample data.
Salesforce has historically included some "out-of-the-box" roles in our trial orgs, but they're not technically considered "standard" or "default".
Therefore, in the new "empty" scratch orgs that we've introduced we should be filtering them out.
But we are not filtering properly yet. So they are still in the "empty" scratch orgs, but in an unusable state.
If the use case requires a role, it should be pushed into the scratch org in the form of source (aka. metadata).
We are working on an update to remove Roles completely from scratch orgs that contain no sample data to prevent this occurring in the future.
Repro
Follow the standard docs to create the scratch org but do NOT include any data or Roles:
Salesforce DX Setup Guide:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_intro.htm
Salesforce DX Developer Guide:
https://developer.salesforce.com/docs/atlas.en-us.208.0.sfdx_dev.meta/sfdx_dev/sfdx_dev_intro.htm
Salesforce DX CLI Reference Guide:
https://developer.salesforce.com/docs/atlas.en-us.208.0.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference.htm
Workaround
Contact Salesforce support and reference internal article 000321925 to have the issue resolved.
Reported By (68)



















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.