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

DeployingSettingsTimeout during "sfdx force:org:create" #1817

Closed
rhobkirkcertinia opened this issue Nov 22, 2022 · 5 comments
Closed

DeployingSettingsTimeout during "sfdx force:org:create" #1817

rhobkirkcertinia opened this issue Nov 22, 2022 · 5 comments
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue

Comments

@rhobkirkcertinia
Copy link

Summary

We've recently migrated to SFDX CLI 7.174.0 and have been intermittently seeing the following error during Scratch Org creation DeployingSettingsTimeout: The client has timed out. This timeout of 10 mins seems to be seperate to the "wait" timeout on the create command. More info under Additional Information below.

Unfortunately this is very intermittent, hence the lack of repro steps.

Expected result

Timeout should not occur during Scratch Org creation.

Actual result

Intermittent timeout occurs during sfdx force:org:create -w 300 ... with the error DeployingSettingsTimeout: The client has timed out.

System Information

  • bash / zsh
  • Linux / MacOS
"cliVersion": "sfdx-cli/7.174.0",
"nodeVersion": "node-v16.18.0",
"pluginVersions": [
  "@oclif/plugin-autocomplete 1.3.1 (core)",
  "@oclif/plugin-commands 2.2.0 (core)",
  "@oclif/plugin-help 5.1.14 (core)",
  "@oclif/plugin-not-found 2.3.3 (core)",
  "@oclif/plugin-plugins 2.1.1 (core)",
  "@oclif/plugin-update 3.0.2 (core)",
  "@oclif/plugin-version 1.1.2 (core)",
  "@oclif/plugin-warn-if-update-available 2.0.6 (core)",
  "@oclif/plugin-which 2.1.0 (core)",
  "alias 2.1.5 (core)",
  "apex 1.3.0 (core)",
  "auth 2.2.15 (core)",
  "community 2.0.10 (core)",
  "config 1.4.21 (core)",
  "custom-metadata 2.0.2 (core)",
  "data 2.1.4 (core)",
  "generator 2.0.7 (core)",
  "info 2.2.0 (core)",
  "limits 2.0.5 (core)",
  "org 2.2.9 (core)",
  "packaging 1.9.4 (core)",
  "schema 2.1.10 (core)",
  "signups 1.2.8 (core)",
  "source 2.0.25 (core)",
  "telemetry 2.0.2 (core)",
  "templates 55.1.0 (core)",
  "trust 2.0.4 (core)",
  "user 2.1.13 (core)",
  "@salesforce/sfdx-plugin-lwc-test 1.0.1 (core)",
  "salesforce-alm 54.8.3 (core)"
],
"shell": "zsh"

Additional information

This is the error that we see intermittently when running sfdx force:org:create:

status: 1,
name: 'DeployingSettingsTimeout',
message: 'The client has timed out.',
exitCode: 1,
context: 'Create',
stack: 'DeployingSettingsTimeout: The client has timed out.\n' +
  '    at PollingClient.subscribe (node_modules/@salesforce/core/lib/status/pollingClient.js:91:19)\n' +
  '    at async SettingsGenerator.deploySettingsViaFolder (node_modules/@salesforce/core/lib/org/scratchOrgSettingsGenerator.js:223:24)\n' +
  '    at async deploySettings (node_modules/@salesforce/core/lib/org/scratchOrgInfoApi.js:336:13)\n' +
  '    at async Promise.all (index 1)\n' +
  '    at async scratchOrgCreate (node_modules/@salesforce/core/lib/org/scratchOrgCreate.js:181:24)\n' +
  '    at async Create.createScratchOrg (node_modules/@salesforce/plugin-org/lib/commands/force/org/create.js:183:68)\n' +
  '    at async Create._run (node_modules/@salesforce/command/lib/sfdxCommand.js:102:40)\n' +
  '    at async Config.runCommand (node_modules/@oclif/core/lib/config/config.js:272:25)\n' +
  '    at async run (node_modules/@oclif/core/lib/main.js:76:5)',

This is not a consistent issue, so I can't really provide steps to reproduce, however on investigating a little further it appears that this timeout is to blame.

Would it be possible for this timeout to be controlled via an environment variable instead, or increased to say 20 mins?

For example the core package linked to above could do something like:

public async deploySettingsViaFolder(scratchOrg: Org, apiVersion: string): Promise<void> {

  // New env var
  const deploySettingsTimeoutMins = env.getNumber('SFDX_SCRATCH_ORG_DEPLOYSETTINGSTIMEOUT_MINS') || 10;

  const pollingOptions: PollingClient.Options = {
  async poll(): Promise<StatusResult> {
    ...
  },
  timeout: Duration.minutes(deploySettingsTimeoutMins),
  frequency: Duration.seconds(1),
  timeoutErrorName: 'DeployingSettingsTimeoutError',
};

Thanks!

@rhobkirkcertinia rhobkirkcertinia added the investigating We're actively investigating this issue label Nov 22, 2022
@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.

@peternhale
Copy link
Contributor

@rhobkirkffdc I will look into this, but one question. Have you tried the new command to create a scratch org, sf env create scratch?

@peternhale peternhale added the bug Issue or pull request that identifies or fixes a bug label Nov 22, 2022
@git2gus
Copy link

git2gus bot commented Nov 22, 2022

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

@rhobkirkcertinia
Copy link
Author

Thanks for the reply @peternhale

I've not tried that command yet to be honest. Couple of questions about it;

  • is it stable?
  • can we mix and match the SF CLI and SFDX CLI? i.e. use the SF CLI for spinning up orgs and the SFDX CLI for pushing, or would this require a wholesale switch?

@peternhale
Copy link
Contributor

@rhobkirkffdc sf and sfdx are complimentary. The command I mention is stable, however it is using the same library as org:create under the covers, so not sure it will solve this issue, hence the bug tag.

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
Projects
None yet
Development

No branches or pull requests

3 participants