homebridge-samsungtv-control2 icon indicating copy to clipboard operation
homebridge-samsungtv-control2 copied to clipboard

UnhandledPromiseRejectionWarning

Open 3zero2 opened this issue 3 years ago • 11 comments

Looks like the plugin has stopped working for me, giving out the following error. No changes have been made to config or setup in months, apart from installing the latest updates.

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'log' of undefined
    at debug (/usr/lib/node_modules/homebridge/src/logger.ts:143:10)
    at checkDeviceDetails (/usr/lib/node_modules/homebridge-samsungtv-control/src/utils/detectDevices.ts:85:5)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

3zero2 avatar Jun 11 '21 20:06 3zero2

I have this too.

ghost avatar Jun 22 '21 09:06 ghost

I also have this issue on the latest release.

chammond-alt avatar Jun 22 '21 17:06 chammond-alt

I also have this error. Running on Ubuntu Focal Fossil

[6/22/2021, 11:00:02 AM] Homebridge v1.3.4 (Homebridge Corvid) is running on port 51171.
(node:364577) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'log' of undefined
    at debug (/usr/local/lib/node_modules/homebridge/src/logger.ts:143:10)
    at checkDeviceDetails (/usr/local/lib/node_modules/homebridge-samsungtv-control/src/utils/detectDevices.ts:85:5)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:364577) 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(). (rejection id: 1)
(node:364577) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:364577) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
(node:364577) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'log' of undefined
    at debug (/usr/local/lib/node_modules/homebridge/src/logger.ts:143:10)
    at checkDeviceDetails (/usr/local/lib/node_modules/homebridge-samsungtv-control/src/utils/detectDevices.ts:85:5)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:364577) 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(). (rejection id: 3)

TristanBrotherton avatar Jun 22 '21 18:06 TristanBrotherton

Also have this, running on MacOS 11.4, node 12.18.2

haddadnj avatar Jun 24 '21 00:06 haddadnj

I was seeing this problem with v2.0.1 on macOS High Sierra. I downgraded to v2.0.0 and it went away.

jaydisc avatar Jun 25 '21 01:06 jaydisc

I tried downgrading and the issue persists for me.

TristanBrotherton avatar Jun 26 '21 15:06 TristanBrotherton

I don't know why these errors suddenly appeared. however I just published a patch with a workaround that seemed to eliminate this issue for me. Let me know if this specific problem still exists for you in v2.0.2.

mmende avatar Jun 27 '21 09:06 mmende

This resolved the issue for me! Thank you for all your work.

TristanBrotherton avatar Jun 28 '21 01:06 TristanBrotherton

works for me!

ghost avatar Jun 28 '21 07:06 ghost

@mmende unfortunately this does not seem to work for #56.

Reinboeng avatar Jun 28 '21 18:06 Reinboeng

Still not working for me. My TV (UN60KU6270) will pair with an iPhone app (https://apps.apple.com/us/app/smart-remote-for-samsung-tvs/id1153897380) but I'm still getting the UnhandledPromiseRejectionWarning with homebridge-samsungtv-control 2.0.2 on RPi Raspbian 5.10.17 and Homebridge 1.3.4

Various options of the pair2 method also fail, and legacy mode won't work because my TV is newer and requires some sort of pairing.

phluorine avatar Aug 09 '21 16:08 phluorine