-
Notifications
You must be signed in to change notification settings - Fork 78
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
@salesforce/cli version 2.53.6 results BAD RESPONSE error #2984
Comments
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. |
Hello @sambit-diff 👋 It looks like you didn't include the full Salesforce CLI version information in your issue. A few more things to check:
Thank you! |
Those messages look like they are coming from your proxy. Going from CLI 2.51.6 to 2.53.6 shouldn't cause that. Are you 100% certain that those same errors only happen with 2.53.6 and not 2.51.6? Has anything else changed around proxy configuration in addition to the CLI update? I suggest running |
Hi @shetzel we are using proxy to deploy on Salesfroce sandboxes from self-hosted agents. I am 100% sure that the error started only by upgrading to 2.53.6 Since it was a major impact and development cycle stopped for 3 on-going projects, I only force downgraded the CLI version to 2.51.6 to resolve this - "npm install -g @salesforce/[email protected]" There was no other change to proxy or anything else. I can only run "sf doctor" tomorrow, and share further information. I doubt (please correct me if I am wrong) - could this be due to nvm version 22.2.0, might be version incompatible with @salesforce/[email protected] |
It's possible that NodeJS v22.2.0 and sf CLI v2.53.6 are not compatible. 22.2.0 is not an LTS version (yet). See https://nodejs.org/en/about/previous-releases Per NodeJS docs, "Production applications should only use Active LTS or Maintenance LTS releases." I would switch to using an LTS version of NodeJS. I will try to reproduce this with similar steps on v22.2.0 and CLI v2.53.6. |
@shetzel Salesforce CLI support team suggested to use NodeJS v22.2.0 with @salesforce/[email protected] to resolve below error Metadata API request failed: Cannot create property 'caller' on string 'incorrect header check' |
You should always use an LTS version of NodeJS with production apps. From this issue, the appropriate solution is still to use the LTS version of NodeJS, but definitely not v22.3.0 or higher since that caused the error you mentioned. I switched to NodeJS v22.2.0 and tried to reproduce what you are seeing and could not. I authed to an org with JWT, then ran I would ensure you have all the proxy env vars set (http_proxy, https_proxy, HTTP_PROXY, HTTPS_PROXY). |
@shetzel we have a new version 2.54.6 available for update. I will run "sf doctor" with this version and update, hopefully it would work. |
node v2-22-0 and cli v2-51-6.log @shetzel Please find the attached logs. Since both executions were done on same proxy, On latest version:
|
Based on those 2 logs, I think this is the key: "can access: https://appexchange.salesforce.com/services/data". It passes with v2.51.6 and fails with 2.54.6. That endpoint is used to get an API version when no other API version can be found in the environment. Without an API version the CLI falls back to use v50.0 rather than a current version. Is the As to why the same endpoint can't be accessed after a CLI version update, I have no idea. If everything else is the same it shouldn't matter. |
Do you have both uppercase and lowercase proxy env vars set? I.e., https_proxy, http_proxy, HTTPS_PROXY, and HTTP_PROXY. If so, are they set to the same value? |
We only have uppercase env variable set i.e., HTTPS_PROXY and HTTP_PROXY |
It shouldn't be mandatory, but it's not a bad idea to set them all. Some libraries prefer the lower case while others prefer the upper case. I'm curious what happens if you're using CLI v2.54.6 and set the lower case proxies as well as the upper case. |
@shetzel sure, I will give this a try after I get a 2h window from all project team, and get back to you. |
This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted. |
Summary
@salesforce/cli version was auto updated from 2.51.6 to 2.53.6 during the weekend, and since Monday we are getting below error:
The following command for sf project deploy start results below error:
Expected result
Authentication status resulted "Connected" using version 2.51.6
Actual result
Authentication status resulted "Bad Response" using version 2.53.6
System Information
We are using Azure CI CD pipeline for authentication and deploying to Salesforce, and pipeline agents are setup with below resources:
nvm install 22.2.0
npm install -g npm@latest
npm install -g @salesforce/cli
Please let me know if further information is required
The text was updated successfully, but these errors were encountered: