How to resolve the error: Read Econnreset unable to retrieve components in VS Code?
In VS Code, I performed these steps:
Ran the command 'SFDX: Create Project with Manifest'.
Ran the command 'SFDX: Authorise an Org' and authorised the org.
Right-clicked the package.xml file and clicked ' SFDX: Retrieve Source in Manifest from Org'.
After step 3 was completed, the output displayed this-
Starting SFDX: Retrieve Source from Org
read ECONNRESET
I tried by changing the version in package.xml from 51.0 to 50.0 and retrieving a single helper class from package.xml and also I removed other components from package.xml in case there is a large number of files, creating this issue. Also I restarted the vscode after the changes I made but that also didn't work.
If anyone has another approach or resolution apart from whatever I already tried please help.
To resolve the error: Read Econnreset unable to retrieve components in VS Code: Please check if you are behind a proxy while using VPN. If yes, update your proxy settings in VS Code. In VS Code, navigate to (Or simply press Ctrl+,)
File > Preferences > Settings
Then under the
User tab, navigate to Application > Proxy
Add your proxy setting in the field there. Port Number will be 8080 in most cases.
Example: http://proxy-XY.COMPANY.com:PORTNUMBER
Then make sure Proxy Strict SSL is unchecked. (You will find it right below the above Proxy input field).
Then make sure the same proxy values are added in your machine.
Start > Edit the System Environment Variables > (Advanced) > Environment Variables.
Add the Variable as HTTP_PROXY and Value as http://proxy-XY.COMPANY.com:PORTNUMBER in User Variables.
In some cases, you might have to add another Variable as HTTPS_PROXY and Value as https://proxy-XY.COMPANY.com:PORTNUMBER also the same as above in your system alone.
Then update your SFDX version to the latest version possible. For this, just launch your command prompt and then type sfdc update. Once it is updated, try restarting your VS Code (your system also if possible) and it should work as expected.
The same steps will work when you get any of the below errors
Client network socket disconnected before secure TLS connection was established
read ECONNRESET
getaddrinfo ENOTFOUND proxy-XY.COMPANY.com