question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Could not initialize libusb. Check that your system has a usb controller." on Travis CI

See original GitHub issue

For some reason I get that error only when running inside a Travis CI job.

I tracked down the error to libusb_init (http://libusb.sourceforge.net/api-1.0/group__lib.html#ga9517c37281bba0b51cc62eba728be48b). Do you have any clues about why that’s failing, and how we can at least workaround it?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
kevinmehallcommented, Jul 30, 2018

@agirorn If you want to make a PR removing this throw, I think the better API would be to check whether initialization failed in getDeviceList and anything else that can be called without a device, and make those functions throw an exception.

2reactions
agirorncommented, Jul 30, 2018

Why does this module throw this error here usb.js#L11 this means that every code that requires this module needs to guard it is self against this (bug I think) even if it is not going to use the USB, and just wants go require it in the top of the js file and then later on do some feature detection.

Since the property INIT_ERROR is already on the module it should be enough to silently ignore this and allow the user of the module to decide how he want’s to handle this scenario.

Would you accept a pull request that removes this check and adds the available function a simple and clean API to check if USB has been detected?

usb.available = () => !usb.INIT_ERROR;
Read more comments on GitHub >

github_iconTop Results From Across the Web

"Could not initialize libusb. Check that your system has a usb ...
For some reason I get that error only when running inside a Travis CI job. I tracked down the error to libusb_init ...
Read more >
"Could not initialize libusb. Check that your system has a usb ...
For some reason I get that error only when running inside a Travis CI job. I tracked down the error to libusb_init (http://libusb.sourceforge. ......
Read more >
View topic - [SOLVED] unable to initialize libusb: -99
My system does not recognize USB drives, kernel configuration seems to be OK ... uhci_hcd: USB Universal Host Controller Interface driver
Read more >
Diff - platform/external/libusb - android Git repositories
+ +On Linux, this is easy: the usbfs kernel interface exposes a file descriptor +which can be passed to poll(). If something similar...
Read more >
asynDriver: Asynchronous Driver Support ... - epics-modules
Fixed a problem with output records that have the asyn:READBACK info tag, ... Previously if a client was connected and the IOC exited...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found