LoginSignup
0
0

SFDX: Authorize Errorのまとめ

Last updated at Posted at 2023-08-30

SFDX: Authorize an Org failed to run

image.png

I found out that it was an issue with my DNS i flushed it out and it worked

SFDX: Authorize an Org does not open browser

最終的にはPCに管理者権限がなかったみたい。

My laptop is work laptop and IT policy doesn't allow user to be admin. I reached out to IT and asked for admin rights temporarily. Once they assigned me, I started VS Code as Admin.

And now when I authorize org or open org, Chrome browser opens and works as expected.

私のラップトップは仕事用のラップトップであり、IT ポリシーではユーザーが管理者になることを許可していません。 IT 部門に連絡を取り、一時的に管理者権限を求めました。彼らが私を割り当てた後、私は VS Code を管理者として開始しました。

そして、組織を承認するか、組織を開くと、Chrome ブラウザーが開き、期待どおりに動作するようになりました

他には

I have the same issue. Seems like VS Code is not able to open chrome when it's set as default. May be version incompatibility.
Anyways I solved it by making Microsoft Edge my default browser. Windows 10 ->Search-> Default Apps -> Web Browser -> Microsoft Edge.
I am yet to try if other DX commands work after the initial step of web:auth

https://github.com/forcedotcom/cli/issues/371

It looks to be resolvable by manually either uninstalling or installing the standalone auth plugin, I think.

https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A8b0DSAR

SFDX: Authorize an Org failed to run

image.png

Getting error while authorizing org through VS code

パスワード

image.png

Got past error by using steps mentioned here to authenticate a playground.

Authenticate Playground Section

https://trailhead.salesforce.com/en/content/learn/projects/quickstart-vscode-salesforce/use-vscode-for-salesforce

Deployed using Terminal to the connected playground
sfdx force:source:deploy -p force-app/main/default

Warning: Ignoring extra certs from null, load failed: error:80000002:system library::No such file or directory

Starting SFDX: Authorize an Org

14:21:00.710 sfdx org:login:web --alias vscodeOrg --instance-url https://login.salesforce.com --set-default

Warning: Ignoring extra certs from null, load failed: error:80000002:system library::No such file or directory

You acknowledge and agree that the CLI tool may collect usage information, user environment, and crash reports for the purposes of providing services or functions that are relevant to use of the CLI tool and product improvements.

Successfully authorized erdem.fatih.ib@erdem.fatih.ib with org ID 00DWT000000IXjt2AG

14:21:26.718 sfdx org:login:web --alias vscodeOrg --instance-url https://login.salesforce.com --set-default

ended with exit code 0

After trying many ways, I've solved the issue! The last method I did: First, I added the Salesforce CLI to the Windows %PATH, and then I also added it to the path of the Salesforce extension in Visual Studio Code. However, it still couldn't find the certificates. Later on, I downloaded them through the terminal command, not from Salesforce's official website (this might be a different approach due to setup). After adding them to %PATH again and integrating them into the Visual Studio Code extension, it worked! I'll post a proper update soon.

いろいろ試した結果、問題が解決しました!最後に行った方法: まず、Salesforce CLI を Windows %PATH に追加し、次にそれを Visual Studio Code の Salesforce 拡張機能のパスにも追加しました。ただし、それでも証明書は見つかりませんでした。その後、Salesforce の公式 Web サイトからではなく、ターミナル コマンドを使用してこれらをダウンロードしました (これはセットアップにより異なるアプローチになる可能性があります)。これらを再度 %PATH に追加し、Visual Studio Code 拡張機能に統合すると、機能しました。すぐに適切なアップデートを投稿します。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0