ptz0n / homebridge-securitas-direct

https://www.npmjs.com/package/homebridge-securitas-direct
MIT License
7 stars 3 forks source link

Installing plugin crashes Homebridge #6

Closed jeremybdk closed 3 years ago

jeremybdk commented 3 years ago

Hello, I've installed this plugin but it crashes home bridge even if not configured here is the log I see:

(node:25707) UnhandledPromiseRejectionWarning: TypeError: accessories.forEach is not a function
    at /usr/lib/node_modules/homebridge/src/bridgeService.ts:534:21
    at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:9:18
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:25707) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:25707) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code

I'm using HomeBridge latest version with Node 14 and NPM 6 if that helps...

Best,

ptz0n commented 3 years ago

That's not a very nice experience. Which website do you use to manage your installation?

jeremybdk commented 3 years ago

It seems to crashing even if not configured, but just installed. This is the website I'm using https://customers.securitasdirect.fr/fr/installations but I have not yet configured the plugin as it's crashing when it's only installed.

ptz0n commented 3 years ago

Oh, you aren't even able to configure the plugin? How are you running Homebridge?

jeremybdk commented 3 years ago

I've installed it on a RPI, with https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-Raspbian, and running it using hb-service. I've tested on 2 different installation the 2nd one, with Node.js Version | v14.16.0 and NPM Version v7.6.0.

I can configure it, but it's still raising the issue.

jeremybdk commented 3 years ago

Oh, actually I'm sorry, I made a mistake in the configuration, now with the correct configuration it's now working as expected and not crashing homebridge anymore.

ptz0n commented 3 years ago

Great!