Closed brandonros closed 4 years ago
C:\Users\Brandon\Documents\GitHub\bash-uds-flasher\can-utils-js>npm install
> usb@1.6.3 install C:\Users\Brandon\Documents\GitHub\bash-uds-flasher\can-utils
-js\node_modules\usb
> prebuild-install --verbose || node-gyp rebuild
prebuild-install info begin Prebuild-install version 5.3.3
prebuild-install info looking for cached prebuild @ C:\Users\Brandon\AppData\Roa
ming\npm-cache\_prebuilds\579ac7-usb-v1.6.3-node-v72-win32-ia32.tar.gz
prebuild-install info found cached prebuild
prebuild-install info unpacking @ C:\Users\Brandon\AppData\Roaming\npm-cache\_pr
ebuilds\579ac7-usb-v1.6.3-node-v72-win32-ia32.tar.gz
prebuild-install info unpack resolved to C:\Users\Brandon\Documents\GitHub\bash-
uds-flasher\can-utils-js\node_modules\usb\build\Release\usb_bindings.node
prebuild-install info unpack required C:\Users\Brandon\Documents\GitHub\bash-uds
-flasher\can-utils-js\node_modules\usb\build\Release\usb_bindings.node successfu
lly
1
npm[7280]: c:\ws\src\node_buffer.cc:370: Assertion `(data) != nullptr' failed.
npm ERR! code ELIFECYCLE
npm ERR! errno 134
Have you tried Node 10?
Yes. The way you listUSBDevices
is kind of bad.
try {
e.configDescriptor, e.allConfigDescriptors, e.deviceDescriptor
} catch (e) {
return Promise.resolve(null)
}
this code crashes all node.js versions on all windows version with a C++ segfault
commenting out e.allConfigDescriptors
yields some succes
then when you open all devices in getCapabilities
, that causes another segfault
i'm gonna have to fork this awesome library you did for my needs to just open USB devices matching filters
can you pass options.filters
all the way into
adapter
private loadDevices(filters): Promise<Array<Device>> {
// Reset device cache
this.devices = {};
const devices = getDeviceList().filter(device => {
})
return this.serialPromises(this.loadDevice, devices);
}
that will yield much better results for people on windows
can you pass options.filters all the way into... loadDevices
I like that idea, see https://github.com/thegecko/webusb/pull/70
So glad I came across this thread. I could not figure out why my code was working on MacOS and Linux, and then everything just crashes on Windows (7 and 10). For a couple of days I thought it was USB driver-related, so I've been trying WinUSB, libusbK etc.
Any idea when these changes will be out of preview @thegecko ?
Any idea when these changes will be out of preview
Once I hear they have fixed the issue :) The preview is on npm here:
Well, they fixed they fixed the issue for me :+1: How about you @brandonros ?
all good
@thegecko Are you still waiting on something else to confirm that this is now fixed before the next release?
Are you still waiting on something else...
My holiday to finish. I'm back now and have released v2.1.0
Thanks @thegecko , hope you had a good holiday!
there never gets printed
node v12.18.1
windows 7 64-bit
webusb@2.0.2