Salesforce CLI を使用して組織に接続する際に、ネットワーク環境や設定が原因で「ECONNRESET」や「DomainNotFoundError」、「OAUTH_APPROCAL_ERROR_GENERIC」などのエラーが発生し、接続に失敗することがあります。
Salesforce CLI で組織への接続に失敗する場合、いくつかの原因が考えられます。まず、以下の一般的な確認事項をご確認ください。
■ 一般的な確認事項
Salesforce CLI のバージョンが最新であることを確認します。次のコマンドで更新できます。 sf update
ファイアウォールやプロキシが Salesforce CLI の通信をブロックしていないか、ネットワーク管理者に確認します。
ポート 1717 がローカルで解放されていることを確認します。Salesforce CLI は認証時にこのポートを使用します。
接続アプリケーション「Salesforce CLI」が接続先組織にてインストール済みかを確認します。
■ エラーメッセージ別の対処法
こちらで解決ができず、さらにエラーが出る場合は、以降の追加補足を参考にしてみてください。
「ECONNRESET」のエラーが発生する場合
プロキシ配下での設定方法の記事をご確認いただき、正しく設定ができているかをご確認ください。
「DomainNotFoundError: The org cannot be found」のエラーが発生する場合
「SF_DISABLE_DNS_CHECK」の環境変数を true にすることをお試しください。
「OAUTH_APPROCAL_ERROR_GENERIC」もしくは「AuthCodeExchangeError」のエラーが発生する場合
接続アプリケーション「Salesforce CLI」を接続先組織にてインストールしてください。 何らかの理由によりインストールが行えない場合には、「インストールされていない接続アプリケーションを承認」が付与されたユーザー様での認証をお試しください。
■上記で解決ができない場合は
サポートにお問い合わせをいただけますと、トラブルシューティングのご支援をさせていただくことが可能です。
(開発者サポートに該当しますため、Premier Success Plan 以上のサポート契約が必要となります)
サポートにお問い合わせをいただく場合には、以下の情報をご連携ください。
また、Salesforce CLI をインストールしているクライアント端末に起因してエラーが発生する場合、Agentforce Vibes (旧称: Code Builder) のご利用が代替手段になる可能性がございます。Agentforce Vibes はブラウザ上で VSCode 拡張の Salesforce CLI を動作させることができますため、インストール作業等は不要です。ブラウザで Salesforce をご利用いただけている場合は、特に追加のプロキシの設定は必要なくご利用いただける想定です。Agentforce Vibes に切り替えてご利用いただくこともご検討ください。
005227878

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.