homebridge-samsungtv-control2
homebridge-samsungtv-control2 copied to clipboard
Does not work after updating to HB 1.3.0 - TypeError: Cannot read property 'log' of undefined
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 (node:internal/process/task_queues:93:5)
This error causes HB to get stuck in a constant service restart loop.
Please advise.
EDIT:
- Uninstalled plugin - Everything starts working fine.
- Unpaired SamsungTV Bridge
- Removed Accessory
- Restarted HomeBridge - Everything still working fine
- Installed 'SamsungTv Control' plugin again - HB Restart loop starts again
if I am not mistaken, looks like deviceChecks.push(checkDeviceDetails(headers, rinfo, log, config))
call in detectDevices.ts
is creating this issue, as log
is uninitiated here.
@mmende would you mind taking a look?
same issue here New plugin installation, same issue on detectDevices
@iperniaf don't think your code has been published yet in a new package.
For others facing the same issue please modify following file for now:
1. sudo nano /usr/lib/node_modules/homebridge-samsungtv-control/dist/utils/detectDevices.js
2. Scroll down till you see: logFn(chalk_1.default `Found unparsable model name ({red ${modelName}}) for device {blue ${friendlyName}}, usn: "{green ${usn}}". Skipping it.`);
3. Add // in front of it, and it should look like: //logFn(chalk_1.default `Found unparsable model name ({red ${modelName}}) for device {blue ${friendlyName}}, usn: "{green ${usn}}". Skipping it.`);