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

CLI infinite deploying #3185

Closed
viktor-saranchuk opened this issue Jan 20, 2025 · 5 comments
Closed

CLI infinite deploying #3185

viktor-saranchuk opened this issue Jan 20, 2025 · 5 comments
Labels
investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@viktor-saranchuk
Copy link

sf version: latest
@salesforce/cli/2.72.21 win32-x64 node-v22.12.0

Doctor says:
`=== Running all diagnostics

pass - salesforcedx plugin isn’t installed
pass - you don't have any linked plugins
pass - [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches apiVersion
warn - [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches default target org max apiVersion
pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org
pass - [@salesforce/plugin-trust] can ping: https://registry.yarnpkg.com
pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org/
pass - can access: https://test.salesforce.com
pass - can access: https://appexchange.salesforce.com/services/data
pass - can access: https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-win32-x64-buildmanifest
pass - using latest or latest-rc CLI version
fail - [@salesforce/plugin-auth] CLI supports v2 crypto
pass - [@salesforce/plugin-auth] CLI using stable v1 crypto

Wrote doctor diagnosis to: C:\Users\SARANVI1\Projects\Alcon\1737388595663-diagnosis.json

=== Suggestions

  • Check https://github.com/forcedotcom/cli/issues for CLI issues posted by the community.
  • Check http://status.salesforce.com for general Salesforce availability and performance.
  • The sourceApiVersion in sfdx-project.json doesn't match the max apiVersion of the default target org. As a result, you're not using the latest features available in API version 63.0. The version mismatch isn't a problem, as long as it's the behavior you actually want.
  • using npm registry https://registry.npmjs.org/ from npm config
  • Your current installation of Salesforce CLI, including all the plugins you've linked and installed, doesn't yet support v2 crypto. All plugins and libraries must use at least version 6.7.0 of @salesforce/core to support v2 crypto. You're generally still able to successfully authenticate with your current CLI installation, but not if you generate a v2 crypto key.`

trying to deploy source to Sandbox and it just does not end.
sf project deploy start -m Flow:<flow name>
in Setup > deployment status there is no deployment running

if I use sf project deploy start -m Flow:<flow name> -c
There is data about deployment is shows in terminal: time count, some details like deployment id
but still there is no deployment status

Image

if I use sf project deploy start -m Flow:<flow name> -c --dry-run
in the Terminal, I see the same, but in deployment status I can see successful validation. In terminal - infinite deployment.

Image

Image

Image

System Information

tried cmd, powershell, git bash

===================================================================================

Expected result

Metadata is deployed to sandbox with no issues

Actual result

Infinite deployment, Impossible to deploy components to Sandbox.

===============================================================

{
  "architecture": "win32-x64",
  "cliVersion": "@salesforce/cli/2.72.21",
  "nodeVersion": "node-v22.12.0",
  "osVersion": "Windows_NT 10.0.22631",
  "rootPath": "C:\\Users\\SARANVI1\\AppData\\Local\\sf\\client\\2.72.21-6a74781",
  "shell": "powershell",
  "pluginVersions": [
    "@copado/copado-cli 3.5.0 (user) published 63 days ago (Mon Nov 18 2024)",
    "@oclif/plugin-autocomplete 3.2.16 (core)",
    "@oclif/plugin-commands 4.1.15 (core)",
    "@oclif/plugin-help 6.2.20 (core)",
    "@oclif/plugin-not-found 3.2.33 (core)",
    "@oclif/plugin-plugins 5.4.24 (core)",
    "@oclif/plugin-search 1.2.17 (core)",
    "@oclif/plugin-update 4.6.21 (core)",
    "@oclif/plugin-version 2.2.19 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.29 (core)",
    "@oclif/plugin-which 3.2.23 (core)",
    "@salesforce/cli 2.72.21 (core)",
    "@salesforce/lwc-dev-mobile 2.3.0 (user) published 451 days ago (Thu Oct 26 2023)",
    "apex 3.6.8 (core)",
    "api 1.3.2 (core)",
    "auth 3.6.85 (core)",
    "data 4.0.1 (core)",
    "deploy-retrieve 3.17.0 (core)",
    "info 3.4.30 (core)",
    "lightning-dev 1.10.0 (user) published 31 days ago (Thu Dec 19 2024)",
    "limits 3.3.43 (core)",
    "marketplace 1.3.7 (core)",
    "org 5.2.16 (core)",
    "packaging 2.9.10 (core)",
    "schema 3.3.45 (core)",
    "settings 2.4.9 (core)",
    "sobject 1.4.48 (core)",
    "telemetry 3.6.29 (core)",
    "templates 56.3.34 (core)",
    "trust 3.7.53 (core)",
    "user 3.6.5 (core)"
  ]
}

doctors json

