PlatformIO SSL error while upgrading using vscode

PlatformIO home is not loading. Using a pio terminal with

platformio home

I get the following error:

> Please wait while upgrading PlatformIO...
> Error: HTTPSConnectionPool(host='api.registry.ns1.platformio.org', port=443): Max retries exceeded with url: /v3/packages?query=type%3A%22tool%22+name%3A%22contrib-piohome%22 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1076)')))

Already tried to uninstall pio and vscode
system:

windows 10
python 3.7.7

Can you go to https://api.registry.ns1.platformio.org and look at the certificate chain with your browser?

If that isn’t the chain then probably your antiviurs has replaced the certs.

1 Like

I solved this in my case earlier

If anyone else has this problem here’s my solution. On a corporate network behind Zscaler.
After adding your proxy settings in environment variables PIO installed successfully but failed due to the above certificate error. Max retries exceeded with url: /v3/packages/platformio/tool/contrib-piohome (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1125)’)))

In VS Code File>Preferences>Settings search for ssl, Application>Proxy Uncheck Proxy Strict SSL. Now PIO home loads successfully. Hope this helps!

It worked very well for me, I just needed to restart VS code after change this configuration. Thanks!