-
-
Notifications
You must be signed in to change notification settings - Fork 395
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
Library Manager install fails ~silently if dependency not available #621
Comments
Hi @butor32. Thanks for your report. This error is caused by the "Forced-BME280" having invalid metadata. I have submitted a pull request to correct this problem in the library: That will only fix one specific instance of this problem, and even then the previous versions of the library will still have it. Arduino does not control the metadata of the thousands of Library Manager libraries, so it is inevitable that some will have minor problems in their metadata such as this one. It could even happen through no fault of the library author in the event the name of one of its dependencies is changed. So it is essential for the Arduino IDE to be designed to function even in the face of problematic external data. At the very minimum, the problem should be clearly communicated to the user. But the better approach is to handle it gracefully, as is done by the classic Arduino IDE. Even with Arduino CLI, although the standard installation fails, it does so with a clear error message and the user can still install the library via the use of the We can use this issue to track that need to improve the user experience when this happens. Related |
Hi @per1234, butor32 |
Thanks for your suggestion! We do check the validity of the metadata before accepting the library into Library Manager. We do detect this condition and warn the library submitter about it (example). However it is only treated as a warning. The reason for that is multiple interdependent libraries may be submitted simultaneously, which results in a spurious failure of the check. We also check the metadata before adding each release of the library once accepted. However, the specific contents of this field has not historically been validated because the original system did not have that capability. That means there is a tricky situation where we have a legacy of library releases such as those of the "Forced-BME280" library in the database and those could be affected retroactively if we made this check more strict. |
It's still happening with I tried to install The error is unhandled in IDE2's frontend:
% /Applications/Arduino\ IDE\ 2.1.0.app/Contents/Resources/app/node_modules/arduino-ide-extension/build/arduino-cli version
arduino-cli Version: 0.32.2 Commit: 2661f5d9 Date: 2023-04-12T09:41:48Z
% /Applications/Arduino\ IDE\ 2.1.0.app/Contents/Resources/app/node_modules/arduino-ide-extension/build/arduino-cli lib install "OpenMV Arduino RPC"
Error installing OpenMV Arduino RPC: No valid dependencies solution found: dependency 'SoftwareSerial' is not available
install_openmv_arduino_rpc.mp4IDE2 shows an error notification with I am adding myself as the assignee, fixing the problem to show the error as a notification or output message, and @91volt can help polish the UX. |
It turned out that the problematic part was listing the dependencies before installing it. I will add a quick fix. |
Closes #621 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Closes #621 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Describe the problem
Installation of version 3.0.0 of the "Forced-BME280" by Jocchem van Kranenburg via Library Manager fails silently.
To reproduce
forced-bme280
in the "Filter your search..." field.🐛 The library installation fails silently.
Expected behavior
The cause of the problem is clearly communicated to the user when it is not possible to install a library.
Arduino IDE version
Original report
2.0.0-beta.12
Last verified with
964ea3b
Operating system
Operating system version
Additional context
An error is shown in the terminal window:
However, the message only flashes for an instant in the Arduino IDE window; so fast that the user could never read it.
Additional reports
Workaround
Use the "Add .ZIP Library..." method to install the problematic library:
https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries#importing-a-zip-library
Issue checklist
The text was updated successfully, but these errors were encountered: