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

Org login hangs on WSL2 #3135

Closed
5 tasks done
capog-bs opened this issue Dec 5, 2024 · 2 comments
Closed
5 tasks done

Org login hangs on WSL2 #3135

capog-bs opened this issue Dec 5, 2024 · 2 comments
Labels
investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@capog-bs
Copy link

capog-bs commented Dec 5, 2024

Note
Before you submit your issue, make sure that:

  • You're using the latest version of Salesforce CLI.
  • You've searched both open and closed issues for related posts.
  • You've used the doctor command to diagnose common issues.
  • You understand that GitHub Issues don't adhere to any agreement or SLA.
  • If you require immediate assistance, use official channels such as Salesforce Customer Support.

Summary

Performing a login via sf org login web --set-default-dev-hub --alias dev-hub command hangs on WSL2

Steps To Reproduce

  1. Install the CLI on WSL2 (Ubuntu 24.04.1 LTS)
cd /tmp
curl -o sf-linux-x64.tar.gz https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-linux-x64.tar.gz
tar xf sf-linux-x64.tar.gz
cp -r sf /usr/local/
export PATH=$PATH:/usr/local/sf/bin
  1. Log in

sf org login web --set-default-dev-hub --alias dev-hub

Expected result

Opens https://login.salesforce.com/ for an interactive browser login or at least prints an URL to open in a broser.

Actual result

Hangs with the following console output

mario:~$ sf org login web --set-default-dev-hub --alias dev-hub
(node:470) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

Workaround

Currently i am able to work around this by sf org login device --set-default-dev-hub --alias dev-hub

Things I tried, without success

Adding the --browser=firefox or --browser=chrome or flag. It still hangs with those.

System Information

Ubuntu 24.04.1 LTS
GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)
WSL version: 2.3.26.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.2314
{
  "versionDetail": {
    "architecture": "wsl-x64",
    "cliVersion": "@salesforce/cli/2.68.6",
    "nodeVersion": "node-v22.11.0",
    "osVersion": "Linux 5.15.167.4-microsoft-standard-WSL2",
    "rootPath": "/usr/local/sf",
    "shell": "bash",
    "pluginVersions": [
      "@oclif/plugin-autocomplete 3.2.10 (core)",
      "@oclif/plugin-commands 4.1.10 (core)",
      "@oclif/plugin-help 6.2.18 (core)",
      "@oclif/plugin-not-found 3.2.28 (core)",
      "@oclif/plugin-plugins 5.4.17 (core)",
      "@oclif/plugin-search 1.2.16 (core)",
      "@oclif/plugin-update 4.6.13 (core)",
      "@oclif/plugin-version 2.2.16 (core)",
      "@oclif/plugin-warn-if-update-available 3.1.23 (core)",
      "@oclif/plugin-which 3.2.19 (core)",
      "@salesforce/cli 2.68.6 (core)",
      "apex 3.6.3 (core)",
      "api 1.3.2 (core)",
      "auth 3.6.75 (core)",
      "data 3.11.4 (core)",
      "deploy-retrieve 3.15.13 (core)",
      "info 3.4.21 (core)",
      "limits 3.3.40 (core)",
      "marketplace 1.3.6 (core)",
      "org 5.2.4 (core)",
      "packaging 2.9.3 (core)",
      "schema 3.3.42 (core)",
      "settings 2.4.6 (core)",
      "sobject 1.4.46 (core)",
      "telemetry 3.6.23 (core)",
      "templates 56.3.30 (core)",
      "trust 3.7.43 (core)",
      "user 3.6.3 (core)"
    ]
  },
  "sfdxEnvVars": [],
  "sfEnvVars": [
    [
      "SF_BINPATH",
      "/usr/local/sf/bin/sf"
    ],
    [
      "SF_AUTOUPDATE_DISABLE",
      "true"
    ],
    [
      "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": "/usr/local/sf/bin/sf",
    "cacheDir": "/home/capog/.cache/sf",
    "channel": "stable",
    "configDir": "/home/capog/.config/sf",
    "dataDir": "/home/capog/.local/share/sf",
    "dirname": "sf",
    "flexibleTaxonomy": true,
    "home": "/home/capog",
    "isSingleCommandCLI": false,
    "name": "@salesforce/cli",
    "nsisCustomization": "scripts/nsis.nsi",
    "platform": "wsl",
    "root": "/usr/local/sf",
    "shell": "bash",
    "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": {
      "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 %>"
          }
        }
      },
      "node": {}
    },
    "userAgent": "@salesforce/cli/2.68.6 wsl-x64 node-v22.11.0",
    "valid": true,
    "version": "2.68.6",
    "warned": false,
    "windows": false,
    "_base": "@oclif/[email protected]",
    "_commands": {},
    "_topics": {},
    "commandPermutations": {
      "validPermutations": {}
    },
    "pluginLoader": {
      "options": {
        "root": "/usr/local/sf/dist"
      },
      "errors": [],
      "plugins": {},
      "pluginsProvided": false
    },
    "topicPermutations": {
      "validPermutations": {}
    },
    "nodeEngine": ">=18.6.0"
  },
  "pluginSpecificData": {
    "@salesforce/plugin-deploy-retrieve": [
      {}
    ]
  },
  "diagnosticResults": [
    {
      "testName": "salesforcedx plugin isn’t installed",
      "status": "pass"
    },
    {
      "testName": "you don't have any linked plugins",
      "status": "pass"
    },
    {
      "testName": "using latest or latest-rc CLI version",
      "status": "unknown"
    },
    {
      "testName": "[@salesforce/plugin-deploy-retrieve] sourceApiVersion matches 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://test.salesforce.com",
      "status": "pass"
    },
    {
      "testName": "can access: https://appexchange.salesforce.com/services/data",
      "status": "pass"
    },
    {
      "testName": "can access: https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-win32-x64-buildmanifest",
      "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.",
    "Couldn't determine latest CLI version due to:\n/bin/sh: 1: npm: not found\n",
    "Neither sourceApiVersion nor apiVersion are defined. The commands that deploy and retrieve source use the max apiVersion of the target org in this case. The issue isn't a problem, as long as it's the behavior you actually want.",
    "using npm registry https://registry.npmjs.org/ from npm config"
  ],
  "logFilePaths": [],
  "commandExitCode": 0
}
@capog-bs capog-bs added the investigating We're actively investigating this issue label Dec 5, 2024
@github-actions github-actions bot added the validated Version information for this issue has been validated label Dec 5, 2024
Copy link

github-actions bot commented Dec 5, 2024

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.

@mdonnalley
Copy link
Contributor

Closing this because we don't support WSL

Salesforce CLI works best within the native Windows command prompt (cmd.exe) and the Microsoft Windows PowerShell. We don’t recommend using Salesforce CLI with a Linux terminal emulator, such as Windows 10 Subsystem for Linux, cygwin, or MinGW, because support for bugs is limited.

https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm

@mdonnalley mdonnalley closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2024
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