I have just installed pio on vsc on windows 10 to try and code my esp8266.
I have an x86-64 based system.
when i try to upload the project onto my board, i get the below error.
Tool Manager: Installing platformio/tool-mkspiffs @ ~1.200.0
Error: HTTPSConnectionPool(host='api.registry.ns1.platformio.org', port=443): Max retries exceeded with url: /v3/packages/platformio/tool/tool-mkspiffs (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1123)')))
I have tried with no success.
Temprarliy disabling my Avast antivirus - did not work
running this from command prompt (my system cli) - same error occurred.
for debugging purposes when i visit the website PlatformIO Registry API in my browser, the SSL certificates i see are as below:
Hm the requested URL https://api.registry.ns1.platformio.org/v3/packages/platformio/tool/tool-mkspiffs loads also just fine for me and the certificate is valid. The connection to the site uses TLS 1.3 for me in the browser, but with openssl s_client -host api.registry.ns1.platformio.org -port 443 it also shows TLS 1.2 as capability, so not sure what’s wrong…
Reverting a version, then updating back and it working doesn’t sound like healthy behavior for me, but if it’s really fixed, okay. You can try to remove the folder C:\Users\<user>\.platformio\packages\tool-mkspiffs and then re-execute a project task that needs mkspiffs, like “Build Filesystem Image”. If it fails to re-install tool-mkspiffs with the same error message, it’s still broken.
Could you please give a hint how to install a particular version of PlatformIO for VS Code on Windows? The upload used to work before a PlatformIO update, but it seems to be broken in latest PlatformIO. I see that it sends invalid data to proxy, talking binary protocol and not HTTP:
Tool Manager: Installing tool-mkspiffs @ ~1.200.0
Error: HTTPSConnectionPool(host='api.registry.nm1.platformio.org', port=443): Max retries exceeded with url: /v3/search?query=type%3A%22tool%22+name%3A%22tool-mkspiffs%22 (Caused by ProxyError('Your proxy appears to only use HTTP and not HTTPS, try changing your proxy URL to be HTTP. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#https-proxy-error-http-proxy', SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1129)'))))
The terminal process "C:\Users\admin\.platformio\penv\Scripts\platformio.exe 'run', '--target', 'upload'" terminated with exit code: 1.
I have tried with proxy set in VS Code Settings as well as with no proxy set – with the same result in both cases.
I have found the root of confusion. PlatformIO uses system-wide proxy settings, and not those from VS Code settings (or falls back to those settings). After resetting syste-wide proxy, PlatformIO was able to download the necessary modules:
Tool Manager: Installing tool-mkspiffs @ ~1.200.0
Downloading [####################################] 100%
Unpacking [####################################] 100%
Tool Manager: tool-mkspiffs@1.200.0 has been installed!
Tool Manager: Installing tool-mklittlefs @ ~1.203.0
Downloading [####################################] 100%
Unpacking [####################################] 100%
Tool Manager: tool-mklittlefs@1.203.210628 has been installed!
However the issue is still there: PlatformIO incorrectly talks to proxy server and then displays the misleading error (SSL: WRONG_VERSION_NUMBER).