Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Unable to find "Arduino IDE" when option "arduino-cli" is set to true under Linux #1346

Closed
legerch opened this issue Sep 9, 2021 · 10 comments

Comments

@legerch
Copy link

legerch commented Sep 9, 2021

Hello, I have an issue under Ubuntu 20.04 when setting "Use Arduino Cli" (I am using this option under Win10 also and this work properly).

First, my settings.json :

"arduino.useArduinoCli": true,
"arduino.path": "/snap/bin/arduino-cli",
"arduino.additionalUrls": ""

arduino-cli was installed using snap store (https://snapcraft.io/arduino-cli)

Usage of arduino-cli is set to true, the path is also valid but when I try using arduino extension, I get error message "Cannot find Arduino IDE. Please specify the 'arduino.path'".
Why extension search for Arduino IDE ? Did I miss something ?
I search for similar isssue (#950) but solution are for Windows OS.

Thank you for your time

EDIT :
This pull request seems to fix the problem : #1297

@Galex1223
Copy link

I have the same problem @legerborea , were you able to fix it or do something ?

@legerch
Copy link
Author

legerch commented Sep 15, 2021

Hello @Galex1223, no I try to set the commandPath to arduino-cli (instead of arduino default value). But I ended up with an other error :

[Starting] Update package index files...
dummy
Error initializing instance: Error downloading library_index.json.gz: Get "https://downloads.arduino.cc/libraries/library_index.json.gz": dial tcp: lookup downloads.arduino.cc on [::1]:53: dial udp [::1]:53: socket: permission denied
Invalid argument passed: invalid item dummy
[Error] Exit with code=7

So I am not sure that setting commandPath value is enough...

@pruge
Copy link

pruge commented Nov 22, 2021

try this

"arduino.useArduinoCli": true,
"arduino.path": "/snap/bin/",
"arduino.commandPath":"arduino-cli",
"arduino.additionalUrls": ""

@nick-pestell
Copy link

I am experiencing the same issue. I have tried both settings.json configurations suggested by @legerborea and @pruge. In both cases I receive the error message "Cannot find Arduino IDE. Please specify the 'arduino.path'".

I have confirmed the instillation of arduino-cli is working and I am pointing to the correct fie.

@Galex1223
Copy link

try this

"arduino.useArduinoCli": true,
"arduino.path": "/snap/bin/",
"arduino.commandPath":"arduino-cli",
"arduino.additionalUrls": ""

Hey @pruge. sorry for the delay! My arduino-cli installation is not located in /snap/bin, but I pointed to it correctly using the same other setting as you and still has the error messagge refered by @nick-pestell !

Thank you for your update.

@pruge
Copy link

pruge commented Dec 18, 2021

  1. install arduino-cli
    This script will install the latest version of Arduino CLI to $PWD/bin:
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
  1. check arduino version
    If you are using a Mac
/Users/<user id>/bin/arduino-cli version
arduino-cli  Version: 0.20.2 Commit: 13783819 Date: 2021-12-09T13:32:05Z
  1. vscode arduino options
  "arduino.path": "/Users/<user id>/bin/",
  "arduino.commandPath": "arduino-cli",
  "arduino.useArduinoCli": true,
  "arduino.defaultBaudRate": 9600,

@RanzQ
Copy link

RanzQ commented Dec 18, 2021

I was able to get the normal snap arduino working with these paths: #1163

Maybe similar paths work for arduino-cli.

@nick-pestell
Copy link

Thank you @pruge, I seem to have it working now.

@kopp
Copy link
Contributor

kopp commented Dec 30, 2022

I added #1562 to document this. @legerborea : I guess we can close the issue, right?

@legerch
Copy link
Author

legerch commented Jan 1, 2023

Hello @kopp,
Thank you for the review. Unfortunately, I have never succeeded to use this extension with arduino-cli from snap.

I solved message error: "Cannot find Arduino IDE. Please specify the 'arduino.path" with those parameters in extension parameters:

"arduino.useArduinoCli": true,
"arduino.path": "/snap/bin/",
"arduino.commandPath": "arduino-cli"

But then, I am unable to list boards or upload sketches... So I have dropped snap version of arduino-cli and use official binary instead, which perfectly works with this extension.

Long story short, issue can be closed 😉

@legerch legerch closed this as completed Jan 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants