mmende / homebridge-samsungtv-control2

homebridge-samsungtv-control2
MIT License
71 stars 17 forks source link

UnhandledPromiseRejectionWarning #66

Open 3zero2 opened 3 years ago

3zero2 commented 3 years ago

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)
ghost commented 3 years ago

I have this too.

chammond-alt commented 3 years ago

I also have this issue on the latest release.

TristanBrotherton commented 3 years ago

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)
haddadnj commented 3 years ago

Also have this, running on MacOS 11.4, node 12.18.2

jaydisc commented 3 years ago

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

TristanBrotherton commented 3 years ago

I tried downgrading and the issue persists for me.

mmende commented 3 years ago

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.

TristanBrotherton commented 3 years ago

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

ghost commented 3 years ago

works for me!

Reinboeng commented 3 years ago

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

phluorine commented 3 years ago

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.