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

Issues creating scratch orgs in sf org create scratch #2394

Closed
sf-erush opened this issue Aug 3, 2023 · 6 comments
Closed

Issues creating scratch orgs in sf org create scratch #2394

sf-erush opened this issue Aug 3, 2023 · 6 comments
Labels
investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@sf-erush
Copy link

sf-erush commented Aug 3, 2023

Summary

We are seeing issues starting yesterday when creating scratch orgs locally and in our integration pipelines. See error below.

sf version @salesforce/cli/2.0.2 darwin-arm64 node-v19.2.0

We are seeing issues creating scratch orgs with our devhub since yesterday. We have a pretty basic setup on a connected app and certificate keys (followed the documentation here)

Steps To Reproduce

FYI - We are using this out of a already existing 2GP manage package repo connected to our devhub org.
Set up a devhub
Set up a connected app with RSA keys
Get connected app consumer key
Create a scratch definition file
Run sf org login jwt cmd to auth to devhub. (this is succesful)
Run sf org create scratch -a jwtTest -y 1 -f default.definition.json. to create a scratch org (this fails)

  "code": 1,
  "actions": [
    "See https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_error_codes.htm for information on error code C-1016."
  ],
  "context": "EnvCreateScratch",
  "commandName": "EnvCreateScratch",
  "data": {
    "username": "[email protected]",
    "orgId": "00D80000000ctx5EAA",
    "scratchOrgInfoId": "2SRPD00000008jx4AA"
  },
  "message": "We encountered a problem while attempting to configure and approve the Connected App for your org. Verify the Connected App configuration with your Salesforce admin.",
  "name": "RemoteOrgSignupFailed",
  "status": 1,
  "stack": "RemoteOrgSignupFailed: We encountered a problem while attempting to configure and approve the Connected App for your org. Verify the Connected App configuration with your Salesforce admin.\n    at checkScratchOrgInfoForErrors (/opt/homebrew/lib/node_modules/@salesforce/cli/node_modules/@salesforce/core/lib/org/scratchOrgErrorCodes.js:62:19)\n    at async pollForScratchOrgInfo (/opt/homebrew/lib/node_modules/@salesforce/cli/node_modules/@salesforce/core/lib/org/scratchOrgInfoApi.js:303:16)\n    at async scratchOrgCreate (/opt/homebrew/lib/node_modules/@salesforce/cli/node_modules/@salesforce/core/lib/org/scratchOrgCreate.js:160:17)\n    at async EnvCreateScratch.run (/opt/homebrew/lib/node_modules/@salesforce/cli/node_modules/@salesforce/plugin-org/lib/commands/org/create/scratch.js:39:72)\n    at async EnvCreateScratch._run (/opt/homebrew/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/command.js:117:22)\n    at async Config.runCommand (/opt/homebrew/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/config/config.js:329:25)\n    at async run (/opt/homebrew/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/main.js:89:16)",
  "exitCode": 1,
  "warnings": []
}```

### Expected result
Scratch Orgs Created

### Actual result
Getting Error

### System Information
mac terminal zsh or Jenkins sh script
```{
  "cliVersion": "@salesforce/cli/2.2.7",
  "architecture": "darwin-arm64",
  "nodeVersion": "node-v19.2.0",
  "osVersion": "Darwin 22.6.0",
  "shell": "zsh",
  "rootPath": "/opt/homebrew/lib/node_modules/@salesforce/cli",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 2.3.3 (core)",
    "@oclif/plugin-commands 2.2.20 (core)",
    "@oclif/plugin-help 5.2.14 (core)",
    "@oclif/plugin-not-found 2.3.34 (core)",
    "@oclif/plugin-plugins 3.1.8 (core)",
    "@oclif/plugin-search 0.0.21 (core)",
    "@oclif/plugin-update 3.1.28 (core)",
    "@oclif/plugin-version 1.3.7 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.45 (core)",
    "@oclif/plugin-which 2.2.27 (core)",
    "@salesforce/cli 2.2.7 (core)",
    "apex 2.3.8 (core)",
    "auth 2.8.9 (core)",
    "data 2.5.3 (core)",
    "deploy-retrieve 1.16.3 (core)",
    "info 2.6.32 (core)",
    "limits 2.3.27 (core)",
    "login 1.2.22 (core)",
    "org 2.9.27 (core)",
    "packaging 1.16.8 (user)",
    "schema 2.3.21 (core)",
    "settings 1.4.21 (core)",
    "sobject 0.1.40 (core)",
    "source 2.10.27 (core)",
    "telemetry 2.2.3 (core)",
    "templates 55.5.7 (core)",
    "trust 2.4.34 (core)",
    "user 2.3.27 (core)"
  ]
}
@sf-erush sf-erush added the investigating We're actively investigating this issue label Aug 3, 2023
@github-actions
Copy link

