Skip to content
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

REST api fails to start #109

Closed
asbe opened this issue Apr 30, 2019 · 11 comments
Closed

REST api fails to start #109

asbe opened this issue Apr 30, 2019 · 11 comments

Comments

@asbe
Copy link

asbe commented Apr 30, 2019

Have set up the SDK as described in https://developer.huddly.com/index.html, with notable difference that I use nodist (https://github.com/nullivex/nodist) instead of nvm.

Trying to start the REST-api results in the following errors:

E:\Prosjekter\MeetEasy\sdk\examples\rest (master -> origin)
λ npm run start
npm WARN lifecycle The node binary used for scripts is C:\Program Files (x86)\Nodist\bin\node.exe but npm is using C:\Program Files (x86)\Nodist\v-x64\11.13.0\node.exe itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

> rest@1.0.0 prestart E:\Prosjekter\MeetEasy\sdk\examples\rest
> npm run -s build

Successfully compiled 4 files with Babel.

> rest@1.0.0 start E:\Prosjekter\MeetEasy\sdk\examples\rest
> node dist/index.js

Listening on port 8080
Libusb: libusb_open failed: LIBUSB_ERROR_NOT_FOUND
Opening device failed: LIBUSB_ERROR_NOT_FOUND. Retrying.
Libusb: libusb_open failed: LIBUSB_ERROR_NOT_FOUND
Opening device failed: LIBUSB_ERROR_NOT_FOUND. Retrying.
Libusb: libusb_open failed: LIBUSB_ERROR_NOT_FOUND
HLink is not supported for device: LIBUSB_ERROR_NOT_FOUND
Libusb: libusb_open failed: LIBUSB_ERROR_NOT_FOUND
Opening device failed: LIBUSB_ERROR_NOT_FOUND. Retrying.
Libusb: libusb_open failed: LIBUSB_ERROR_NOT_FOUND
Opening device failed: LIBUSB_ERROR_NOT_FOUND. Retrying.
Libusb: libusb_open failed: LIBUSB_ERROR_NOT_FOUND
HLink is not supported for device: LIBUSB_ERROR_NOT_FOUND

Currently the camera info is as follows:

{"id":"\\\\?\\usb#vid_2bd9&pid_0021&mi_00#7&12e90286&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\\global","serialNumber":"12E90286","vendorId":11225,"productId":33,"version":"1.2.11-35134","softwareVersion":"HuddlyIQ-1.2.11-35134","uptime":12.21,"pathName":"\\\\?\\usb#vid_2bd9&pid_0021&mi_00#7&12e90286&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\\global","platform":"win32","app_version":"2.0.27"}

Huddly app is not running.

Is there a location for logfiles I can paste that may help resolve this issue?

@brikendr
Copy link
Contributor

brikendr commented May 2, 2019

Hi @asbe

Would you be able to tell us what node version you are using, operating system (i see that you are using windows, but is it 7 or 10?), and if you have installed any custom usb drivers on your machine.

@asbe
Copy link
Author

asbe commented May 2, 2019

Sure. Node is v11.13.0. Running Windows10-v1803 (build 17134.753).

Pretty sure there is no special USB drivers interfering - but I may be wrong:

C:\Windows
λ driverquery.exe /V |grep usb
genericusbfn Generic USB Function C Generic USB Function C Kernel        Manual     Stopped    OK         FALSE       FALSE        4�096             12�288      0                                 C:\WINDOWS\system32\drivers\genericusbfn.sys     4�096
HidUsb       Microsoft HID Class Dr Microsoft HID Class Dr Kernel        Manual     Running    OK         TRUE        FALSE        8�192             24�576      0                                 C:\WINDOWS\system32\drivers\hidusb.sys           4�096
ibtusb       Intel(R) Wireless Blue Intel(R) Wireless Blue Kernel        Manual     Running    OK         TRUE        FALSE        4�096             110�592     0          05.12.2018 04:41:21    C:\WINDOWS\system32\DRIVERS\ibtusb.sys           4�096
mausbhost    MA-USB Host Controller MA-USB Host Controller Kernel        Manual     Stopped    OK         FALSE       FALSE        8�192             294�912     0                                 C:\WINDOWS\system32\drivers\mausbhost.sys        4�096
mausbip      MA-USB IP Filter Drive MA-USB IP Filter Drive Kernel        Manual     Stopped    OK         FALSE       FALSE        4�096             32�768      0                                 C:\WINDOWS\system32\drivers\mausbip.sys          4�096
TsUsbFlt     Remote Desktop USB Hub Remote Desktop USB Hub Kernel        Manual     Stopped    OK         FALSE       FALSE        4�096             40�960      0                                 C:\WINDOWS\system32\drivers\tsusbflt.sys         4�096
tsusbhub     Remote Desktop USB Hub Remote Desktop USB Hub Kernel        Manual     Running    OK         TRUE        FALSE        8�192             90�112      0                                 C:\WINDOWS\system32\drivers\tsusbhub.sys         4�096
usbaudio     USB Audio Driver (WDM) USB Audio Driver (WDM) Kernel        Manual     Running    OK         TRUE        FALSE        65�536            40�960      0                                 C:\WINDOWS\system32\drivers\usbaudio.sys         4�096
usbccgp      Microsoft USB Generic  Microsoft USB Generic  Kernel        Manual     Running    OK         TRUE        FALSE        49�152            77�824      0                                 C:\WINDOWS\system32\drivers\usbccgp.sys          4�096
usbcir       eHome Infrared Receive eHome Infrared Receive Kernel        Manual     Stopped    OK         FALSE       FALSE        20�480            73�728      0                                 C:\WINDOWS\system32\drivers\usbcir.sys           4�096
usbehci      Microsoft USB 2.0 Enha Microsoft USB 2.0 Enha Kernel        Manual     Stopped    OK         FALSE       FALSE        0                 69�632      0                                 C:\WINDOWS\system32\drivers\usbehci.sys          4�096
usbhub       Microsoft USB Standard Microsoft USB Standard Kernel        Manual     Stopped    OK         FALSE       FALSE        4�096             368�640     0                                 C:\WINDOWS\system32\drivers\usbhub.sys           4�096
usbohci      Microsoft USB Open Hos Microsoft USB Open Hos Kernel        Manual     Stopped    OK         FALSE       FALSE        0                 24�576      0                                 C:\WINDOWS\system32\drivers\usbohci.sys          4�096
usbprint     Microsoft USB PRINTER  Microsoft USB PRINTER  Kernel        Manual     Stopped    OK         FALSE       FALSE        4�096             20�480      0                                 C:\WINDOWS\system32\drivers\usbprint.sys         4�096
usbser       Microsoft USB Serial D Microsoft USB Serial D Kernel        Manual     Stopped    OK         FALSE       FALSE        20�480            40�960      0                                 C:\WINDOWS\system32\drivers\usbser.sys           4�096
usbuhci      Microsoft USB Universa Microsoft USB Universa Kernel        Manual     Stopped    OK         FALSE       FALSE        0                 28�672      0                                 C:\WINDOWS\system32\drivers\usbuhci.sys          4�096
usbvideo     USB Video Device (WDM) USB Video Device (WDM) Kernel        Manual     Running    OK         TRUE        FALSE        24�576            212�992     0                                 C:\WINDOWS\system32\Drivers\usbvideo.sys         4�096

Apart from that - listing registered dll etc with RegDllView shows no custom binaries registered, when searching for "usb". Nearly all libs used on this machine are handled by vcpkg - and listing installed shows no obvious culprits. Finally - I cannot find any matches to "libusb" in path (should catch both variants of the libusb-drivers).

@jontore
Copy link
Contributor

jontore commented May 3, 2019

Thank you abse for reporting this issue, I tried to reproduce this with nodist, and I could not. Could you try to update to the newest camera software and see if you still have this issue.

@asbe
Copy link
Author

asbe commented May 3, 2019

What is the version I should have on the camera? I have some issues with upgrading above 1.2.11-35134 using the Huddly app. This issue discussion is perhaps not the right place to ask, but is there any other tool I can use to flash the camera firmware?

@jontore
Copy link
Contributor

jontore commented May 7, 2019

The latest release is 1.2.16-38450 which is available in the app, you can actually use the sdk to upgrade provided you have the file you can see how it can be done programatically in the rest example (https://github.com/Huddly/sdk/blob/master/examples/rest/src/controllers/camera.js#L102).

@asbe
Copy link
Author

asbe commented May 8, 2019

Have checked on a Mac (running macOS Mojave) - and I'm able to upgrade to latest software as well as running the rest-api example. However - I still get the same error on Windows 10 - as well as autozoom not working in the app.

@asbe
Copy link
Author

asbe commented May 10, 2019

@jontore Are there any dependencies on network connection for the startup sequence of the API? I can access the localhost webserver just fine (have full control of my device) - but both the Huddly App (autozoom) and REST API will not work on hardened networks (such as the workplace network).

@asbe
Copy link
Author

asbe commented May 10, 2019

I've noticed that the device object is populated wrong and it seems that thus set up of transport fails, serialNumber is populated with "LIBUSB_ERROR_NOT_FOUND". Does this shed any light on the issue?

image

@jontore
Copy link
Contributor

jontore commented May 13, 2019

Hi, sorry for a late reply. The app needs internet access in order to get latest camera sw, which is something we've seen sometimes being blocked by a firewall. The rest api however does not go out on the network, but some machines might have sw installed blocking opening those. apis.

@jontore
Copy link
Contributor

jontore commented May 13, 2019

Ok, yes that might be a clue. I'll take a look and see if I can reproduce it

@jontore
Copy link
Contributor

jontore commented May 13, 2019

Looks like it might have a problem opening the device, https://github.com/Huddly/device-api-usb/blob/master/cpp/usb_worker.cpp#L174. Will look into why.

@asbe asbe closed this as completed Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants