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

The "sf org open" command from VSCODE connected to WSL2 does not work #2677

Closed
NerioVillalobos opened this issue Jan 30, 2024 · 7 comments
Closed
Labels
bug Issue or pull request that identifies or fixes a bug validated Version information for this issue has been validated wontfix We won't work on this issue

Comments

@NerioVillalobos
Copy link

NerioVillalobos commented Jan 30, 2024

Summary

I use VSCODE and I connect it with a WSL Ubuntu instance where I have sf-cli installed and that way I use all the functionalities of sf-cli from WSL, I recently received a Windows update via Windows update and I updated the WSL using " wsl --update", from that moment on, when I try to use the "sf org open" command, it does not open the browse with the required org, it only shows me the browse with this url: https://tmp/

Steps To Reproduce

  • On Windows
  • Open VSCODE
  • On VSCODE connect WSL instance
  • Open folder with SF project
  • Open Terminal on VSCODE
  • In the bash terminal of the wsl Ubuntu instance, type the command sf org open

Expected result

The browser is expected to open with the salesforce default org that is configured

Actual result

Sometimes it opens the browser with the url https://tmp/ and on other occasions it simply does nothing, even though it informs the terminal that it is carrying out the opening process.

System Information

My Version of Salesforce CLI: @salesforce/cli/2.25.7 wsl-x64 node-v21.2.0
My Version of VSCODE: 1.85.2 (user setup) / OS: Windows_NT x64 10.0.22631
My Windows Version: Windows 11 Pro 23H2 22631.3085
WSL version: WSL version: 2.0.14.0 / Windows version: 10.0.22631.3085

Additional information

nervill@DESKTOP-L91RLI8:~/DevOps$ sf org open
Opening org 00D52000000JP1DEAW as user [email protected]
Waiting to resolve the Lightning Experience-enabled custom domain...... done

@NerioVillalobos NerioVillalobos added the investigating We're actively investigating this issue label Jan 30, 2024
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.

Copy link

Hello @NerioVillalobos 👋 It looks like you didn't include the full Salesforce CLI version information in your issue.
Please provide the output of version --verbose --json for the CLI you're using (sf or sfdx).

A few more things to check:

  • Make sure you've provided detailed steps to reproduce your issue.
    • A repository that clearly demonstrates the bug is ideal.
  • Make sure you've installed the latest version of Salesforce CLI. (docs)
    • Better yet, try the rc or nightly versions. (docs)
  • Try running the doctor command to diagnose common issues.
  • Search GitHub for existing related issues.

Thank you!

@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 Jan 30, 2024
@NerioVillalobos
Copy link
Author

{
"architecture": "wsl-x64",
"cliVersion": "@salesforce/cli/2.25.7",
"nodeVersion": "node-v21.2.0",
"osVersion": "Linux 5.15.133.1-microsoft-standard-WSL2",
"rootPath": "/home/nervill/.nvm/versions/node/v21.2.0/lib/node_modules/@salesforce/cli",
"shell": "bash",
"pluginVersions": [
"@copado/copado-cli 3.0.0 (user)",
"@oclif/plugin-autocomplete 3.0.5 (core)",
"@oclif/plugin-commands 3.1.1 (core)",
"@oclif/plugin-help 6.0.12 (core)",
"@oclif/plugin-not-found 3.0.9 (core)",
"@oclif/plugin-plugins 4.1.17 (core)",
"@oclif/plugin-search 1.0.12 (core)",
"@oclif/plugin-update 4.1.8 (core)",
"@oclif/plugin-version 2.0.11 (core)",
"@oclif/plugin-warn-if-update-available 3.0.9 (core)",
"@oclif/plugin-which 3.0.15 (core)",
"@salesforce/cli 2.25.7 (core)",
"apex 3.0.18 (core)",
"auth 3.3.2 (core)",
"community 2.3.10 (user)",
"data 3.0.16 (core)",
"deploy-retrieve 3.2.0 (core)",
"env 3.0.6 (user)",
"info 3.0.17 (core)",
"limits 3.1.4 (core)",
"marketplace 1.0.16 (core)",
"org 3.3.5 (core)",
"packaging 2.1.4 (user)",
"schema 3.1.0 (core)",
"settings 2.0.17 (core)",
"sobject 1.1.2 (core)",
"source 3.1.5 (core)",
"telemetry 3.1.10 (core)",
"templates 56.0.10 (core)",
"trust 3.3.2 (core)",
"user 3.2.3 (core)",
"sfdmu 4.32.2 (user)",
"sfdx-essentials 2.12.0 (user)",
"sfdx-git-delta 5.34.0 (user)",
"sfdx-hardis 4.26.0 (user)",
"sfdx-plugin-source-read 1.2.0 (user)",
"texei-sfdx-plugin 2.2.4 (user)"
]
}

@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 Jan 30, 2024
@mshanemc
Copy link
Contributor

Reminder that WSL isn't supported (we don't replicate those bugs, don't run tests in that environment, etc). On windows, cmd.exe and powershell are well-used, so it's "best efforts, hope it works". So I'm going to close the issue.

First, make sure you can replicate this with only sf org open and without using vscode, just to reduce the problem space.

If you're interested in doing some debugging and contributing a fix that'll help other WSL users without breaking anyone else, we're happy to take a PR.

Under the hood, we're using this library https://github.com/sindresorhus/open. If that isn't working correctly for WSL2, you may need to wait for a fix there.

We also do a check using isWSL here to give the browser extra time.

If the "sometimes it works, sometimes it doesn't" is related to that, you could try adding more time there (and verifying that it's getting the correct answers for the environment).

@mshanemc mshanemc added wontfix We won't work on this issue and removed investigating We're actively investigating this issue labels Jan 30, 2024
@NerioVillalobos
Copy link
Author

NerioVillalobos commented Jan 31, 2024

Hi,

With pleasure, I am willing to help, but you would have to tell me what you need, at this moment perform the test by closing the vscode and executing the command directly from the wsl2 terminal, performing the procedure in this way

nervill@DESKTOP-L91RLI8:$ sf org open --target-org Copadotrial-Produccion
Opening org 00DHu000002iyJVMAY as user [email protected]
Waiting to resolve the Lightning Experience-enabled custom domain...... done
nervill@DESKTOP-L91RLI8:
$

and I didn't have any response

attached image of what was done

image

Forcing the command with the browser option I get the following result

and it looks like this
image

This can help you detect the error or what you would need to help you detect the error, tell me what you want me to do and I will be happy to do it.

@nrakuyama
Copy link

@NerioVillalobos @mshanemc
Hi, I had the same problem and fixed plugin-org.
Could you check this PR?
salesforcecli/plugin-org#962

@iowillhoit iowillhoit added the bug Issue or pull request that identifies or fixes a bug label Mar 18, 2024
Copy link

git2gus bot commented Mar 18, 2024

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

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 validated Version information for this issue has been validated wontfix We won't work on this issue
Projects
None yet
Development

No branches or pull requests

4 participants