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

Unable to authorize an org #2608

Closed
nkl14 opened this issue Oct 26, 2023 · 27 comments
Closed

Unable to authorize an org #2608

nkl14 opened this issue Oct 26, 2023 · 27 comments
Labels
more information required Issue requires more information or a response from the customer

Comments

@nkl14
Copy link

nkl14 commented Oct 26, 2023

Summary

I GET BELOW ERROR WHEN I TRY TO AUTHORISE ORG
TypeError: shellPath.at is not a function

Steps To Reproduce:

  1. CREATE A PROJECT WITH MANIFEST
  2. AUTHORIZE AN ORG

Expected result

It should have redirected to a web page to authorise an org

Actual result

Getting below error
TypeError: shellPath.at is not a function

Additional information

image

Salesforce Extension Version in VS Code: 59.1.2

SFDX CLI Version: 2.14.6

OS and version: mac OS Ventura 13.5

VS Code version: 1.83

@CristiCanizales
Copy link

Hi @nkl14, could you please open your command palette, run Developer: Show Running Extensions and send me a screenshot?

@CristiCanizales CristiCanizales added the more information required Issue requires more information or a response from the customer label Oct 26, 2023
@nkl14
Copy link
Author

nkl14 commented Oct 30, 2023

image

@CristiCanizales
Copy link

Hi @nkl14 sorry for the delay. Can you open the command palette and run SFDX: Log Out from All Authorized Orgs, then delete .sf/.sfdx folder, restart vscode and try again?

@daphne-sfdc
Copy link

Hi @nkl14,

There looks like a mismatch between your extensions version and the CLI command in the Output panel. Please try the following steps to get your extensions to a clean state:

  1. Open up a new Terminal window and type cd .vscode/extensions
  2. Delete all the previous versions of the Salesforce extensions by running rm -rf salesforce.salesforcedx-vscode*
  3. Reinstall the Salesforce extensions.
  4. Follow as @CristiCanizales posted above to clean the cache and try again.

Let me know if this solves your issue.

@nkl14
Copy link
Author

nkl14 commented Nov 1, 2023

hi both, I am afraid none of this solves my issue

@daphne-sfdc
Copy link

Hi @nkl14,
Can I see your logs? To get the logs, run "Developer: Toggle Developer Tools" from the command palette and go to the Console tab.

@nkl14
Copy link
Author

nkl14 commented Nov 2, 2023

Screenshot 2023-11-02 at 15 08 46

@daphne-sfdc
Copy link

Hmm, it's the same thing repeated over and over again. Is there anything above that? What's the 3 warnings and 1 issue?

@nkl14
Copy link
Author

nkl14 commented Nov 2, 2023

image

@daphne-sfdc
Copy link

Can you please try restarting your computer? If that still doesn't resolve the issue, let me bring the issue to my team to review.

@nkl14
Copy link
Author

nkl14 commented Nov 2, 2023

I restarted my system thrice as I thought it would solve but unfortunately it didnt

@daphne-sfdc
Copy link

Ok thanks for letting me know. Let me see what suggestions my team has.

@daphne-sfdc
Copy link

Hi @nkl14,
Two things:

  1. Can you run both sfdx --version and sf --version and send me the results?
  2. Try authorizing your org using the CLI. sf org login web and then setting the org you logged into as your default org. Does that work for you?

Copy link

This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted.

@github-actions github-actions bot added the stale label Nov 11, 2023
@daphne-sfdc
Copy link

Hi @nkl14, I'm assuming this issue has been resolved and am closing it as completed. Feel free to reopen if you're still experiencing issues. Thanks!

@nkl14
Copy link
Author

nkl14 commented Nov 27, 2023

Hi @daphne-sfdc, I have been on holidays hence couldnt respond. I still get the same error.
TypeError: shellPath.at is not a function

@daphne-sfdc daphne-sfdc reopened this Nov 28, 2023
@daphne-sfdc
Copy link

daphne-sfdc commented Nov 28, 2023

Hi @nkl14, Can you run sfdx --version and sf --version and send me the results of both commands? Based on your initial screenshot, I suspect you might have both SFDX v7 and SF v2 installed and would like to confirm if that's true.

Please also make sure you have the latest version of our extensions: v59.5.1.

@github-actions github-actions bot removed the stale label Nov 29, 2023
@nkl14
Copy link
Author

nkl14 commented Dec 1, 2023

image

@nkl14
Copy link
Author

nkl14 commented Dec 1, 2023

I am not sure what has gone wrong while updating cli that none of sf commands work for me

@daphne-sfdc
Copy link

Oh... so this is an issue with the CLI, not with the way the extensions are using the CLI. In that case, I would uninstall and reinstall the CLI. I don't know if you installed the CLI using the installer or using npm, or what CLI version you are using, so follow the link and do both the "macOS or Linux" section and the "npm" section. (Uninstall both sfdx v7 and sf v1/v2 for npm.). Uninstall instructions here: https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_uninstall.htm

Then reinstall the CLI using the installer at this link: https://developer.salesforce.com/tools/salesforcecli

Copy link

This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted.

@github-actions github-actions bot added the stale label Dec 10, 2023
@nkl14
Copy link
Author

nkl14 commented Dec 11, 2023

image I still get same error

@github-actions github-actions bot removed the stale label Dec 12, 2023
@daphne-sfdc
Copy link

@nkl14 Given that reinstalling the CLI does not solve the issue and the issue is also present when you run directly from the command line, I'm going to transfer the issue to the CLI team. Hopefully they will be able to help you identify and resolve the problem. Good luck!

@daphne-sfdc daphne-sfdc transferred this issue from forcedotcom/salesforcedx-vscode Dec 14, 2023
@CristiCanizales
Copy link

Hi @nkl14!
would you mind checking the vscode setting NODE_EXTRA_CA_CERTS? both for user and workspace
image

Copy link

Hello @nkl14 👋 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!

Copy link

github-actions bot commented Jan 4, 2024

This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted.

@cristiand391
Copy link
Member

cristiand391 commented Jan 4, 2024

Hey, sorry for the late reply, CLI team was mostly out in the last 2 weeks.

TypeError: shellPath.at is not a function

That's coming from oclif (CLI framework we use):
https://github.com/search?q=org%3Aoclif%20%2FshellPath%5C.at%5C(%2F&type=code

The Array.at method was added in node 16, so you are probably on a lower node version when running the CLI.

If you installed from npm, make sure to update to latest node LTS, or use the installers which includes its own node binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more information required Issue requires more information or a response from the customer
Projects
None yet
Development

No branches or pull requests

4 participants