question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UnhandledPromiseRejectionWarning

See original GitHub issue

Expected 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:open
  • Created 2 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
plasticrakecommented, May 8, 2021

Should be fixed in the newest version

0reactions
wtdeanecommented, May 9, 2021

Thank you!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found