{
  "versionDetail": {
    "architecture": "win32-x64",
    "cliVersion": "@salesforce/cli/2.72.21",
    "nodeVersion": "node-v22.12.0",
    "osVersion": "Windows_NT 10.0.22631",
    "rootPath": "C:\\Users\\SARANVI1\\AppData\\Local\\sf\\client\\2.72.21-6a74781",
    "shell": "powershell",
    "pluginVersions": [
      "@copado/copado-cli 3.5.0 (user)",
      "@oclif/plugin-autocomplete 3.2.16 (core)",
      "@oclif/plugin-commands 4.1.15 (core)",
      "@oclif/plugin-help 6.2.20 (core)",
      "@oclif/plugin-not-found 3.2.33 (core)",
      "@oclif/plugin-plugins 5.4.24 (core)",
      "@oclif/plugin-search 1.2.17 (core)",
      "@oclif/plugin-update 4.6.21 (core)",
      "@oclif/plugin-version 2.2.19 (core)",
      "@oclif/plugin-warn-if-update-available 3.1.29 (core)",
      "@oclif/plugin-which 3.2.23 (core)",
      "@salesforce/cli 2.72.21 (core)",
      "@salesforce/lwc-dev-mobile 2.3.0 (user)",
      "apex 3.6.8 (core)",
      "api 1.3.2 (core)",
      "auth 3.6.85 (core)",
      "data 4.0.1 (core)",
      "deploy-retrieve 3.17.0 (core)",
      "info 3.4.30 (core)",
      "lightning-dev 1.10.0 (user)",
      "limits 3.3.43 (core)",
      "marketplace 1.3.7 (core)",
      "org 5.2.16 (core)",
      "packaging 2.9.10 (core)",
      "schema 3.3.45 (core)",
      "settings 2.4.9 (core)",
      "sobject 1.4.48 (core)",
      "telemetry 3.6.29 (core)",
      "templates 56.3.34 (core)",
      "trust 3.7.53 (core)",
      "user 3.6.5 (core)"
    ]
  },
  "sfdxEnvVars": [],
  "sfEnvVars": [
    [
      "SF_AUTOUPDATE_DISABLE",
      "true"
    ],
    [
      "SF_BINPATH",
      "C:\\Users\\SARANVI1\\AppData\\Local\\sf\\client\\bin\\sf"
    ],
    [
      "SF_DISABLE_AUTOUPDATE",
      "true"
    ],
    [
      "SF_UPDATE_INSTRUCTIONS",
      "Use \"npm update --global @salesforce/cli\" to update npm-based installations."
    ]
  ],
  "proxyEnvVars": [],
  "cliConfig": {
    "arch": "x64",
    "bin": "sf",
    "binAliases": [
      "sfdx"
    ],
    "binPath": "C:\\Users\\SARANVI1\\AppData\\Local\\sf\\client\\bin\\sf",
    "cacheDir": "C:\\Users\\SARANVI1\\AppData\\Local\\sf",
    "channel": "stable",
    "configDir": "C:\\Users\\SARANVI1\\AppData\\Local\\sf",
    "dataDir": "C:\\Users\\SARANVI1\\AppData\\Local\\sf",
    "dirname": "sf",
    "flexibleTaxonomy": true,
    "home": "C:\\Users\\SARANVI1",
    "isSingleCommandCLI": false,
    "name": "@salesforce/cli",
    "nsisCustomization": "scripts/nsis.nsi",
    "platform": "win32",
    "root": "C:\\Users\\SARANVI1\\AppData\\Local\\sf\\client\\2.72.21-6a74781",
    "shell": "powershell",
    "theme": {
      "bin": "blueBright",
      "command": "blueBright",
      "dollarSign": "green",
      "flag": "green",
      "flagDefaultValue": "blueBright",
      "flagOptions": "blueBright",
      "flagRequired": "red",
      "sectionHeader": "blue",
      "topic": "blueBright",
      "json": {
        "brace": "whiteBright",
        "bracket": "whiteBright",
        "comma": "green",
        "key": "blueBright",
        "string": "greenBright",
        "number": "blue",
        "boolean": "redBright",
        "null": "blackBright"
      }
    },
    "topicSeparator": " ",
    "updateConfig": {
      "node": {
        "options": [
          "--no-deprecation"
        ]
      },
      "s3": {
        "bucket": "dfc-data-production",
        "host": "https://developer.salesforce.com",
        "templates": {
          "target": {
            "baseDir": "<%- bin %>",
            "manifest": "<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- platform %>-<%- arch %>",
            "unversioned": "<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-<%- platform %>-<%- arch %><%- ext %>",
            "versioned": "<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %>-<%- platform %>-<%- arch %><%- ext %>"
          },
          "vanilla": {
            "baseDir": "<%- bin %>",
            "manifest": "<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %>version",
            "unversioned": "<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %><%- ext %>",
            "versioned": "<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %><%- ext %>"
          }
        }
      }
    },
    "userAgent": "@salesforce/cli/2.72.21 win32-x64 node-v22.12.0",
    "valid": true,
    "version": "2.72.21",
    "warned": false,
    "windows": true,
    "_base": "@oclif/core@4.2.2",
    "_commands": {},
    "_topics": {},
    "commandPermutations": {
      "validPermutations": {}
    },
    "pluginLoader": {
      "options": {
        "root": "C:\\Users\\SARANVI1\\AppData\\Local\\sf\\client\\2.72.21-6a74781\\dist"
      },
      "errors": [],
      "plugins": {},
      "pluginsProvided": false
    },
    "topicPermutations": {
      "validPermutations": {}
    },
    "nodeEngine": ">=18.6.0"
  },
  "pluginSpecificData": {
    "@salesforce/plugin-deploy-retrieve": [
      {
        "sourceApiVersion": "62.0",
        "targetOrgApiVersion": "63.0"
      }
    ],
    "@salesforce/plugin-auth": [
      {
        "isUsingGenericKeychain": true,
        "sfCryptoV2Support": false,
        "cryptoVersion": "v1"
      }
    ]
  },
  "diagnosticResults": [
    {
      "testName": "salesforcedx plugin isn’t installed",
      "status": "pass"
    },
    {
      "testName": "you don't have any linked plugins",
      "status": "pass"
    },
    {
      "testName": "[@salesforce/plugin-deploy-retrieve] sourceApiVersion matches apiVersion",
      "status": "pass"
    },
    {
      "testName": "[@salesforce/plugin-deploy-retrieve] sourceApiVersion matches default target org max apiVersion",
      "status": "warn"
    },
    {
      "testName": "[@salesforce/plugin-trust] can ping: https://registry.npmjs.org",
      "status": "pass"
    },
    {
      "testName": "[@salesforce/plugin-trust] can ping: https://registry.yarnpkg.com",
      "status": "pass"
    },
    {
      "testName": "[@salesforce/plugin-trust] can ping: https://registry.npmjs.org/",
      "status": "pass"
    },
    {
      "testName": "can access: https://appexchange.salesforce.com/services/data",
      "status": "pass"
    },
    {
      "testName": "can access: https://test.salesforce.com",
      "status": "pass"
    },
    {
      "testName": "can access: https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-win32-x64-buildmanifest",
      "status": "pass"
    },
    {
      "testName": "using latest or latest-rc CLI version",
      "status": "pass"
    },
    {
      "testName": "[@salesforce/plugin-auth] CLI supports v2 crypto",
      "status": "fail"
    },
    {
      "testName": "[@salesforce/plugin-auth] CLI using stable v1 crypto",
      "status": "pass"
    }
  ],
  "suggestions": [
    "Check https://github.com/forcedotcom/cli/issues for CLI issues posted by the community.",
    "Check http://status.salesforce.com for general Salesforce availability and performance.",
    "The sourceApiVersion in sfdx-project.json doesn't match the max apiVersion of the default target org. As a result, you're not using the latest features available in API version 63.0. The version mismatch isn't a problem, as long as it's the behavior you actually want.",
    "using npm registry https://registry.npmjs.org/ from npm config",
    "Your current installation of Salesforce CLI, including all the plugins you've linked and installed, doesn't yet support v2 crypto. All plugins and libraries must use at least version 6.7.0 of `@salesforce/core` to support v2 crypto. You're generally still able to successfully authenticate with your current CLI installation, but not if you generate a v2 crypto key."
  ],
  "logFilePaths": [],
  "commandExitCode": 0
}
@viktor-saranchuk viktor-saranchuk added the investigating We're actively investigating this issue label Jan 20, 2025
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.

