Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed Settings deployment on Scratch Org Creation #2227

Closed
DougMidgley opened this issue Jun 17, 2023 · 3 comments
Closed

Failed Settings deployment on Scratch Org Creation #2227

DougMidgley opened this issue Jun 17, 2023 · 3 comments
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@DougMidgley
Copy link

Summary

Settings are failing to deploy and there is no information what is causing error, and we cannot easily access the org to see the details.

Steps To Reproduce

Create a scratch org with a large collection of settings as part of a scratch org definition file.

sfdx org:create:scratch -f config/shapeRepresentation.json --set-default --target-dev-hub $devHubAlias --alias $useralias --wait 30 --duration-days 7

Some settings are deprecated or not supported (for whatever reason).

Output is the following

Creating Scratch Org... \
RequestId: 2SR6N00000007gTWAQ (https://-eu.my.salesforce.com/2SR6N00000007gTWAQ)
OrgId: 00D8K0000002ntY
Username: test-
@example.com
✓ Prepare Request
✓ Send Request
✓ Wait For Org
✓ Available
Authenticate
Deploy Settings
Done
Error (1): A scratch org was created with username test-****@example.com, but the settings failed to deploy due to:
Not available for deploy for this organization
You do not have the level of access required to deploy this component.
Not available for deploy for this API version
Not available for deploy for this organization
Creating Scratch Org... done

We see 4 errors here but do not have any information around what is actually causing this.
When tracing logs, we can see what this is and settings can be removed which cause issues.
Additionally, when this happens, the alias is not set and the auth code has already been used so accessing the org is somewhere between hard and impossible.

Expected result

  • Settings clearly show what configuration was the issue (as is available in backend)
  • Alias is set as long as the scratch org is generated

Actual result

  • Setting deploy fail is unclear what is cause
  • Alias is not set, but auth code has already been used so cannot reuse for auth.

System Information

powershell

{
  "cliVersion": "sfdx-cli/7.205.6",
  "architecture": "win32-x64",
  "nodeVersion": "node-v19.8.1",
  "osVersion": "Windows_NT 10.0.22000",
  "shell": "cmd.exe",
  "rootPath": "C:\\Users\\***\\AppData\\Roaming\\npm\\node_modules\\sfdx-cli",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 2.3.0 (core)",
    "@oclif/plugin-commands 2.2.15 (core)",
    "@oclif/plugin-help 5.2.9 (core)",
    "@oclif/plugin-not-found 2.3.24 (core)",
    "@oclif/plugin-plugins 3.1.2 (core)",
    "@oclif/plugin-search 0.0.17 (core)",
    "@oclif/plugin-update 3.1.17 (core)",
    "@oclif/plugin-version 1.3.4 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.37 (core)",
    "@oclif/plugin-which 2.2.22 (core)",
    "apex 2.3.3 (core)",
    "auth 2.8.1 (core)",
    "community 2.3.1 (core)",
    "custom-metadata 2.1.25 (core)",
    "data 2.3.22 (core)",
    "deploy-retrieve 1.11.7 (core)",
    "info 2.6.19 (core)",
    "limits 2.3.18 (core)",
    "org 2.9.8 (core)",
    "packaging 1.19.0 (core)",
    "schema 2.3.12 (core)",
    "settings 1.4.11 (core)",
    "signups 1.4.21 (core)",
    "source 2.10.14 (core)",
    "telemetry 2.2.0 (core)",
    "templates 55.4.20 (core)",
    "trust 2.4.20 (core)",
    "user 2.3.17 (core)",
    "@salesforce/sfdx-scanner 3.11.0 (user)",
    "sfdx-cli 7.205.6 (core)",
    "sfdx-git-delta 5.18.0 (user)",
    "sfdx-hardis 3.14.2 (user)",
    "sfpowerkit 6.1.0 (user)"
  ]
}

Additional information

@DougMidgley DougMidgley added the investigating We're actively investigating this issue label Jun 17, 2023
@github-actions github-actions bot added the validated Version information for this issue has been validated label Jun 17, 2023
@github-actions
Copy link

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.

@mshanemc mshanemc added the bug Issue or pull request that identifies or fixes a bug label Jun 20, 2023
@git2gus
Copy link

git2gus bot commented Jun 20, 2023

This issue has been linked to a new work item: W-13628477

@shetzel
Copy link
Contributor

shetzel commented Jul 6, 2023

This is now in the latest CLIs: sfdx 7.208.10 / sf 1.85.8

@shetzel shetzel closed this as completed Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

3 participants