function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vishnu SanthoshVishnu Santhosh 

Client network socket disconnected before secure TLS connection was established

Hi Community,

So, After I updated the VSCode recently, this error is getting thrown most of the time either when i try to retrieve 'the source from org' for a single apex class or when i try to 'Retrieve Source in Manifest from Org' from package.xml file.

I think it might get fixed after reinstallation. But that can cost me some time, setting up org, installing extensions again and all.

How can fix this issue ? Help ! 
If you know the solution, please share it.

Best Answer chosen by Vishnu Santhosh
Herin Acharya 9Herin Acharya 9

Hi Vishnu,

I am also facing the same issue rightnow.(ERROR:  Error: Client network socket disconnected before secure TLS connection was established)I have tried all these things mentioned above and nothing is working for me.

I tried using SFDX source commands from terminal and it works for me.
So, until you find out the permanant solution/root cause, you can try using sfdx commands.

(https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_source.htm#cli_reference_force_source)
e.g.
sfdx force:source:retrieve -m ApexClass:YourClassName(to retreive specific class from org)
sfdx force:source:retrieve -x path/to/package.xml(To retrieve all metadata components listed in a manifest)
sfdx force:source:deploy -m ApexClass:YourClassName(To deploy a specific Apex class)

Please let me know if this works for you.

Thanks,
Herin Acharya

All Answers

VinayVinay (Salesforce Developers) 
Hi Vishnu,

Try to update Salesforce CLI, command: sfdx update.

Check below steps mentioned below.

https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_troubleshoot_cancel_auth.htm

If above doesn't work then you would need to re-install again.

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vishnu SanthoshVishnu Santhosh

Thank you for the reply Vinay,

I did both ways : Update SFDX and Killing the process(which i could find any named ''Node" in windows).

Think i have to re-install it.

VinayVinay (Salesforce Developers) 
Sorry to hear that it didn't work.  Unfortunately as you are aware you would need to re-install and that should fix the issue.

Thanks,
Vishnu SanthoshVishnu Santhosh

Hi Vinay,

I tried Re-installing the extensions and also VSCode. It didn't Fix :(

If anyone know the solution, happy to recieve help :P.
I am stuck with this for quite a while now.
 

Herin Acharya 9Herin Acharya 9

Hi Vishnu,

I am also facing the same issue rightnow.(ERROR:  Error: Client network socket disconnected before secure TLS connection was established)I have tried all these things mentioned above and nothing is working for me.

I tried using SFDX source commands from terminal and it works for me.
So, until you find out the permanant solution/root cause, you can try using sfdx commands.

(https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_source.htm#cli_reference_force_source)
e.g.
sfdx force:source:retrieve -m ApexClass:YourClassName(to retreive specific class from org)
sfdx force:source:retrieve -x path/to/package.xml(To retrieve all metadata components listed in a manifest)
sfdx force:source:deploy -m ApexClass:YourClassName(To deploy a specific Apex class)

Please let me know if this works for you.

Thanks,
Herin Acharya

This was selected as the best answer
Vishnu SanthoshVishnu Santhosh

Hi Herin,

It worked !
Thank you so much 👍

ukjuhgkj hgftjhgukjuhgkj hgftjhg
Yes you can see some guidance about this issue here because when I faced client network socket I took guide from here (https://electricdogfencesguide.com/best-wireless-dog-fence/
Kunal Mishra 60Kunal Mishra 60
I am also getting this error.
As a workaround , you can go to the org rowser ie the cloud symbol on the left of VSCode and retrieve each component to local
That works for me
hoangnghoangng

Do you use VPN? Probably got trouble with proxy. 

I encounterd same error as you. Here is what i did: 

1. Update the lastest version of Salesforce CLI 

2. Change setting in VSCode: File > Preference > Application > Proxy 

  • Proxy Authorization > Edit in settings.json : write the proxy you are using here "http.proxy":"http://username:password@proxyserver:proxyport" , Ctrl S to save the json file 
  • Return to VS Code proxy setting, uncheck " Proxy Strict SSL "
  • Restart VSCode and tada, work like a charm 
Vishnu SanthoshVishnu Santhosh

Hi Kunal and Hoangng,

Thanks a lot for sharing.

Actually, we started using a different sandbox and discontinued the older one - where this error was observed.
In the new sandbox, it is working fine without any errors mentioned above.
It might be possible that the old sandbox is having some problem.

Anyways, thank you for sharing as this could help someone in the future.

Have a great day !