snowdd1 / homebridge-knx

KNX platform shim for homebridge
https://github.com/nfarina/homebridge
GNU General Public License v2.0
97 stars 55 forks source link

Homebridge Crash (AssertionError) after upgrading to v0.4.3 #208

Closed Kai0711er closed 1 year ago

Kai0711er commented 1 year ago

After upgrading to version v0.4.3 my Homebridge instance keeps crashing with the following error:

SCR-20230407-tcv

I already tied a lot:

and probably some more suff I forgot...

Unfortunately none of the above could solve the problem. Looking forward to any suggestions and feedback. I really don't even know if this problem is only a matter of homebridge-knx or homebridge itself. I can however pinpoint it to at least a combination of the two, as the Homebridge instance runs fine if the KNX plugin is omitted from the config.

Thanks Kai

Kai0711er commented 1 year ago

nvm. Found my error. Was related to my own installation

snowdd1 commented 1 year ago

and I was about to ask for details...

cvuzem commented 1 year ago

Same issue since the update to version 0.4.3:

Apr 19 12:09:49 homebridge homebridge[18311]: [19/04/2023, 12:09:49] AssertionError [ERR_ASSERTION]: Cannot generate setupURI on an accessory that isn't published yet! Apr 19 12:09:49 homebridge homebridge[18311]: at Bridge.Accessory.setupURI (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:994:11) Apr 19 12:09:49 homebridge homebridge[18311]: at Server.setServerStatus (/usr/local/lib/node_modules/homebridge/src/server.ts:155:45) Apr 19 12:09:49 homebridge homebridge[18311]: at Server.teardown (/usr/local/lib/node_modules/homebridge/src/server.ts:199:10) Apr 19 12:09:49 homebridge homebridge[18311]: at signalHandler (/usr/local/lib/node_modules/homebridge/src/cli.ts:93:12) Apr 19 12:09:49 homebridge homebridge[18311]: at process.emit (node:events:513:28) Apr 19 12:09:49 homebridge homebridge[18311]: at process.emit (/usr/local/lib/node_modules/homebridge/node_modules/source-map-support/source-map-support.js:516:21)

Kai0711er commented 1 year ago

For me it was a custom handler I added that somehow got removed during the update process...

cvuzem commented 1 year ago

I also use some handlers: OneWaySwitch, Dimmer, ValveControl and GiraJalousieActuator. How do I solve the problem now?

cvuzem commented 1 year ago

Any idea what I need to change/do?

Kai0711er commented 1 year ago

For me it was just adding my custom handler again. So if any of the handler you use were manually added you will probably have to add those again in /lib/addins

cvuzem commented 1 year ago

What's weird is that I don't use my own handlers.

cvuzem commented 1 year ago

You're right. Before the update, I probably had one more handler "ValveControl". I have now added this again, but I get the following error: Apr 25 17:36:31 homebridge homebridge[2913]: [25/04/2023, 17:36:31] [KNX] customServiceAPI.constructor(service, ValveControl) Apr 25 17:36:31 homebridge homebridge[2913]: [25/04/2023, 17:36:31] Error: Cannot find module 'moment' Apr 25 17:36:31 homebridge homebridge[2913]: Require stack: Apr 25 17:36:31 homebridge homebridge[2913]: - /usr/local/lib/node_modules/homebridge-knx/lib/addins/ValveControl.js Apr 25 17:36:31 homebridge homebridge[2913]: - /usr/local/lib/node_modules/homebridge-knx/lib/customServiceAPI.js Apr 25 17:36:31 homebridge homebridge[2913]: - /usr/local/lib/node_modules/homebridge-knx/lib/service-knx.js Apr 25 17:36:31 homebridge homebridge[2913]: - /usr/local/lib/node_modules/homebridge-knx/lib/knxdevice.js Apr 25 17:36:31 homebridge homebridge[2913]: - /usr/local/lib/node_modules/homebridge-knx/index.js Apr 25 17:36:31 homebridge homebridge[2913]: - /usr/local/lib/node_modules/homebridge/lib/plugin.js Apr 25 17:36:31 homebridge homebridge[2913]: - /usr/local/lib/node_modules/homebridge/lib/pluginManager.js Apr 25 17:36:31 homebridge homebridge[2913]: - /usr/local/lib/node_modules/homebridge/lib/server.js Apr 25 17:36:31 homebridge homebridge[2913]: - /usr/local/lib/node_modules/homebridge/lib/cli.js Apr 25 17:36:31 homebridge homebridge[2913]: - /usr/local/lib/node_modules/homebridge/bin/homebridge Apr 25 17:36:31 homebridge homebridge[2913]: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1075:15) Apr 25 17:36:31 homebridge homebridge[2913]: at Function.Module._load (node:internal/modules/cjs/loader:920:27) Apr 25 17:36:31 homebridge homebridge[2913]: at Module.require (node:internal/modules/cjs/loader:1141:19) Apr 25 17:36:31 homebridge homebridge[2913]: at require (node:internal/modules/cjs/helpers:110:18) Apr 25 17:36:31 homebridge homebridge[2913]: at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-knx/lib/addins/ValveControl.js:14:14) Apr 25 17:36:31 homebridge homebridge[2913]: at Module._compile (node:internal/modules/cjs/loader:1254:14) Apr 25 17:36:31 homebridge homebridge[2913]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1308:10) Apr 25 17:36:31 homebridge homebridge[2913]: at Module.load (node:internal/modules/cjs/loader:1117:32) Apr 25 17:36:31 homebridge homebridge[2913]: at Function.Module._load (node:internal/modules/cjs/loader:958:12) Apr 25 17:36:31 homebridge homebridge[2913]: at Module.require (node:internal/modules/cjs/loader:1141:19) Apr 25 17:36:31 homebridge homebridge[2913]: [25/04/2023, 17:36:31] Got SIGTERM, shutting down Homebridge...

Kai0711er commented 1 year ago

Sorry for the late response: Looks to me like the moment package is missing... Have you tried installing it (again)?