Skip to content

[Library manager] UsbHost library always appears as updatable #5283

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
akash73 opened this issue Aug 23, 2016 · 12 comments
Closed

[Library manager] UsbHost library always appears as updatable #5283

akash73 opened this issue Aug 23, 2016 · 12 comments
Assignees
Labels
Component: Board/Lib Manager Boards Manager or Library Manager Type: Bug

Comments

@akash73
Copy link
Member

akash73 commented Aug 23, 2016

the library manager shows me UsbHost library as updatable even if is the latest available.
Tried to downgrade to 1.0.4 and back to 1.0.5 but didn't resolve.

IDE 1.6.11 OSX 10.10.5

screenshot 2016-08-23 11 20 12

@per1234
Copy link
Collaborator

per1234 commented Aug 23, 2016

I can reproduce this with any SAMD board selected (using Arduino IDE 1.6.11 Hourly Build 2016/08/22 03:34 with Arduino SAMD Boards 1.6.6). It does not occur with any Arduino AVR Boards or Arduino SAM Boards board selected.

I think the problem is caused because Library Manager sees that a newer version of the library(1.0.5) is available than the version included with Arduino SAMD Boards(1.0.0). However, when you download the version 1.0.5 the architectures value is sam so it still sees that 1.0.0 is installed. Obviously there is some logic missing from Library Manager and a similar issue was reported quite some time ago(#4189) and wrongly closed. I tried to get it reopened without success.

The solution I've been using with 3rd party hardware packages, where this frequently causes problems, is to change the name value in library.properties to a unique value(you don't need to change any filenames). In this case it could be:

name=USBHost(Arduino SAMD Boards)

This solves the problem and actually makes sense because these are two different libraries, why should they have the same name?

There does seem to be a new version of this issue with the same behavior but a different cause that appeared in Arduino IDE 1.6.10(encountered with the FreeRTOS library in rogerclarkmelbourne/Arduino_STM32#196). I had put together a demonstration of this but decided since I've only seen it affect 3rd party hardware packages and can easily be fixed in those packages that it was better not to bother the Arduino developers with it. If this is something you want to look into I can check if it's still occurring and give more information.

EDIT: Starting a list of other reports of this bug:
http://forum.arduino.cc/index.php?topic=511238

@per1234
Copy link
Collaborator

per1234 commented Aug 23, 2016

I just had a look at the version of the library at https://github.com/arduino-libraries/USBHost. The readme says:

The USBHost library allows an Arduino Due and Zero board to appear as a USB host,

This indicates the solution is as simple as changing https://github.com/arduino-libraries/USBHost/blob/master/library.properties#L9 from:

architectures=sam

to:

architectures=sam,samd

Which does solve the always updatable issue. If that library will work for either SAM or SAMD then why is a different version included in the SAMD core?

@andrei-ivanov
Copy link

very annoying :-(

@PaulStoffregen
Copy link
Contributor

We get this problem with Teensy too... the library manager shows a popup that libraries can be updated. It really ought to be smarter, to only commandeer the user's attention when doing so is truly important.

Especially for beginners having trouble with their projects, sending them down a fruitless troubleshooting path can be a huge distraction from figuring out why their project doesn't work.

@TheTechnoGuy
Copy link

TheTechnoGuy commented May 21, 2017

Experiencing the same issue. Have wasted lots of time on it.

I note that the blurb for the USBHost library indicates that it's intended for use with an Arduino Due board. Not something that I even have... (I have MKR1000 & Teensy boards).

@PaulStoffregen makes really relevant comments about fruitless troubleshooting path & huge distraction. It would be nice to see the Arduino developers take this to heart.

Arduino IDE 1.8.2 | Windows 10 Version 1703 (OS Build 15063.296)

usbhost issue

@akash73 akash73 assigned akash73 and cmaglie and unassigned akash73 May 22, 2017
@mactabish
Copy link

mactabish commented Jun 8, 2017

Also experiencing same problem :(
Arduino IDE 1.8.3 on macOS 10.12

@per1234 per1234 added the Component: Board/Lib Manager Boards Manager or Library Manager label Jul 5, 2017
@SamuelWAnderson45
Copy link

Same problem. Arduino IDE 1.8.4

@gratefulfrog
Copy link

gratefulfrog commented Nov 13, 2017

same issue, very annoying... ide 1.8.5

@monolied
Copy link

Same here. IDE 1.8.5, libraries shown but not updatable are "SD by Arduino, SparkFun Version 1.2.0" and "USBHost by Arduino Version 1.5.0". Probably Arduino SAMD Boards conflicting with the Adafruit SAMD boards, which I retrieved using the following Boards Manager URL: https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
This should be easy to reproduce.

@andrei-ivanov
Copy link

I don't think the project is maintained anymore, or just barely.

@MarkSolcom
Copy link

Nearly two years later and no fix. I think we can safely say arduino aren't going to be bothering with this one.

In my case the simple fix was apply per1234's change to the local copy of USBhost\library.properties in my libraries folder:

architectures=sam becomes architectures=sam,samd

This gets rid of the incorrect nag prompt although it would probably come back in the (highly unlikely) event that the library is updated in the future.

@per1234
Copy link
Collaborator

per1234 commented May 15, 2021

Closing as fixed by ac6d3c1

Prior to that commit, Arduino Library Manager used the installed versions of the platform bundled libraries as a factor in determining whether an update was available. In addition to not being helpful, since platform bundled libraries are not distributed by Library Manager, but instead by Boards Manager, it also caused this peculiar "always updatable" bug under certain conditions. The change to making Library Manager ignore platform bundled libraries also eliminated this bug.

@per1234 per1234 closed this as completed May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Board/Lib Manager Boards Manager or Library Manager Type: Bug
Projects
None yet
Development

No branches or pull requests