I was using noble node module to connect to blue-tooth devices, my code works perfectly on a mac machine, but I am facing some issues on a windows machine. I followed all the steps suggested by noble team here https://github.com/noble/noble#windows
But I face this error, any ideas why this is happening?
this.__open()
^
Error: LIBUSB_ERROR_ACCESS
at Device.usb.Device.open (C:\Users\Temp\Desktop\proj\node_modules\usb\usb.js:33:7)
at BluetoothHciSocket.bindUser (C:\Users\Temp\Desktop\proj\node_modules\bluetooth-hci-socket\lib\usb.js:73:19)
at BluetoothHciSocket.bindRaw (C:\Users\Temp\Desktop\proj\node_modules\bluetooth-hci-socket\lib\usb.js:28:8)
at Hci.init (C:\Users\Temp\Desktop\proj\node_modules\noble\lib\hci-socket\hci.js:101:35)
at NobleBindings.init (C:\Users\Temp\Desktop\proj\node_modules\noble\lib\hci-socket\bindings.js:82:13)
at Noble.<anonymous> (C:\Users\Temp\Desktop\proj\node_modules\noble\lib\noble.js:57:24)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:695:11)
at startup (bootstrap_node.js:188:16)
This happened to me because I was apparently using the wrong libusb driver.
Using Zadig I swapped to the WinUSB driver for the devices I was trying to talk to and then I stopped getting these unexpected LIBUSB_ERROR_ACCESS errors. I think the libusb* drivers work as well.
Related
I have been working on a bot for some time now. Since I updated it to v15.5.0, after a while it works fine, does exactly what I want but then crashes, giving the following error. This seems to be a TLS issue.
Error: Client network socket disconnected before secure TLS connection was established
at connResetException (node:internal/errors:631:14)
at TLSSocket.onConnectEnd (node:_tls_wrap:1565:19)
at TLSSocket.emit (node:events:388:22)
at endReadableNT (node:internal/streams/readable:1305:12)
at processTicksAndRejections (node:internal/process/task_queues:80:21)
The source code for the bot is here
Will I have to downgrade? If so, to what version of node?
I'm using this on a Windows 10 64bit computer with no proxy settings whatsoever.
This is not related to Node.js v15, but it seems like it is an issue on your end (with your connection, or your computer). this question may help you to resolve your issue.
error in console
shubhabrata#shubhabrata-VirtualBox:~/Meteor/myapp$ mupx deploy
Meteor Up: Production Quality Meteor Deployments
Configuration file : mup.json
Settings file : settings.json
“ Checkout Kadira!
It's the best way to monitor performance of your app.
Visit: https://kadira.io/mup ”
Meteor app path : /home/shubhabrata/Meteor/myapp
Using buildOptions : {}
buffer.js:80
throw new Error(
^
Error: If encoding is specified then the first argument must be a string
at new Buffer (buffer.js:80:13)
at Readable. (/usr/lib/node_modules/mupx/node_modules/archiver/lib/util/index.js:32:15)
at emitNone (events.js:91:20)
at Readable.emit (events.js:188:7)
at endReadableNT (_stream_readable.js:975:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
Switching from node 7 to node 5.12 worked for me. I installed using nvm so that I can use later node versions in the future.
This occurred for me while using (deliberately) an old version of mup. It could well be that just upgrading mup will fix the problem.
I would like to know why am I getting the following error when I try to debug node app using node inspector.
Debugger listening on port 5858
events.js:154
throw er; //unhandled 'error' event
Error: spawn C:\Users\Dell\AppData\Local\Google\Chrome\Application\Chrome.exe ENOENT
at exports._errnoException (util.js:890:11)
at Process.ChildProcess._handle.inexit(internal/child_process.js:182:32)
at onErrorNT (internal/child_process.js:348:16)
at _combinedTickCallback (node.js:383:13)
at process._tickCallback (node.js:407:11)
I believe this error was similar to the error reported at https://github.com/node-inspector/node-inspector/issues/732. But however I didn't get as new_chrome.exe.
Any help is appreciated
node version is 5.9.1
node debug version is 0.12.7
EDIT: Actually the problem is chrome.exe file is inside "Program Files(86)" , but while running node-debug it is searching in user folder. So it is something to do with node-module browser-launcher When I run detect.js, in browser-launcher2/examples , its returning me the correct chrome.exe path, but when I run launch.js, it is returning me the above error, since it was trying to find chrome.exe inside user folder. Any thoughts on this?
UPDATE: Added the temporary solution. It worked for me.
NOTE: This is a temporary solution. I am keeping this question open, so as to get a permanent solution for this error. Happy coding :)
I solved the above issue temporarily using James-Browser-Launcher module. Just install the module and run examples/launch.js in the terminal. Once launched, your default browser would open. Now run
node-debug
it launched the browser without error for me. Thats it. It would work now. Hope it works for you too
This works for me:
Go to C:\Users\youruser\ .config\browser-launcher2
open config.json
If there are more than two instances of Chrome, uninstall the error instance first and delete the error entry at file and his associated folder in this path. In my case, the error was Chrome Canary :
Example
And then, node-inspector works with Standar Chrome!!!
I'm trying to transfer my application to a new machine. It works on the old machine perfectly, and I have been trying to copy the settings as closely as possible, but there is something missing. This is the error I'm getting:
Unhandled rejection SequelizeConnectionError: Handshake inactivity timeout
at Handshake._callback (/Applications/MAMP/htdocs/dashboard-server/node_modules/sequelize/lib/dialects/mysql/connection-manager.js:63:20)
at Handshake.Sequence.end (/Applications/MAMP/htdocs/dashboard-server/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)
at /Applications/MAMP/htdocs/dashboard-server/node_modules/mysql/lib/protocol/Protocol.js:393:18
at Array.forEach (native)
at /Applications/MAMP/htdocs/dashboard-server/node_modules/mysql/lib/protocol/Protocol.js:392:13
at doNTCallback0 (node.js:417:9)
at process._tickCallback (node.js:346:13)
Thoughts?
Just confirmed the problem is either Sequelize / mysql in conjunction with Node 4.2.0 after manually re-installing 4.1.1 my problems went away.
Downgrade to Node 4.1.x or wait for a patch/fix/etc to solve your issues.
Additional Information
The bug has been reported here on the node-mysql repository issue tracker. Seems someone regressed something in Node 4.2.0 and it wasn't caught. Here's the pull request to fix it which was merged in and is in the candidate for 4.2.1.
Update Oct 13th, 2015
Node 4.2.1 was just released (Changelog) containing the aforementioned fix. Upgrading to 4.2.1 should also fix your problems.
$ node hello.js
1436894483255 Device(s) /dev/ttyUSB0
1436894483279 Connected /dev/ttyUSB0
1436894493287 Device or Firmware Error A timeout occurred while connecting to the Board.
Please check that you've properly flashed the board with the correct firmware.
See: https://github.com/rwaldron/johnny-five/wiki/Getting-Started#trouble-shooting
events.js:87
throw Error('Uncaught, unspecified "error" event.');
^
Error: Uncaught, unspecified "error" event.
at Error (native)
at Board.emit (events.js:87:13)
at Board.log (/usr/lib/node_modules/johnny-five/lib/board.js:623:8)
at Board.(anonymous function) [as error] (/usr/lib/node_modules/johnny-five/lib/board.js:634:14)
at Board.<anonymous> (/usr/lib/node_modules/johnny-five/lib/board.js:407:12)
at Timer.listOnTimeout (timers.js:119:15)
I have installed node and johnny-five on Ubuntu and connected Arduino Nano. But it's throwing the above error.
before you run your node app, try to open arduino:
$ arduino
go to to file > Examples > Firmata, and choose StandardFirmata
once it opens upload it to your arduino.
when done, you should be able to run your node app without any problems
The arduino IDE might be holding the connection to the board. Try closing it.