Skip to content

Empty additional boards URLs input generates incorrect board_manager#additional_urls entry in the CLI config #919

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
kittaakos opened this issue Mar 17, 2022 · 0 comments · Fixed by #920
Closed
3 tasks done
Assignees
Labels
conclusion: resolved Issue was resolved criticality: highest Of highest impact topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@kittaakos
Copy link
Contributor

kittaakos commented Mar 17, 2022

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:

Screen Shot 2022-03-17 at 11 51 40

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.

Screen Shot 2022-03-17 at 11 53 24

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
@kittaakos kittaakos added the type: imperfection Perceived defect in any part of project label Mar 17, 2022
@kittaakos kittaakos changed the title Empty additional boards URLs input generates incorrect board_manager#additional_urls entry in the CLI config Empty additional boards URLs input generates incorrect board_manager#additional_urls entry in the CLI config Mar 17, 2022
@per1234 per1234 added the topic: code Related to content of the project itself label Mar 17, 2022
kittaakos added a commit to kittaakos/arduino-ide that referenced this issue Mar 17, 2022
Closes arduino#919.

Signed-off-by: Akos Kitta <kittaakos@gmail.com>
@per1234 per1234 linked a pull request Mar 18, 2022 that will close this issue
4 tasks
@ubidefeo ubidefeo added criticality: high Of high impact criticality: highest Of highest impact and removed criticality: high Of high impact labels Mar 24, 2022
@fstasi fstasi added this to the arduino-ide rc6 milestone Mar 24, 2022
kittaakos added a commit to kittaakos/arduino-ide that referenced this issue Mar 27, 2022
Closes arduino#919.

Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit to kittaakos/arduino-ide that referenced this issue Mar 28, 2022
Closes arduino#919.

Signed-off-by: Akos Kitta <kittaakos@gmail.com>
fstasi pushed a commit that referenced this issue Apr 4, 2022
* Fixed empty string to URLs conversion

Closes #919.

Signed-off-by: Akos Kitta <kittaakos@gmail.com>

* #881: Fixed height of the 3rd part URLs `textarea`

Closes #881.

Signed-off-by: Akos Kitta <kittaakos@gmail.com>
@per1234 per1234 added the conclusion: resolved Issue was resolved label Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved criticality: highest Of highest impact topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants