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

ArduinoCLI additional urls fails #1388

Open
albydnc opened this issue Nov 19, 2021 · 12 comments
Open

ArduinoCLI additional urls fails #1388

albydnc opened this issue Nov 19, 2021 · 12 comments

Comments

@albydnc
Copy link

albydnc commented Nov 19, 2021

When passing the additionalUrls setting, the board manager can't update and the terminal says:


[Starting] Update package index files...
dummy
Invalid argument passed: invalid item dummy
[Error] Exit with code=7

Tried with a single string and in an array, same results.
My settings.json is:

{
    "arduino.path": "/home/albertoperro/bin/",
    "arduino.commandPath": "arduino-cli",
    "arduino.useArduinoCli": true,
    "arduino.additionalUrls": "https://dl.espressif.com/dl/package_esp32_index.json"
}

VSCode version 1.62.3 ccbaa2d27e38e5afa3e5c21c1c7bef4657064247 x64
Arduino extension version v0.4.8 preview
Arduino CLI version arduino-cli alpha Version: 0.19.3 Commit: 12f1afc2 Date: 2021-10-12T10:15:19Z

@joybanerjee08
Copy link

I had this same issue.
I think this was the line which was causing the error in my case.
Installing Arduino IDE and removing CLI, then modifying the path to IDE fixed my problem.

@phan-t
Copy link

phan-t commented Jan 12, 2022

I had the same error output:

[Starting] Update package index files...
dummy
Invalid argument passed: invalid item dummy
[Error] Exit with code=7

This is what I did to workaround the issue:

  1. Added the additional urls directly to arduino-cli config by executing:
arduino-cli config init --additional-urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
  1. Executed arduino-cli core update-index. You'll see the following output:
Updating index: package_index.json downloaded                                                                                                                   
Updating index: package_index.json.sig downloaded                                                                                                               
Updating index: package_esp32_index.json downloaded

After performing the above, I could view the esp32 package in in the Arduino Board Manager and install it successfully.

My settings.json

{
    "arduino.path": "/opt/homebrew/bin/",
    "arduino.useArduinoCli": true,
    "arduino.commandPath": "arduino-cli",
    "arduino.additionalUrls": "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json"
}

Mac OS 11.6.2 (Big Sur) on M1
VS Code 1.63.2
VS Code Arduino Extension 0.4.8 preview
Arduino CLI 0.20.2 installed using Homebrew

Hope this helps.

@isharris
Copy link

Thanks @phan-t worked like a charm on ubuntu

@strazto
Copy link

strazto commented Oct 22, 2022

#1388 (comment)

I think this was the line which was causing the error in my case.

I think you're right about that, I quickly searched the extension's code for dummy and that line hasn't been touched in 6 years and specifically mentions the IDE.

Installing Arduino IDE and removing CLI, then modifying the path to IDE fixed my problem.

Although I can see how that would get around it, it's probably not the ideal workaround, especially due to #1477 currently requiring the CLI as a workaround if 2.0 is installed

#1388 (comment) is probably the best, and I might try submitting a PR to fix later

@brunoga
Copy link

brunoga commented Feb 18, 2023

Any updates on this? I am trying to use the bundled arduino-cli so the suggestion here does not work (I mean, I do not know what is the path to use for arduino-cli in that case).

@MatthewSteeves
Copy link

Re: location of bundled arduino-cli, if on Windows, check under:
C:\Users\YOUR_USERNAME\.vscode\extensions\vsciot-vscode.vscode-arduino-0.5.0-win32-x64\assets\platform\win32-x64\arduino-cli

@IPlayZed
Copy link

So basically, you guys want to move to the bundled arduino-cli in the future, and it does not work if one adds custom boards... What a great idea.

@benmcmorran
Copy link
Member

Can you try switching to the pre-release version? It includes #1611 which should fix this issue. I'll try to get another official release out soon.

image

@benmcmorran
Copy link
Member

I just published non-pre-release version 0.6.0 to the marketplace as well, which also includes #1611.

@BrettThePark
Copy link

This appears to still be broken as of v0.6.230727001

@SergioGCarvalho
Copy link

if using mac don't forget ide permissions #1681 (comment)

@Anaphase
Copy link

@SergioGCarvalho thank you so much, that did the trick for me!

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