First run "Arduino_BuiltIn" installation fails: "dir ... already exists" #1192
Labels
conclusion: resolved
Issue was resolved
topic: CLI
Related to Arduino CLI
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Describe the problem
In order to allow users to get started with Arduino with the minimum amount of complexity, the Arduino IDE installs support for the most common boards and fundamental libraries automatically on the first run. This matches the experience provided by the Arduino IDE 1.x installation.
Users who were previously using Arduino IDE 1.x may already have some of these installed in the shared folders. Under certain conditions, this causes the installation of the "built-in" libraries to fail unexpectedly:
To reproduce
❗ The bug seems to be timing sensitive (likely requiring the library installation process to happen while the library and package index update is still in progress), the issue will not occur if the platform installation process is delayed excessively while blocked by this confirmation dialog.
🐛 Installation of the "Arduino_BuiltIn" library fails unexpectedly:
Expected behavior
The library installation should be successful, skipping over the already installed "SD" library dependency:
Arduino IDE version
2.0.0-rc8-snapshot-fb690c9
Operating system
Windows
Operating system version
10
Additional context
I bisected the bug to a36524e (does not occur when using the build for 1073c3f).
This appears to be related to this Arduino CLI bug:
arduino/arduino-cli#1802
Even though the lack of awareness of external changes to the libraries reported at the link above is a bug in Arduino CLI, in this case there are no external changes to the libraries. So it seems there may also be a problem in the IDE that somehow results in the CLI being put into this state where its internal data about the libraries present does not match reality.
I was not able to reproduce this issue by running the equivalent operations via the Arduino CLI gRPC interface directly.
I have not been able to reproduce the issue on my Linux machine.
In the demo, I had the latest version of the SD library ("[email protected]") installed, so even after #1169 this would not be expected to fail.
Even under conditions where the library installation is expected to fail due to having an older version of one of the installed (e.g., "[email protected]"), it should fail with a different error message:
I suspected that the same problem might also occur for people doing updates on startup, as is the normal user flow now that notifications are shown for updatable library or platforms on startup (#1361).
If so, that would make the impact of the bug even more significant, since users will be performing updates regularly, whereas the first run library and platform installation operation will typically only occur once for each machine the IDE is used on.
However, I was not able to produce the bug in that way despite experimenting with different timings.
There is a report about the same error message here, triggered by an "INSTALL ALL" operation:
https://forum.arduino.cc/t/library-manager-is-empty/1002124/30
Reports of "
destination dir \_\_\_ already exists
" errors while installing/updating libraries:Issue checklist
The text was updated successfully, but these errors were encountered: