joelpurra / uvcc

USB Video Class (UVC) device configurator. Used for webcams, camcorders, etcetera. Command line interface for automation.
https://joelpurra.com/projects/uvcc/
GNU General Public License v3.0
95 stars 5 forks source link

commands take long time to finish after upgrade to node 17.0.1 #20

Closed galak closed 2 years ago

galak commented 2 years ago

Doing a command like:

kumar-macair:~ galak$ uvcc --verbose devices
Parsed arguments: {
  "address": 0,
  "cmd": "devices",
  "product": 0,
  "values": [],
  "vendor": 0,
  "verbose": true
}
[
  {
    "name": "HD Pro Webcam C920",
    "vendor": 1133,
    "product": 2194,
    "address": 5
  }
]

It will quickly report the output and than pause for 7-8 seconds before returning to prompt.

joelpurra commented 2 years ago

@galak: at this time it's unfortunately expected, due to the upstream delay fix in node-usb v1.8.0 being reverted in node-usb v1.9.1 as it caused other issues with Node.js.

The upstream error hasn't been fully resolved; I had a look a while ago but didn't find/fix the underlying issue. All uvcc users are encouraged to help out in node-usb so this can be fixed!

See

wookayin commented 2 years ago

The previous versions worked fine. Is downgrading node the only workaround?

joelpurra commented 2 years ago

Just released uvcc v5.0.2, targeting node-usb v1.9.2. (Actually semver ^1.9.2.) This version includes an upstream fix for the exit delay.

Install/upgrade with:

npm install --global uvcc@latest

I'll close this issue as fixed. Please confirm whether the fix works, or not!

wookayin commented 2 years ago

With uvcc@5.0.2, usb@2.1.3, node v17.3.0, this is happening again. Should I file a new issue?

joelpurra commented 2 years ago

@wookayin: yes, please!