platformio / platformio-core-installer

PlatformIO Core Installer
https://docs.platformio.org/en/latest/core/installation/index.html
Apache License 2.0
82 stars 50 forks source link

Could not find compatible PlatformIO Core #2284

Open Tarojj opened 1 year ago

Tarojj commented 1 year ago

Solution

Open VSCode settings and enable platformio-ide.useBuiltinPIOCore


%23 Description of problem Leave a comment...

BEFORE SUBMITTING, PLEASE SEARCH FOR DUPLICATES IN

ivankravets commented 1 year ago

Please enable platformio-ide.useBuiltinPIOCore setting

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

khaoskosmos commented 1 year ago

This is the link above:

image

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

image

ivankravets commented 1 year ago

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

ppenguin commented 1 year ago

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.

javacafe01 commented 1 year ago

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.

ashthespy commented 1 year ago

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?

ivankravets commented 1 year ago

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

djswirl commented 5 months ago

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

DaRacci commented 2 months ago

Is there any progress on a fix for this?

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

ppenguin commented 2 months ago

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)

EquinoxTheGryph commented 2 weeks ago

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)

delan commented 2 weeks ago

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.