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

auth:web:login --browser <name> hangs when the browser you try to use isn't installed #1830

Open
RodEsp opened this issue Nov 30, 2022 · 3 comments
Labels
bug Issue or pull request that identifies or fixes a bug

Comments

@RodEsp
Copy link
Contributor

RodEsp commented Nov 30, 2022

Summary

To resolve #1465, the --browser flag was added to the auth:web:login command but with it a bug was introduced that causes the command to hang when you try to use a browser that isn't installed.

Steps To Reproduce:

  1. Make sure you don't have either edge, chrome, or firefox installed.
  2. Run sfdx auth:web:login --browser <nameOfBrowserThatIsNotInstalled>

Expected result

The command should exit with an error saying the browser is not available or installed or something like that.

Actual result

The command just hangs indefinitely until the process is manually killed by the user.

System Information

  • Which shell/terminal are you using?
    Powershell 7, although I've seen this on bash too
  • Which version of the CLI are you using?
    This is happening with version 2.3.0 of plugin-auth
@RodEsp RodEsp added the investigating We're actively investigating this issue label Nov 30, 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.

@mshanemc
Copy link
Contributor

FYI: this is a bug in the open library that we use. It's not catching the error from the OS when the selected browser isn't installed. Even putting a timeout in the CLI doesn't work...the spawned process already returned (but with an error that's being swallowed).

This would need to be fixed in https://github.com/sindresorhus/open.

@mshanemc mshanemc added Not Possible Yet This could happen in the future, but can't happen yet. and removed investigating We're actively investigating this issue help wanted Help wanted to implement this issue labels Jun 17, 2024
@cristiand391 cristiand391 added bug Issue or pull request that identifies or fixes a bug and removed Not Possible Yet This could happen in the future, but can't happen yet. labels Mar 5, 2025
Copy link

git2gus bot commented Mar 5, 2025

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

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

Successfully merging a pull request may close this issue.

3 participants