@github-actions github-actions bot added the validated Version information for this issue has been validated label Jan 20, 2025
@cristiand391
Copy link
Member

cristiand391 commented Jan 20, 2025

Given you get a deploy ID I feel the answer is no, but any chance you enabled JWT-based access tokens in a custom connected app you use to auth to the CLI?
https://help.salesforce.com/s/articleView?id=xcloud.connected_app_enable_jwt.htm&type=5

These JWT-based tokens don't support APIs used for deploy/retrieve and cause and infinite loop (though not like the one you reported, it shouldn't even be able to create a deploy).

@viktor-saranchuk
Copy link
Author

hi @cristiand391 thank you for you reply. no the issue not in JWT.

I have a small updated. If I use -c key in the cli command, It is actually deployed, but cli keeps working and it is not stopping.
In the screenshot deployment took more than 2 minutes, also it took 2 minutes before I saw response in a terminal that invokation is started.

but the invocation keeps going

Image

@viktor-saranchuk
Copy link
Author

viktor-saranchuk commented Jan 21, 2025

first time deployment was successful and it ended in more than 5 mins

Image

and now again it is in progress

Image

Image

Image

Image

Image

@viktor-saranchuk
Copy link
Author

viktor-saranchuk commented Jan 21, 2025

okay, I believe it is source tracking makes it works almost forever.

sf org disable tracking
The issue can be closed

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

2 participants