cli icon indicating copy to clipboard operation
cli copied to clipboard

Version 1.15.0 Thows Unhandled 'error' event every 2-3 times of use

Open exemmer opened this issue 4 years ago • 1 comments

Error thrown " throw er; // Unhandled 'error' event" Retry, ditto, Retry again.....then works as it should.

example: (issue happens with get and set)

tuya-cli get --id [myid]--key [mykey] --ip [myip] --protocol-version 3.3 -a events.js:291 throw er; // Unhandled 'error' event ^

Error: Error from socket at Socket. (/usr/lib/node_modules/@tuyapi/cli/node_modules/tuyapi/index.js:388:30) at Socket.emit (events.js:314:20) at emitErrorNT (internal/streams/destroy.js:92:8) at emitErrorAndCloseNT (internal/streams/destroy.js:60:3) at processTicksAndRejections (internal/process/task_queues.js:84:21) Emitted 'error' event on TuyaDevice instance at: at Socket. (/usr/lib/node_modules/@tuyapi/cli/node_modules/tuyapi/index.js:388:16) at Socket.emit (events.js:314:20) [... lines matching original stack trace ...] at processTicksAndRejections (internal/process/task_queues.js:84:21)

exemmer avatar Jan 17 '21 18:01 exemmer

If you're experiencing intermittent errors, it's very likely something else is trying to control your device / get the status at the same time. Please double check the app is completely closed on your phone and there are no other processes attempting to connect to it.

codetheweb avatar Jan 17 '21 18:01 codetheweb