Uncought Error: Failed to get boards

I keep getting this error, when I want to open or start a project. I use Ubuntu 16.04 LTS.
I tried everything recommend in https://github.com/platformio/platformio-atom-ide/issues/108#issuecomment-263939624 but nothing worked for me.

Here is the error:
/home/cooper/.atom/packages/platformio-ide/lib/utils.js:181
Hide Stack Trace
Error: Failed to get boards
at getBoards (/home/cooper/.atom/packages/platformio-ide/lib/utils.js:181:13)
at InitializeNewProjectView.initializeBoardsSelect (/home/cooper/.atom/packages/platformio-ide/lib/init/view.js:59:20)
at InitializeNewProjectView.initialize (/home/cooper/.atom/packages/platformio-ide/lib/init/view.js:55:10)
at InitializeNewProjectView.BaseView (/home/cooper/.atom/packages/platformio-ide/lib/base-view.js:25:20)
at new InitializeNewProjectView (/home/cooper/.atom/packages/platformio-ide/lib/init/view.js:25:38)
at Object.command (/home/cooper/.atom/packages/platformio-ide/lib/init/command.js:49:14)
at atom-workspace.platformioIdeInitializeNewProject (/home/cooper/.atom/packages/platformio-ide/lib/main.js:66:59)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:259:29)
at CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:3:59)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/usr/share/atom/resources/app.asar/src/command-registry.js:160:19)
at runAtomCommand (/home/cooper/.atom/packages/platformio-ide/lib/utils.js:111:24)
at HTMLAnchorElement.callback (/home/cooper/.atom/packages/platformio-ide/lib/home-screen/quick-links.js:41:25)

Tried to delete ~/.atom, restart Atom and reinstall PlatformIO IDE but the error stayed the same.

The version shown on the Welcome screen shows this.
IDE 1.6.0 | CLI Failed to retrieve

pio boards puts out a long list of different platforms

pio --version
PlatformIO, version 3.1.0

There is some confusion on the atom --version.
Using a normal terminal or just checking under Help.
It shows: Atom : 1.12.5
Using the PlatformIO IDE Terminal I get:

cooper@CooperBook:~$ atom --version
v6.5.0

Do you see boards list in Menu: PlatformIO > Initialize new Project or update existing?

I have the same issue. Running pio boards from the built-in terminal (as well as calling the one inside the virtualenv container from Terminal) works just fine, but creating a new project throws a Failed to get boards error.

I’m on macOS 10.12.1, Atom and platformio-atom-ide are up-to-date.

I thought I managed to fix it by explicitly setting a PATH in the settings, because I got it working again (got the boards popup and everything). But after some additional changes to settings, it stopped working. The menu PlatformIO > Initialize or Update ... throws the same error.

Although I use Homebrew, and have also installed Python using it, I don’t have any PIO cores installed with Homebrew.

EDIT: adding the full path for pio where it gets called (platformio-ide/lib/utils.js) fixes the problem. Sounds like there’s definitely something happening with $PATH. I have an idea about a possible cause, will investigate and report back.

It looks like Atom issue. Could you try this fix in development version?
https://github.com/platformio/platformio-atom-ide/commit/cda108088a5287094ada661cc4ffc07839c010f2

Yup, that fixed it :grinning:

Thanks for the report. I’ll make new release as soon as possible.

Adding the output of echo $PATH in the settings fixed it for me!
Thanks for that!

PlatformIO IDE 1.7.0 is out!

1 Like