0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

sfdx SFDX_JSON_TO_STDOUT

Last updated at Posted at 2023-07-19

これはSF(v2)の移行時の問題かな?

1つの正解

18:06:18.15 sfdx force:auth:web:login --setalias myDevOrg --instanceurl https://login.salesforce.com --setdefaultusername

(node:30340) Warning: Deprecated environment variable: SFDX_JSON_TO_STDOUT. Please use SF_JSON_TO_STDOUT instead.
(Use node --trace-warnings ... to show where the warning was created)
Warning: The "force auth web login" command has been deprecated. Use "org login web" instead.
Warning: The "--setalias" flag has been deprecated. Use "--alias | -a" instead.
Warning: The "--instanceurl" flag has been deprecated. Use "--instance-url | -r" instead.
Warning: The "--setdefaultusername" flag has been deprecated. Use "--set-default | -s" instead.
Error (1): spawn UNKNOWN
18:06:20.765 sfdx force:auth:web:login --setalias myDevOrg --instanceurl https://login.salesforce.com --setdefaultusername
ended with exit code 1

I finally found the answer. it was because of my company security policy.

For your references :
If your organization limits the system environment variable, you may try below.

System properties > Environment Variables > System Variables. Click "New".

Variable name : NODE_TLS_REJECT_UNAUTHORIZED
Variable value : 0

1つめ

(node:10496) Warning: Deprecated environment variable: SFDX_JSON_TO_STDOUT. Please use SF_JSON_TO_STDOUT instead.
(Use node --trace-warnings ... to show where the warning was created)
Warning: The "force auth web login" command has been deprecated. Use "org login web" instead. Warning: The "--setalias" flag has been deprecated. Use "--alias | -a" instead. Warning: The "--instanceurl" flag has been deprecated. Use "--instance-url | -r" instead. Warning: The "--setdefaultusername" flag has been deprecated. Use "--set-default | -s" instead. Error (1): spawn UNKNOWN 11:55:21.214 sfdx force:auth:web:login --setalias vscodeOrg --instanceurl https://login.salesforce.com --setdefaultusername ended with exit code 1

I was recently experiencing this. I did an sfdx update and then reauthed my org.

$ sfdx force:auth:web:login --setalias my-super-awesome-alias --instanceurl https://test.salesforce.com --setdefaultusername

https://salesforce.stackexchange.com/questions/403778/sfdx-authorize-an-org-failed-to-run

2つめ

Please check this article.

SFDX_JSON_TO_STDOUT

Sends messages when Salesforce CLI commands fail to stdout instead of stderr. Setting this environment variable to true is helpful for scripting use cases.

Example:

SFDX_JSON_TO_STDOUT=true

3つめ

16:08:35.733 sfdx force:auth:web:login --setalias vscodeOrg --instanceurl https://login.salesforce.com --setdefaultusername

(node:14117) Warning: Deprecated environment variable: SFDX_JSON_TO_STDOUT. Please use SF_JSON_TO_STDOUT instead.
(Use node --trace-warnings ... to show where the warning was created)
Warning: The "force auth web login" command has been deprecated. Use "org login web" instead.
Warning: The "--setalias" flag has been deprecated. Use "--alias | -a" instead.
Warning: The "--instanceurl" flag has been deprecated. Use "--instance-url | -r" instead.
Warning: The "--setdefaultusername" flag has been deprecated. Use "--set-default | -s" instead.
Error (1): Invalid client credentials. Verify the OAuth client secret and ID. Error authenticating with auth code due to: request to https://login.salesforce.com//services/oauth2/token failed, reason: connect ETIMEDOUT 13.110.249.224:443

16:11:07.451 sfdx force:auth:web:login --setalias vscodeOrg --instanceurl https://login.salesforce.com --setdefaultusername

ended with exit code 1

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?