Description
Describe the problem
When I manually edit the additional URLs <input>
and leave it empty, then the additional URLs will be incorrectly persisted into the CLI config.
To reproduce
Due to #881, I manually edited the 3rd party URL <input>
here:
I wanted to dig into #876 so I copied this additional URLs string into the <input>
and restarted the IDE:
http://digistump.com/package_digistump_index.json,http://www.leonardomiliani.com/repository/package_leonardomiliani.com_index.json,https://ambasat.com/boards/package_ambasat-1.com_index.json,https://arduino.esp8266.com/stable/package_esp8266com_index.json,https://dl.espressif.com/dl/package_esp32_index.json,https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json,https://mcudude.github.io/MightyCore/package_MCUdude_MightyCore_index.json,https://rabidprototypes.com/arduino/package_rabidprototypes_index.json,https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json,https://resource.heltec.cn/download/package_CubeCell_index.json,https://resource.heltec.cn/download/package_heltec_esp32_index.json,https://resource.heltec.cn/download/package_heltec_esp8266_index.json
The index update was successful.
I wanted to check how fast the IDE starts without any 3rd party URLs so I deleted (select all and delete) the content form the 3rd party URLs<input>
, closed the settings dialog, and restarted the app.
I have seen a lot of errors in the backend log such as these:
daemon INFO URL:
daemon INFO Updating index [url: ://]
daemon INFO URL: https://downloads.arduino.cc/packages/package_index.json
daemon INFO Updating index [url: https://downloads.arduino.cc/packages/package_index.json]
root INFO Updating index: package_index.json completed.
root INFO Updating index: package_index.json.sig completed.
root ERROR Error while updating index in attempt 4. Error: 13 INTERNAL: Error downloading index '': Get "": unsupported protocol scheme ""
at Object.callErrorFromStatus (/Users/akos.kitta/Desktop/arduino-ide/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
at Object.onReceiveStatus (/Users/akos.kitta/Desktop/arduino-ide/node_modules/@grpc/grpc-js/build/src/client.js:330:49)
at Object.onReceiveStatus (/Users/akos.kitta/Desktop/arduino-ide/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)
at /Users/akos.kitta/Desktop/arduino-ide/node_modules/@grpc/grpc-js/build/src/call-stream.js:145:78
at processTicksAndRejections (node:internal/process/task_queues:78:11)
daemon INFO Checking signature [error: opening signature file: open /var/folders/g0/n_2cw4ds44l2byzv39xrc4340000gp/T/792020501.sig: no such file or directory, index: /var/folders/g0/n_2cw4ds44l2byzv39xrc4340000gp/T/792020501, signaturefile: /var/folders/g0/n_2cw4ds44l2byzv39xrc4340000gp/T/792020501.sig]
So I checked the generated CLI config. It's incorrect:
cat ~/.arduinoIDE/arduino-cli.yaml
board_manager:
additional_urls:
- ""
daemon:
port: "50051"
directories:
data: /Users/akos.kitta/Library/Arduino15
downloads: /Users/akos.kitta/Library/Arduino15/staging
user: /Users/akos.kitta/Documents/Arduino
ide:
bundled: false
portable: false
library:
enable_unsafe_install: false
locale: en
logging:
file: ""
format: text
level: info
metrics:
addr: :9090
enabled: true
output:
no_color: false
sketch:
always_export_binaries: false
updater:
enable_notification: true
Expected behavior
Generate the following CLI config when there are no 3rd party URLs specified.
board_manager:
additional_urls:
daemon:
port: "50051"
directories:
data: /Users/akos.kitta/Library/Arduino15
downloads: /Users/akos.kitta/Library/Arduino15/staging
user: /Users/akos.kitta/Documents/Arduino
ide:
bundled: false
portable: false
library:
enable_unsafe_install: false
locale: en
logging:
file: ""
format: text
level: info
metrics:
addr: :9090
enabled: true
output:
no_color: false
sketch:
always_export_binaries: false
updater:
enable_notification: true
OR
board_manager:
daemon:
port: "50051"
directories:
data: /Users/akos.kitta/Library/Arduino15
downloads: /Users/akos.kitta/Library/Arduino15/staging
user: /Users/akos.kitta/Documents/Arduino
ide:
bundled: false
portable: false
library:
enable_unsafe_install: false
locale: en
logging:
file: ""
format: text
level: info
metrics:
addr: :9090
enabled: true
output:
no_color: false
sketch:
always_export_binaries: false
updater:
enable_notification: true
Arduino IDE version
HEAD of the main
branch (git rev-parse --short HEAD ca1c240
)
Operating system
macOS
Operating system version
11.6.5 (20G527)
Additional context
No response
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest nightly build
- My report contains all necessary details