Error message not displayed when Boards Manager installation fails with "UNKNOWN" status code #2269
Open
3 tasks done
Labels
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Describe the problem
When a Boards Manager installation fails due to a platform or tool archive file download failing with an "UNKNOWN" status code, Arduino IDE does not display the error message provided by Arduino CLI.
🐛 The lack of this important information will make it difficult to troubleshoot and support the failure.
To reproduce
package_foo_index.json
with the following content:The "Preferences" dialog will open.
file
scheme pointing to the path of thepackage_foo_index.json
on your computer into the "Additional Boards Manager URLs" field in the "Preferences" dialog.For example, if the file was at
e:\stuff\package_foo_index.json
, you would enter the following URL:🐛 Arduino IDE does not display any information about the installation failure:
Notification:
Output view:
Expected behavior
Arduino IDE displays useful error message content when a failure occurs.
In the demo above, the expected behavior is to print the error message:
Notification:
Output view:
Arduino IDE version
Original report
69b7365
Last verified with
aa9b10d
Operating system
Windows
Operating system version
11
Additional context
I bisected the regression to #2199 (fault does not occur when using the build from the previous commit, 7f660d7).
When the
arduino.cli.daemon.debug
setting is enabled, you can see from the logs that Arduino IDE does receive the message from Arduino CLI:I used the relatively rare conditions of downloading a platform archive file from a server with an expired SSL certificate for the demo since that was how I happened to encounter the fault, and is easy to reproduce. However, I suspect that the fault might also occur under other conditions where the information from the error message will be even more important.
There are regular reports on Arduino Forum of mysterious failures that have an "UNKNOWN" status code:
https://forum.arduino.cc/search?expanded=true&q=%22Error%3A%202%20UNKNOWN%22
These would be even more difficult to support without this information.
Issue checklist
The text was updated successfully, but these errors were encountered: