cli
cli copied to clipboard
sfdx force:org:status is throwing the error
sfdx force:org:status is throwing the issue
ERROR running force:org:status: MediaType of 'application/json,application/json' is not supported by this resource with new upgrade of sfdx-cli sfdx-cli/7.161.0.
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.
@RohitGagan16 would you mind posting the results of sfdx version --verbose
. Thanks in advance.
Droz2:~ tgagne$ sfdx version --verbose CLI Version : sfdx-cli/7.161.0
Architecture: darwin-x64
Node Version : node-v18.7.0
Plugin Version: @copado/copado-cli 1.1.15 @oclif/plugin-autocomplete 0.3.0 (core) @oclif/plugin-commands 1.3.0 (core) @oclif/plugin-help 3.3.1 (core) @oclif/plugin-not-found 1.2.6 (core) @oclif/plugin-plugins 1.10.11 (core) @oclif/plugin-update 1.5.0 (core) @oclif/plugin-warn-if-update-available 1.7.3 (core) @oclif/plugin-which 1.0.4 (core) @salesforce/sfdx-plugin-lwc-test 1.0.0 (core) alias 2.1.0 (core) apex 1.1.0 (core) auth 2.2.3 (core) community 2.0.0 (core) config 1.4.14 (core) custom-metadata 2.0.0 (core) data 2.0.4 (core) generator 2.0.2 (core) info 2.0.1 (core) limits 2.0.1 (core) org 2.0.5 (core) salesforce-alm 54.6.3 (core) schema 2.1.1 (core) sfdx-cli 7.161.0 (core) signups 1.2.0 (core) source 2.0.9 (core) telemetry 2.0.0 (core) templates 55.0.0 (core) trust 2.0.1 (core) user 2.1.0 (core) vlocityestools 0.22.14
OS and Version: Darwin 21.5.0
I confirmed it works locally and seems only to be an issue when ssh'd--even to localhost.
@tggagne thank you for the additional info. This may be a keychain issue in the ssh session. You can try this to confirm.
ssh <user>@localhost
security unlock-keychain -p "<keychain password>"
sfdx force:source:status ...
security lock-keychain
That lets it work. Thank you.
Does that mean there's a way to fix it? I'm unsure we want to unlock/lock the keychain with every invocation, or ask for a password.
But thanks--that does give me a work-around.
this is not working even with local for us. its the same issue, Further we are on windows agent
@RohitGagan16 I tried to reproduce this on Windows, but could not. Fresh install of sfdx-cli and a rather small set of source.
Could you run the command again, but this time with the --json
flag and then share the results?
sfdx version --verbose
CLI Version :
sfdx-cli/7.161.0
Architecture:
win32-x64
Node Version :
node-v16.16.0
Plugin Version:
@oclif/plugin-autocomplete 0.3.0 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.3.1 (core)
@oclif/plugin-not-found 1.2.6 (core)
@oclif/plugin-plugins 1.10.11 (core)
@oclif/plugin-update 1.5.0 (core)
@oclif/plugin-warn-if-update-available 1.7.3 (core)
@oclif/plugin-which 1.0.4 (core)
@salesforce/sfdx-plugin-lwc-test 1.0.0 (core)
alias 2.1.0 (core)
apex 1.1.0 (core)
auth 2.2.3 (core)
community 2.0.0 (core)
config 1.4.14 (core)
custom-metadata 2.0.0 (core)
data 2.0.4 (core)
generator 2.0.2 (core)
info 2.0.1 (core)
limits 2.0.1 (core)
org 2.0.5 (core)
salesforce-alm 54.6.3 (core)
schema 2.1.1 (core)
sfdx-cli 7.161.0 (core)
signups 1.2.0 (core)
source 2.0.9 (core)
telemetry 2.0.0 (core)
templates 55.0.0 (core)
trust 2.0.1 (core)
user 2.1.0 (core)
OS and Version:
Windows_NT 10.0.22000
Hi @peternhale see the response below. This is still not logged in.
Here is what is did. I used weblogin first with the follwing command sfdx force:auth:web:login -a ProductionOrg
and once this is successfully logged in. Then running the below command to loging to the sandbox via alias and via org status command
sfdx force:org:status -a rohit -n rohit -u ProductionOrg --json { "status": 1, "name": "UNSUPPORTED_MEDIA_TYPE", "message": "MediaType of 'application/json,application/json' is not supported by this resource", "exitCode": 1, "context": "OrgStatusCommand", "stack": "UNSUPPORTED_MEDIA_TYPE: MediaType of 'application/json,application/json' is not supported by this resource\n at Function.wrap (/Users/rohit.gagan.v/.local/share/sfdx/client/7.162.0-993aea6/node_modules/@salesforce/core/lib/sfError.js:61:25)\n at Org.sandboxSignupComplete (/Users/rohit.gagan.v/.local/share/sfdx/client/7.162.0-993aea6/node_modules/@salesforce/core/lib/org/org.js:1147:41)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async Object.poll (/Users/rohit.gagan.v/.local/share/sfdx/client/7.162.0-993aea6/node_modules/@salesforce/core/lib/org/org.js:1060:37)\n at async doPoll (/Users/rohit.gagan.v/.local/share/sfdx/client/7.162.0-993aea6/node_modules/@salesforce/core/lib/status/pollingClient.js:60:26)", "warnings": [], "commandName": "OrgStatusCommand" }
Please note that i updated to the latest sfdx 162.0 version however this issue is there in 161.0 version as well
@RohitGagan16 I'll ask one more favor. Run the failing command again with --loglevel debug
. But before you do that go to folders ~/.sf
and ~/.sfdx
and rename or remove files sf.log
and .sfdx.log
respectively. This will ease digging through a large file. This will give some additional info on how far one of the functions has reached. Just trying to narrow in on the actual call causing the error.
let me try on the windows system. i am unable to see these files on the mac
Commands run sfdx auth:web:login -a ProductionOrg
sfdx force:org:status -a rohit1 -n rohit1 -u ProductionOrg --loglevel debug
@peternhale attached the logs!! please note that sfdx.log is not updated after running this command but i added the file
any update on this issue? @peternhale
This was fixed in v7.177.1, see rel notes: https://github.com/forcedotcom/cli/tree/main/releasenotes/sfdx#71771-nov-17-2022