platformio-core-installer icon indicating copy to clipboard operation
platformio-core-installer copied to clipboard

Could not find compatible PlatformIO Core

Open Tarojj opened this issue 3 years ago • 12 comments

Solution

Open VSCode settings and enable platformio-ide.useBuiltinPIOCore


%23 Description of problem Leave a comment...

BEFORE SUBMITTING, PLEASE SEARCH FOR DUPLICATES IN

  • https://github.com/platformio/platformio-vscode-ide/issues%3Fq=is%3Aissue

%23 Configuration

VSCode: 1.69.1 PIO IDE: v2.5.0 System: Windows_NT, 10.0.18363, x64

%23 Exception

Error: Could not find compatible PlatformIO Core. Please enable `platformio-ide.useBuiltinPIOCore` setting and restart IDE.
	at u.value (c:\Users\Administrator\.vscode\extensions\platformio.platformio-ide-2.5.0\node_modules\platformio-node-helpers\dist\index.js:1:801864)
	at S.install (c:\Users\Administrator\.vscode\extensions\platformio.platformio-ide-2.5.0\dist\extension.js:1:4373)
	at c:\Users\Administrator\.vscode\extensions\platformio.platformio-ide-2.5.0\dist\extension.js:1:27870
	at _withProgress (c:\Users\Administrator\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:83:45034)
	at _.withProgress (c:\Users\Administrator\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:83:44788)
	at Object.withProgress (c:\Users\Administrator\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:106:42345)
	at Object.startInstaller (c:\Users\Administrator\.vscode\extensions\platformio.platformio-ide-2.5.0\dist\extension.js:1:27285)
	at async Object.activate (c:\Users\Administrator\.vscode\extensions\platformio.platformio-ide-2.5.0\dist\extension.js:1:22733)

Tarojj avatar Jul 13 '22 12:07 Tarojj

Please enable platformio-ide.useBuiltinPIOCore setting

Yes! What was the reason that you disabled the built-in PlatformIO Core?

ivankravets avatar Jul 13 '22 12:07 ivankravets

This is the link above:

image

How do you solve the issue? Enabling the builtin platformio also give an error:

image

khaoskosmos avatar Apr 26 '23 10:04 khaoskosmos

Did you install PlatformIO IDE? https://docs.platformio.org/en/latest/integration/ide/vscode.html#installation

ivankravets avatar Apr 26 '23 10:04 ivankravets

I'm seeing the same, when I have explicitly set

{
    "platformio-ide.useBuiltinPIOCore": false,
    "platformio-ide.useBuiltinPython": false,
    "platformio-ide.disablePIOHomeStartup": true,
    "platformio-ide.pioHomeServerHttpPort": 8008,
   ...
}

because I'm using nixos and therefore need to use my own pio, which I install and run via direnv.

I already started an instance of the server with pio home and confirmed I can access it with a browser on localhost:8008, so I expected forcing this port in the vscode extension settings and turning off the builtin should just make the extension connect to the server? (And the pio bin is in the path, I can also use the menu button for pio cli just fine).

Or, in other words, it appears that the extension is trying to install the builtin PIO core and run it, even when turned off in the settings could be considered a bug AFAICS?

Also, pressing "PIO Home -> Open" leads to a timout, indicating that the extention refuses to accept that I'm running my own pio home instance and doesn't consider the default host:port (whereby as seen above the port is actually explicitly configured), which seems to be contrary to reasonable expectation.

ppenguin avatar May 07 '23 19:05 ppenguin

Getting the same issue here on NixOS. I can get everything working (run, home, etc) with just using pio from the shell, but when trying to use the plugin with VSCode, I get that error.

javacafe01 avatar May 09 '23 05:05 javacafe01

Have similar issues, pio and platformio works fine from my shell. I've added the platformio-ide.customPATH but still doesn't seem to use my installed core. Any pointers?

ashthespy avatar Jun 03 '23 10:06 ashthespy

Could you reset platformio-ide settings to default values in the VSCode and restart it? Does it work now?

ivankravets avatar Jun 06 '23 19:06 ivankravets

I had the smae problem, thanks to AI all sorted, these are the steps I took

CMD: pio update

CMD: pip uninstall platformio CMD: pip install -U platformio

Open VScode and install PIO Extension again

djswirl avatar Jan 12 '24 23:01 djswirl

Is there any progress on a fix for this?

On NixOS as-well and current experiencing the same behavior.

DaRacci avatar Apr 09 '24 11:04 DaRacci

Is there any progress on a fix for this?

On NixOS as-well and current experiencing the same behavior.

The wiki was edited by @delan with information how to use my PR under nixos. It has been working fine for me (though I only use it occasionally so there has not been really thorough testing)

That said, there are different ways to solve it (the above is merely a workaround, even though it's halfway toward a fundamentally cleaner solution for nixpkgs.platformio) and I think some of the findings in this thread remain valid: the behaviour of the extension for some settings is contrary to reasonable expectation, so it could still be worth to fix the behaviour of settings allowing for instances of pio that are external/unrelated to the extension instance (e.g. the settings mentioned here: https://github.com/platformio/platformio-core-installer/issues/2284#issuecomment-1537525391)

ppenguin avatar Apr 09 '24 17:04 ppenguin

Despite my tries on following the Wiki Page of NixOS, I still can't seem to run VSCode without getting the error message

Error: Could not find compatible PlatformIO Core. Please enable `platformio-ide.useBuiltinPIOCore` setting and restart IDE.
	at MA.install (/home/<USERNAME>/.vscode/extensions/platformio.platformio-ide-3.3.3-linux-x64/node_modules/platformio-node-helpers/dist/index.js:1:961468)
	at k.install (/home/<USERNAME>/.vscode/extensions/platformio.platformio-ide-3.3.3-linux-x64/dist/extension.js:1:9318)
	at runNextTicks (node:internal/process/task_queues:60:5)
	at process.processTimers (node:internal/timers:509:9)
	at async /home/<USERNAME>/.vscode/extensions/platformio.platformio-ide-3.3.3-linux-x64/dist/extension.js:1:45166...

Info: uname -a: nixos 6.6.32 #1-NixOS SMP PREEMPT_DYNAMIC Sat May 25 14:22:56 UTC 2024 x86_64 GNU/Linux Using NixOS 24.05 (unstable)

EquinoxTheGryph avatar May 31 '24 19:05 EquinoxTheGryph

Despite my tries on following the Wiki Page of NixOS, I still can't seem to run VSCode without getting the error message

Did you run code from within the nix-shell? Note that if you already have other vscode windows open when you do, it won’t work and you will still get that error.

delan avatar Jun 03 '24 04:06 delan