aangert / homebridge-musiccast-tv

Homebridge plugin for Yamaha MusicCast devices
GNU General Public License v3.0
15 stars 3 forks source link

TypeError: Cannot read property 'debug' of undefined after installing plugin #12

Closed zztopgtb closed 2 years ago

zztopgtb commented 3 years ago

Hi. After installing the plugin, homebridge does not fully boot up. This is what is in the log:

TypeError: Cannot read property 'debug' of undefined
    at Request._callback (/homebridge/node_modules/homebridge-musiccast-tv/index.js:34:12)
    at Request.self.callback (/homebridge/node_modules/homebridge-musiccast-tv/node_modules/request/request.js:185:22)
    at Request.emit (events.js:314:20)
    at Request.<anonymous> (/homebridge/node_modules/homebridge-musiccast-tv/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:314:20)
    at IncomingMessage.<anonymous> (/homebridge/node_modules/homebridge-musiccast-tv/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:420:28)
    at IncomingMessage.emit (events.js:326:22)
    at endReadableNT (_stream_readable.js:1223:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)

I've tried a few things but nothing works. This has happened for some time now. I recall months ago trying the plugin and the same thing happened. I end up uninstalling the plugin to get hombrdige working again.

I'd love to be able to use this plugin as I have a few of the original musiccast devices.

Thanks in advance.

aangert commented 3 years ago

Which versions of node, npm and homebridge are you running? Could you post the debug log(homebridge -D)?

zztopgtb commented 3 years ago

Thanks

/homebridge # node -v v12.19.0

Debug output:

[1/11/2021, 10:07:03 AM] [Living Room Soundbar] Initializing MusicCastTV accessory...
[1/11/2021, 10:07:03 AM] [Living Room Soundbar] {
  accessory: 'MusicCastTV',
  name: 'Living Room Soundbar',
  ip: '192.168.1.250',
  inputs: {
    airplay: 'AirPlay',
    net_radio: 'Internet Radio',
    tv: 'TV',
    server: 'NicholsDS'
  }
}
[1/11/2021, 10:07:03 AM] [Living Room Soundbar] updating name for airplay
[1/11/2021, 10:07:03 AM] [Living Room Soundbar] updating name for net_radio
[1/11/2021, 10:07:03 AM] [Living Room Soundbar] updating name for tv
[1/11/2021, 10:07:03 AM] [Living Room Soundbar] updating name for server
[1/11/2021, 10:07:03 AM] [Living Room Soundbar] Initialized 'Living Room Soundbar'
[1/11/2021, 10:07:03 AM] [Living Room Soundbar] processing input airplay
[1/11/2021, 10:07:03 AM] [Living Room Soundbar] processing input net_radio
[1/11/2021, 10:07:03 AM] [Living Room Soundbar] processing input tv
[1/11/2021, 10:07:03 AM] [Living Room Soundbar] processing input server
[1/11/2021, 10:07:03 AM] [Living Room Soundbar] func_list: ["wired_lan","wireless_lan","wireless_direct","network_standby","auto_power_standby","bluetooth_tx_setting","airplay","speaker_settings","disklavier_settings","network_reboot"], zone_num: 1
[1/11/2021, 10:07:03 AM] [Living Room Soundbar] zone: [{"id":"main","func_list":["power","volume","mute","sound_program","enhancer","tone_control","clear_voice","subwoofer_volume","signal_info","prepare_input_change","link_control","link_audio_delay","link_audio_quality"],"input_list":["pandora","spotify","tidal","deezer","airplay","mc_link","server","net_radio","bluetooth","hdmi1","hdmi2","hdmi3","tv","aux1","aux2"],"sound_program_list":["concert","jazz_club","sports","game","music_video","spectacle","sci-fi","adventure","drama","talk_show","stereo","my_surround","target","off"],"tone_control_mode_list":["manual"],"link_control_list":["speed","standard","stability"],"link_audio_delay_list":["audio_sync","lip_sync"],"link_audio_quality_list":["compressed","uncompressed"],"range_step":[{"id":"volume","min":0,"max":100,"step":1},{"id":"tone_control","min":-12,"max":12,"step":1},{"id":"subwoofer_volume","min":-20,"max":20,"step":1}]}]
[1/11/2021, 10:07:03 AM] TypeError: Cannot read property 'debug' of undefined
    at Request._callback (/homebridge/node_modules/homebridge-musiccast-tv/index.js:34:12)
    at Request.self.callback (/homebridge/node_modules/homebridge-musiccast-tv/node_modules/request/request.js:185:22)
    at Request.emit (events.js:314:20)
    at Request.<anonymous> (/homebridge/node_modules/homebridge-musiccast-tv/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:314:20)
    at IncomingMessage.<anonymous> (/homebridge/node_modules/homebridge-musiccast-tv/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:420:28)
    at IncomingMessage.emit (events.js:326:22)
    at endReadableNT (_stream_readable.js:1223:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
[1/11/2021, 10:07:03 AM] Got SIGTERM, shutting down Homebridge...
zztopgtb commented 3 years ago

Node.js Version v12.19.0 NPM version v6.14.8

aangert commented 3 years ago

Could you run npm outdated -g and homebridge -V to check if everything is up to date?

Your setup should work with homebridge v1.1.7 and homebridge-musiccast-tv v1.6.2

zztopgtb commented 3 years ago

Thanks. See output below.

/homebridge # homebridge -V
1.2.5
/homebridge # npm outdated -g
Package     Current   Wanted   Latest  Location
homebridge    1.2.5    1.2.5    1.1.7  global
npm         6.14.10  6.14.11  6.14.11  global

I am still getting the same error, below:

[1/18/2021, 9:18:28 AM] TypeError: Cannot read property 'debug' of undefined
    at Request._callback (/homebridge/node_modules/homebridge-musiccast-tv/index.js:34:12)
    at Request.self.callback (/homebridge/node_modules/homebridge-musiccast-tv/node_modules/request/request.js:185:22)
    at Request.emit (events.js:315:20)
    at Request.<anonymous> (/homebridge/node_modules/homebridge-musiccast-tv/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:315:20)
    at IncomingMessage.<anonymous> (/homebridge/node_modules/homebridge-musiccast-tv/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:421:28)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
aangert commented 3 years ago

homebridge v1.2.* is buggy, try installing v1.1.7

See homebridge issue 2752

zztopgtb commented 3 years ago

Thanks.

That didnt seem to change anything. Though I did notice when adding the config, I copied the example config but forgot to change to my devices details and it actually appeared as an accessory, which I have been unable to get at all.

The logs say "[Living Room Radio] connect EHOSTUNREACH 192.168.178.2:80".

When running into the issues I initially mentioned (in the above comments) and adding my specific config, the Homebridge service actually does not start and it wont start until I remove the config or the plugin.

This leads me to think my config is the cause of the issue, or something similar?

zztopgtb commented 3 years ago

To add to my previous comment, I just tried using the exact same example config but changing the IP address to my Musiccast device, but it resulted in the same initial error "TypeError: Cannot read property 'debug' of undefined"

aangert commented 3 years ago

This looks like an issue with your configuration or installation, unfortunately I'm unable to reproduce it Does homebridge -V return v1.1.7? Is there more than one TV per homebridge instance?

aangert commented 2 years ago

Closed - No further information provided