Help: PIO Home stuck on "Loading", can't see any tools

Hello all!

I’m a complete newbie to programming and all the VSCode + PlatformIO jazz. I need to modify and compile Marlin firmware for my Ender 3 Pro (recently upgraded the mainboard to a SKR Mini E3 V2.0). I really need to activate some features in the board which following some tutorials should be extremely simple, but I can’t even open PlatformIO IDE inside VSCode neither Atom, which has been a very frustrating experience.

VSCode installation runs smoothly, as well as installing the PlatformIO IDE extension. However, after installation, whenever I try to open PIO Home or any of the extension tabs I get an endless “Loading” screen, which then after 30 or so seconds evolves to the following error message:

Error: Error:
HTTPSConnectionPool(host=‘api.registry.ns1.platformio.org’, port=443): Max retries exceeded with url: /v3/packages/platformio/tool/contrib-pysite (Caused by SSLError(SSLError(1, u’[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)'),)) at /Users/FlavioMark/.vscode/extensions/platformio.platformio-ide-2.2.1/node_modules/platformio-node-helpers/dist/index.js:1:5625 at ChildProcess.c (/Users/FlavioMark/.vscode/extensions/platformio.platformio-ide-2.2.1/node_modules/platformio-node-helpers/dist/index.js:1:879169) at ChildProcess.emit (events.js:223:5) at maybeClose (internal/child_process.js:1021:16) at Socket. (internal/child_process.js:…

Also, I’ve noticed that I do get the “alien” head icon in my extensions bar (left side of the screen), and I can open and read “platformio.ini”, but I can’t do anything in terms of compiling since none of the tools on the blue bar (bottom left corner) are loaded, as if the extension is not activated. I have tried uninstalling and installing both VSCode and PIO several times now, with no success.

I’m using a mid 2015 MacBook Pro, which is running macOS Sierra (version 10.12.6). It has been a while since I lastly updated the system and I have no clue if this might be getting in my way to solve this issue. I’ve seen people with similar problems using Windows which eventually were solved after they deleted something related to a “/penv folder”, but I don’t know where to find such a folder inside macOS. Some other people reported that the issue could be related to anti-virus. I had Avast installed in my computer and uninstalled it, again with no success.

I feel like it’s a simple issue that is holding me back, and any input from the community will help a lot. Thanks in advance for helping a noob in need! :slight_smile:

Are you able to manually open the URL https://api.registry.ns1.platformio.org/? Are you sitting behind a proxy? Is a firewall in the network or the computer blocking your request?

1 Like

Hello Max!

Thank you for the quick feedback. I can manually open the URL on Google Chrome and it sends me to a page which reads: Welcome to PlatformIO Registry API! - Version 1 - - Version 2 - - Version 3 -

How should I proceed from here? I just double checked, I’m not behind a proxy, however my Mac Firewall is currently activated. Should I disable it?

Can you check the certificate chain on the above website to see if it matches the following:

(Certificate chain info is usually accessed by clicking on in the padlock to the left of the URL; example was taken from Firefox.)

It seems to match, just the validity is different, where mine says February 12, 2021. Here’s what I got on Google Chrome:

That is the “Not After 2/12/2021, 6:27:49 PM (Central European Standard Time)” date and is the same as mine.

So all certificates are okay and you can do a normal HTTPS handshake against the website, no idea why PlatformIO is complaining.

I can recommend two things: Open a PlatformIO CLI and execute pio upgrade --dev to upgrade to the latest development core. Then restart VSCode.

If the problem still appears, again open a CLI terminal and type pio home --port 8009. It should start a local PIO home server on port 8009 localhost and directly open a browser to it. Is the page working there / are there errors? (some buttons like project explorer only work within VSCode though)

Hey Max, I have tried both recommendations with no success.
Upgraded successfully but I was still getting the problem, so I tried “pio home --port 8009” and got an error message. See below:

o_O. You can try and temporarily disable the firewall to see if that changes things, restart VSCode and retry. Otherwise I don’t have any ideas anymore… Maybe @ivankravets can take over then.

1 Like

I’ll try and I’ll get back ASAP. Thanks again for all your help, Max!

Oh wait actually I do see a problem. It’s trying to install the pysite package for Python 2.7. Mac OS is special in that regard because it has Python 2.7 as system-wide Python installation, but the PlatformIO extension brings its own Python 3 interpreter and must absolutely run within that Python3 interpreter. Now if you opened a PIO terminal and types pio upgrade --dev and it wanted to upgrade Python 2.7 that’s a bad indication that PIO is running under 2.7.

If you execute pio system info it will also show you the interpreter it’s running on, so you can double check that.

Have you ever installed PlatformIO using the pip (2) of the system? You may have multiple PlatformIO cores. I suggest you try a clean uninstall and reinstall. pip uninstall platformio in a system shell if it was ever installed there, then remove the VSCode PIO extension, delete the PlatformIO folder (rm -rf /Users/<user>/.platformio/), restart VSCode and reinstall the VSCode PIO extension. Maybe that helps.

Hey Max! I have never tried installing and uninstalling using the Pip of the system, but I’m willing to try the uninstall and folder deletion. Do I do this trough Mac’s terminal? (Sorry for a probably very noob question, hahaha)

So here’s the PIO System Info. It tells me that I’m running a Python 2.7.10-final.0
I have clicked on /Users/FlavioMark/.platformio/penv/bin/platformio to open it in the file Editor, and it prompted these two windows about Python, I believe it can be useful.

Very strange. It reports that its python executable is indeed the one from the penv folder… but it’s 2.7?

Please open a normal terminal and execute /Users/FlavioMark/.platformio/penv/bin/python --version to get it’s python version and post it, just for our information.

After that you can open a Finder to remove the whole /Users/FlavioMark/.platformio folder, or use the rm -rf /Users/FlavioMark/.platformio command in the terminal to achieve the exact same thing.

1 Like

Here’s the result I get from the python version. It indeed says it’s 2.7.10

I have uninstalled PIO following your instructions and installed it again. Still, same problem shows up. :confused: Should I try the same thing both with PIO and VSCode?

After reinstalling PIO in the VSCode IDE, execute /Users/FlavioMark/.platformio/penv/bin/python --version again. Has the version changed?

No. It’s the same, 2.7.10

Then I might be wrong about it absolutely needing Python 3 and maybe Mac OS is another exception here. Maybe @ivankravets can help you furhter here – after a clean uninstall of all possible multiple cores, a reinstall, checking the certificates and disabling the firewall I don’t know what more to do.

1 Like

Thank you very much for your time and help, Max! Does it mean I might need to update python to version 3? Anyway, I’ll wait for Ivan’s reply and see if he has any different recomendations. Once again, really appreciate your time and availability. :slight_smile:

Mac OS is inherently using Python 2, updating its system Python should not be done. That’s why PlatformIO has its Python virtual environment in its penv folder which can use an arbitrary Python installation, and all nicely separated from the system – at least that’s how it’s supposed to be.

Yep :slight_smile:

1 Like

Thanks for clearing, Max! Learning a lot.

Hi,

  1. Please install the latest Python 3 and certificates as described here Redirecting...
  2. Open VSCode settings and uncheck “Use Builtin Python”
    Screen Shot 2020-11-24 at 18.26.53
  3. Run in terminal rm -rf ~/.platformio/penv

Restart VSCode.

2 Likes