Open per1234 opened 10 months ago
Tested both on MacOS 14.3
2.3.2
The error shows correctly as a notification and in the output view. Perhaps might be a Windows problem?
Perhaps might be a Windows problem?
I confirm.
I am still able to reproduce the fault using the build from https://github.com/arduino/arduino-ide/commit/aa9b10d68e6653b7f40ab920173c7964aaefbfa4 on two separate Windows machines by following the instructions from the issue report, but I have now checked on my macOS and Linux machines and the error message is shown as expected.
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: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 ate:\stuff\package_foo_index.json
, you would enter the following URL:❗ If there are already Boards Manager URLs in the field, separate them with commas.
🐛 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 https://github.com/arduino/arduino-ide/pull/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