homebridge/homebridge-config-ui-x

Homebridge crashing after UI update to 4.55.0 with node.js 20.10.0

Tellicious opened this issue ยท 26 comments

Describe The Bug

As soon as Homebridge-config-ui-x is updated to 4.55.0 with node 20.10.0, homebridge keeps restarting after showing the message below. UI V4.55.0 seems to work fine with node 18.19.0 and UI v4.54.1 works fine with node 20.10.0.

I tried rebuilding several times, re-installing homebridge, changing the update order (node-first or UI-first) without any luck.

Logs

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at equalTxt (/opt/homebridge/lib/node_modules/homebridge-config-ui-x/node_modules/bonjour-service/src/lib/utils/equal-txt.ts:2:24)
    at Browser.updateService (/opt/homebridge/lib/node_modules/homebridge-config-ui-x/node_modules/bonjour-service/src/lib/browser.ts:145:21)
    at /opt/homebridge/lib/node_modules/homebridge-config-ui-x/node_modules/bonjour-service/src/lib/browser.ts:108:30
    at Array.forEach (<anonymous>)
    at /opt/homebridge/lib/node_modules/homebridge-config-ui-x/node_modules/bonjour-service/src/lib/browser.ts:106:25
    at Array.forEach (<anonymous>)
    at EventEmitter.onresponse (/opt/homebridge/lib/node_modules/homebridge-config-ui-x/node_modules/bonjour-service/src/lib/browser.ts:98:34)
    at EventEmitter.emit (node:events:514:28)
    at Socket.<anonymous> (/opt/homebridge/lib/node_modules/homebridge-config-ui-x/node_modules/multicast-dns/index.js:49:43)
    at Socket.emit (node:events:514:28)
    at UDP.onMessage (node:dgram:941:8)

Config

No response

Homebridge UI Version

4.55.0

Homebridge Version

1.7.0

Node.js Version

20.10.0

Operating System

Raspberry Pi OS / Raspbian

Environment Info

  • Using Docker?
  • Using Hyper-V?
  • Using hb-service?

Raspberry Pi Model

Raspberry Pi 4 B

Are you able to get into Homebridge Settings, in the UI? Or can you access the config.json?

Can you update the mDNS Advertiser to something different? Looks like you are on bonjour, would be curious if you get the same thing with ciao?

Same thing with ciao here, tried v.4.55.1-alpha 1-alpha broke down totally homebridge on hyper V. Was forced to delete homebridge from hyper V manager, and reinstall it from the beginning, Now using homebridge UI V4.54.2 and everything is fine.

Actually I'm already using ciao

That's my config.json snippet:

"bridge": {
        "name": "Homebridge",
        "username": "xxx",
        "port": 51409,
        "pin": "xxx",
        "advertiser": "ciao",
        "bind": [
            "eth0"
        ]
    }

Same problem here, I use Avahi as mDNS advertiser. I have manually entered ciao in config.json, then it works again. When I switch back to Avahi, it stops working again. For the time being I have to stay with ciao until the problem is solved.

Same here... I have to reinstall Homebridge completely. Back to UI ver 4.54.2

Can someone test out a theory, go into Homebridge settings and turn off insecure mode (Control Accessories from Homebridge UI) and restart.

image

Yes it works with insecure mode off , the loop stops, but once insecure mode is enabled, the loop is back.

Yes it works with insecure mode off , the loop stops, but once insecure mode is enabled, the loop is back.

Thanks! If we could get one more to test to verify.

Looks like this might be from an update of a dependency.

Same behaviour:
Insecure mode turned off fixed the restart and homekit is stable.
Insecure mode on introduces the UI restarts and homekit keeps polling homebridge devices.

Thanks. For now please keep insecure mode off, until we can we can get the dependency to resolve the issue.

Confirm that with insecure mode off everything works fine

Work like a charm with insecure mode!

Can you try the latest beta:

npm version

Click here to find out how to install Beta

Then after install please try insecure mode again and let us know if this beta resolves your issue and we will push out a new version.

4.55.1-beta.2 seems to stop the endless restart cycle for me.

4.55.1-beta.2 seems to stop the endless restart cycle for me.

And you have insecure mode enabled?

Yes, re-enabled it after upgrading.

If we can get feedback from one more that this resolve the issue. We will push out 4.55.1

update to beta fixed for me

How to turn off insecure mode if my UI is unresponsive/offline?

@DaphneINOPIA you can update via the command line if this is something you have ever done before?

How to turn off insecure mode if my UI is unresponsive/offline?

In my case the UI stayed up long enough to change the setting and manually restart.

My UI was completely dead that's why I had asked but I see the new update fixes the whole issue so thank you everyone who replied. I updated to the newest versione via cli

There was a fix that was implemented to the bonjour-service package. So we have reverted the quick fix to allow for the newer version of bonjour-service, so now we have a new beta.

Can someone try the latest beta and confirm that this fix resolves the issues we were having:

npm version

Click here to find out how to install Beta Versions

v4.55.2-beta.2 works for me also with insecure mode enabled

Can someone try the latest beta and confirm that this fix resolves the issues we were having:

So far, so good.

Updated to beta.2, insecure mode still enabled, and it's not (yet) restarted itself.

Thanks everyone! Going to close this comment as we will release this in the next version.