github-actions bot commented Aug 3, 2023

Hello @sf-erush 👋 None of the versions of sf you shared match the latest release.

Shared: 2.0.2, 2.0.2
Latest: 2.2.7

Update to the latest version of Salesforce CLI (docs) and confirm that you're still seeing your issue.
You can also try the rc and nightly releases! (docs)

After updating, share the full output of sf version --verbose --json

@github-actions github-actions bot added more information required Issue requires more information or a response from the customer and removed investigating We're actively investigating this issue labels Aug 3, 2023
@github-actions
Copy link

github-actions bot commented Aug 3, 2023

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.

@github-actions github-actions bot added investigating We're actively investigating this issue validated Version information for this issue has been validated and removed more information required Issue requires more information or a response from the customer labels Aug 3, 2023
@sf-erush
Copy link
Author

sf-erush commented Aug 3, 2023

  "cliVersion": "@salesforce/cli/2.2.7",
  "architecture": "darwin-arm64",
  "nodeVersion": "node-v19.2.0",
  "osVersion": "Darwin 22.6.0",
  "shell": "zsh",
  "rootPath": "/opt/homebrew/lib/node_modules/@salesforce/cli",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 2.3.3 (core)",
    "@oclif/plugin-commands 2.2.20 (core)",
    "@oclif/plugin-help 5.2.14 (core)",
    "@oclif/plugin-not-found 2.3.34 (core)",
    "@oclif/plugin-plugins 3.1.8 (core)",
    "@oclif/plugin-search 0.0.21 (core)",
    "@oclif/plugin-update 3.1.28 (core)",
    "@oclif/plugin-version 1.3.7 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.45 (core)",
    "@oclif/plugin-which 2.2.27 (core)",
    "@salesforce/cli 2.2.7 (core)",
    "apex 2.3.8 (core)",
    "auth 2.8.9 (core)",
    "data 2.5.3 (core)",
    "deploy-retrieve 1.16.3 (core)",
    "info 2.6.32 (core)",
    "limits 2.3.27 (core)",
    "login 1.2.22 (core)",
    "org 2.9.27 (core)",
    "packaging 1.16.8 (user)",
    "schema 2.3.21 (core)",
    "settings 1.4.21 (core)",
    "sobject 0.1.40 (core)",
    "source 2.10.27 (core)",
    "telemetry 2.2.3 (core)",
    "templates 55.5.7 (core)",
    "trust 2.4.34 (core)",
    "user 2.3.27 (core)"
  ]
}```

@sf-erush
Copy link
Author

sf-erush commented Aug 3, 2023

Still seeing same issue once updating to latest cli version.

@sf-bbagley
Copy link

sf-bbagley commented Aug 4, 2023

Followed up this morning with more testing and wanted to share some results

  1. sf org login jwt
  • used our connected app
  • Successful auth
  • Scratch org fails creation
  1. /services/oauth2/token to get access token
  • used our same connected app
  • successful token retrieval
  • used sf org login access-token
  • Scratch org creation successful

Leads me to believe perhaps something is going on with the JWT sfdx flow.

@cristiand391
Copy link
Member

I see in the internal Slack thread that this might be related to an expired connected app, please let me know us know if that's not the case.

@cristiand391 cristiand391 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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