UnhandledPromiseRejectionWarning
See original GitHub issueExpected Behavior
No errors logged
Current Behavior
Seeing the following error message logged multiple times:
(node:26877) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 342)
(node:26877) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'log' of undefined
at logRejection (/homebridge/node_modules/homebridge-tplink-smarthome/lib/homekit-device/index.js:102:14)
at runMicrotasks (<anonymous>:null:null)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Steps to Reproduce (for bugs)
The only thing of note is that this occurs for a device that is currently turned off (smart plug, not plugged in)
Versions
- Node: 14.15.0
- Homebridge: 1.3.4
- OS: Alpine Linux (3.12.1)
Configuration
{
"platform": "TplinkSmarthome",
"name": "TplinkSmarthome"
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Getting a UnhandledPromiseRejectionWarning when testing ...
On the console I'm getting an 'UnhandledPromiseRejectionWarning' even though the reject function is getting called since it instantly shows ...
Read more >What is UnhandledPromiseRejectionWarning
The Promise.reject() method returns a Promise object that is rejected with a given reason. The unhandledrejection event is sent to the global scope...
Read more >Fixing UnhandledPromiseRejectionWarning in Node.js
If we fail to handle a Promise rejection, we're shown the UnhandledPromiseRejectionWarning by Node.js. const slowAndSteady = new Promise( ...
Read more >Unhandled Promise Rejections in Node.js - The Code Barbarian
If you want to suppress the unhandled promise rejection warning, all you need to do is call .catch() on the promise with an...
Read more >Unhandled Promise Rejection Warning - Codecademy Forums
I keep getting this error when I run my code UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Should be fixed in the newest version
Thank you!