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

HomeBridge quits on error 'tls.convertNPNProtocols is not a function' #12

Closed
ronzelver opened this issue Oct 11, 2018 · 13 comments
Closed

Comments

@ronzelver
Copy link

Since I installed the latest version (2.1.0) HomeBridge no longer starts, in the logfile I see the following statement:
TypeError: tls.convertNPNProtocols is not a function
followed by
Oct 11 20:45:34 SACLRPi3 systemd[1]: homebridge.service: Main process exited, code=exited, status=1/FAILURE Oct 11 20:45:34 SACLRPi3 systemd[1]: homebridge.service: Unit entered failed state. Oct 11 20:45:34 SACLRPi3 systemd[1]: homebridge.service: Failed with result 'exit-code'.

When I remove this plugin HomeBridge works.

@robertklep
Copy link
Owner

robertklep commented Oct 11, 2018

Strange. Which version of Node are you using? And which other plugins?

@ronzelver
Copy link
Author

Node version v8.9.4
Other plugins:

  • homebridge-broadlink-rm v3.5.5
  • homebridge-config-ui-x v3.8.11
  • homebridge-daikin v0.1.4
  • homebridge-foscamcamera v0.3.1
  • homebridge-homewizard v0.0.59
  • homebridge-lifx-lan v0.2.6
  • homebridge-rpitemp v0.1.0
  • homebridge-platform-ring-video-doorbell v0.12.1

@ronzelver
Copy link
Author

I've reinstalled v2.0.0 and now it works without problems (with the above mentioned other plugins)

@robertklep
Copy link
Owner

My guess is that one of the other plugins, or one of its dependencies, might be using tls.convertNPNProtocols, which has been deprecated.

To prevent a dependency of homebridge-nefit-easy from using it, I assign null to it, but it looks like that is breaking something else. Reverting back to v2.0.0 will solve that issue, but v2.0.0 will cause other problems.

Do you have a larger stacktrace for me?

@gladiatormax
Copy link

Hi Robert,

I have the same problem.

@robertklep
Copy link
Owner

@gladiatormax same questions: which Node version are you using, and which other plugins?

@gladiatormax
Copy link

I am using node version 8.12.0 with,

homebridge-zp v0.2.35
homebridge-wol v3.2.4
homebridge-samsungtv-control v1.1.1
homebridge-milight v1.1.4
homebridge-harmonyhub v0.3.0-alpha.2
homebridge-config-ui-x v3.8.11
homebridge-camera-ffmpeg v0.1.8
homebridge-broadlink-rm v3.5.5

@robertklep
Copy link
Owner

Since there's an overlap in the plugins that you both use, the problem might be caused by either homebridge-broadlink-rm or homebridge-config-ui-x.

Could you try and remove each one (separately) to see is the problem goes away?

@gladiatormax
Copy link

I reinstalled everything with nodejs version 8.12.0 because the zp pluging was asking for it and now it is working.

@robertklep
Copy link
Owner

@gladiatormax thanks for the update :) does sound like one of the other plugins needed to be updated.

@RaimondB
Copy link

RaimondB commented Dec 27, 2018

@robertklep
I have somebody that has trouble with the node-red version of the nefite-easy pulign that also uses nefit-easy-core. He is using it within HomeAssistant/Hassio.
RaimondB/node-red-contrib-nefit-easy#9

Seems to be the same cause?
Do you know what plugin was the cause?

In Nefit-easy-core, there is this line
require('tls').convertNPNProtocols = null;

That is the one you are mentioning I think?

@robertklep
Copy link
Owner

@RaimondB yes, that line is likely to be causing the problem (in another Node.js module).

I have to admit that assigning that function to null is a bit of a hack, but it's required to get nefit-easy-core to work properly. However, it has always been an undocumented function to begin with, so shouldn't really have been used anyway.

I can't definitively say what's causing the error for your user, also because there are a lot of moving parts to their setup (Hassio, Node-RED, possibly other nodes that they have installed).

@ronzelver
Copy link
Author

I solved the issue by upgrading to node version v8.16.0. Version 2.1.2 of the plugin is now running fine.

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

4 participants