PlatformIO Community

PlatformIO disappeared from VSCode status bar

I haven’t used PlatformIO for a few months and this morning all the icons (build, upload, etc…) disappeared from the status bar.

The only change is the update to VSCode to 1.36.1 and latest version of PIO

I have tried to uninstall PlatformIO and reinstall it again, but the problem remains.

Any idea? Thanks!

After a few uninstall and install, they came back!

One thing to keep in mind is if you dn’t have a PlatformIO project folder open in your workspace the toolbar won’t show… it only shows up if the extension detects a PlatformIO project. However, the alien head icon for platformio should always show up in the activity bar on the left.

I tried to open a few projects. The alien icon was there so it was the little home icon in the status bar, but all the others were not there.

It was also giving the error command platformio-ide.build not found when I launch the build process from the menu. Not sure if it was related.

I started using PlatformIO very recently and everything was great till yesterday when I tried to link libraries into a project using ln -s. Well, the sym link did not work so I removed them and tried to copy the files. I noticed that the PIO tools vanished. I have tried removing PIO and reinstalls but cannot get the tools back. For some reason the commands ‘command ‘platformio-ide.build’ not found’ also do not work. A little inconsistent. Help.

Is it all of the PIO extension that’s missing, or are these two icons still showing?

image

If so, perhaps something is wrong with the project configuration/layout and it’s no longer recognised as a PIO project. Is the platformio.ini still in the root of the project folder?

Those two show up. I had been using the Arduino extension with VSCode but switched to PIO for debug options. I am back to Arduino after 2 days. :frowning:

That pretty much means there is something wrong with the project layout and PIO doesn’t recognise it.
If there isn’t a platformio.ini still in the root of the project folder, you’ll need to re-create it. You could either create a new project, and move the source files into it, or create the platformio.ini yourself, and put the correct board / platform / framework values in.

You may also find some clashes with the Arduino extension, so it’s also best to disable that when you don’t need it.

e.g. for the Arduino Uno, a skeleton platformio.ini would look like:

[env:uno]
platform = atmelavr
board = uno
framework = arduino

Or a ESP8266 D1 Mini:

[env:d1_mini]
platform = espressif8266
board = d1_mini
framework = arduino
1 Like

Thank you. I do have the platform.ini and and verified that every time. I created a new project to test, just in case the problem was with my project. It did not work.

I also disabled Arduino to try that. That had not worked too. Incidentally, the first time when I installed PIO it worked great with Arduino toolbar too. :slight_smile:
I can’t fathom that just adding and removing libs can cause PIO UI to fail. I will be trying this one more time as I want to debug and step through an application I m working on.

Has anyone found a fix for this? I definitely have the platformio.ini file, the extension works (have done uploads) and no alien. I uninstalled the extensions, reloaded vscode, installed it again, reloaded vscode, and it hasn’t appeared. Pleas help.

Try removing the extension again but also delete C:\Users\<user>\.platformio, then reinstall the extention.

1 Like

It didn’t work. I even rebooted PC while pio was uninstalled.

You’re running plain Microsoft VSCode directly downloaded from Microsoft, not VSCodium or something? What’s the OS and VSCode version?

Screenshot (3)

Screenshot (5)

I’m using the same OS and VSCode versions and don’t experience any problems like that :confused:.

When the PlatformIO is reinstalled in the above way, and you go to VSCode → Help → Toggle Developer Tools → Console, what’s the content?

These are repeated frequently in the js console. Is there some other pane in the inspector you want to see?

rejected promise not handled within 1 second: 

Error: command 'platformio-ide.build' already exists
workbench.desktop.main.js:71 [Extension Host] stack trace: 

Error: command 'platformio-ide.build' already exists
	at o.registerCommand (c:\Users\mark\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:83:60904)
	at Object.registerCommand (c:\Users\mark\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:97:30995)
	at I.registerTaskBasedCommands (c:\Users\mark\.vscode\extensions\platformio.platformio-ide-2.4.3\dist\extension.js:1:10042)
	at I.refresh (c:\Users\mark\.vscode\extensions\platformio.platformio-ide-2.4.3\dist\extension.js:1:7566)
	at runMicrotasks (<anonymous>)
	at processTicksAndRejections (node:internal/process/task_queues:96:5
workbench.desktop.main.js:2693 [[object Object]]
command 'platformio-ide.build' already exists
$onExtensionRuntimeError @ workbench.desktop.main.js:2693
workbench.desktop.main.js:2693 
Error: command 'platformio-ide.build' already exists
	at o.registerCommand (c:\Users\mark\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:83:60904)
	at Object.registerCommand (c:\Users\mark\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:97:30995)
	at I.registerTaskBasedCommands (c:\Users\mark\.vscode\extensions\platformio.platformio-ide-2.4.3\dist\extension.js:1:10042)
	at I.refresh (c:\Users\mark\.vscode\extensions\platformio.platformio-ide-2.4.3\dist\extension.js:1:7566)
	at runMicrotasks (<anonymous>)
	at processTicksAndRejections (node:internal/process/task_queues:96:5)
$onExtensionRuntimeError @ workbench.desktop.main.js:2693
workbench.desktop.main.js:71 [Extension Host] runCommand C:\Users\mark\.platformio\penv\Scripts\python.exe Array(2) Object

And in VSCode, you only have one project folder in the workspace? Not sure how Error: command 'platformio-ide.build' already exists could have gotten there, maybe @ivankravets knows more…

I only have one project folder in the workspace.

FYI: I just did a fresh install of windows 10, wsl, ubuntu, vscode, and platformio. I cloned my project folder. This problem still has the exact same symptoms.

EDIT: I cloned an old project that worked well before and it didn’t have the alien either. The old project couldn’t build which is not a problem with my current one. The vscode window had the build icon on the bottom but when I click it I get the error command 'platformio-ide.build' not found. Oh well.

I’d be happy to zip up my project folder if anyone wants to try it.

Does this appear too when you use PIO Home → New Project wizard with a e.g Arduino Uno project?