Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work after updating to HB 1.3.0 - TypeError: Cannot read property 'log' of undefined #54

Open
TheEngineerGuy opened this issue Feb 21, 2021 · 3 comments

Comments

@TheEngineerGuy
Copy link

TheEngineerGuy commented Feb 21, 2021

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:

  1. Uninstalled plugin - Everything starts working fine.
  2. Unpaired SamsungTV Bridge
  3. Removed Accessory
  4. Restarted HomeBridge - Everything still working fine
  5. Installed 'SamsungTv Control' plugin again - HB Restart loop starts again
@TheEngineerGuy TheEngineerGuy changed the title After updating to HB 1.3.0 - TypeError: Cannot read property 'log' of undefined Does not work after updating to HB 1.3.0 - TypeError: Cannot read property 'log' of undefined Feb 21, 2021
@TheEngineerGuy
Copy link
Author

TheEngineerGuy commented Feb 25, 2021

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?

@iperniaf
Copy link

same issue here
New plugin installation, same issue on detectDevices

iperniaf added a commit to iperniaf/homebridge-samsungtv-control2 that referenced this issue Apr 12, 2021
@TheEngineerGuy
Copy link
Author

@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.`);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants