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

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

Open
exemmer opened this issue Jan 17, 2021 · 1 comment
Open

Comments

@exemmer
Copy link

exemmer commented Jan 17, 2021

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)

@codetheweb
Copy link
Member

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.

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

2 participants