colinbendell / homebridge-blink-for-home

Blink For Home Camera Homebridge plugin
MIT License
87 stars 27 forks source link

Homebridge crashes when the HomeKit app is opened #120

Open Jay-fi opened 1 year ago

Jay-fi commented 1 year ago

Running homebridge-raspbian-image on a RPI 3 via the homebridge UI homebridge-config-ui-x. Using the homebridge-blink-for-home plugin, I can't seem to view thumbnails of the cameras and the homebridge goes into a crash loop whenever I try to open the HomeKit. The camera constantly stays in a "camera offline" state. Created a child bridge to attempt to isolate the plugin to allow it more time to run the processes with no luck.


[25/08/2022, 20:52:31] [Blink] Process Ended. Code: 1, Signal: null
[25/08/2022, 20:52:38] [Blink] Restarting Process...
[25/08/2022, 20:52:41] [Blink] Launched child bridge with PID 10999
[25/08/2022, 20:52:41] Registering platform 'homebridge-blink-for-home.Blink'
[25/08/2022, 20:52:41] [Blink] Loaded homebridge-blink-for-home v3.9.1 child bridge successfully
[25/08/2022, 20:52:41] Loaded 3 cached accessories from cachedAccessories.0EE8BBB3E163.
[25/08/2022, 20:52:42] [Blink] Init Blink
[25/08/2022, 20:52:44] Homebridge v1.5.0 (HAP v0.10.2) (Blink) is running on port *****.
[25/08/2022, 20:52:45] [Blink] ADD: Blink:Network:222409
[25/08/2022, 20:52:45] [Blink] ADD: Blink:Network:222409:Camera:365633
[25/08/2022, 20:52:45] [Blink] ADD: Blink:Network:222409:Camera:366632
[25/08/2022, 20:52:46] [Blink] Blink Ortiz House - Blink Ortiz House Arm: Manual Arm
[25/08/2022, 20:52:46] [Blink] Blink Ortiz House - Blink Ortiz House Arm: ✅
[25/08/2022, 20:52:46] [Blink] Blink Living Room - Temperature: 22.2°C
[25/08/2022, 20:52:46] [Blink] Blink Dinning Room - Temperature: 22.8°C
[25/08/2022, 20:52:46] [Blink] Blink Ortiz House - Blink Ortiz House Armed (Target): ✅
[25/08/2022, 20:52:46] [Blink] Blink Ortiz House - Blink Ortiz House Armed (Current): ✅

/var/lib/homebridge/node_modules/homebridge-blink-for-home/src/blink.js:307
        const data = await this.blink.getUrl(thumbnailUrl.replace(/\.jpg|$/, '.jpg'));
                                                          ^
TypeError: Cannot read properties of null (reading 'replace')
    at BlinkCameraHAP.getThumbnail (/var/lib/homebridge/node_modules/homebridge-blink-for-home/src/blink.js:307:59)
    at BlinkCameraDelegate.handleSnapshotRequest (/var/lib/homebridge/node_modules/homebridge-blink-for-home/src/homebridge/blink-camera-deligate.js:77:47)
    at /var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/controller/CameraController.ts:998:23
    at new Promise (<anonymous>)
    at CameraController.handleSnapshotRequest (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/controller/CameraController.ts:978:12)
    at Bridge.Accessory.handleResource (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1852:18)
    at HAPServer.emit (node:events:527:28)
    at HAPServer.handleResource (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/HAPServer.ts:1017:12)
    at IncomingMessage.<anonymous> (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/HAPServer.ts:385:11)
    at IncomingMessage.emit (node:events:539:35)```
minuitagency commented 1 year ago

same here i just added a blink mini to the setup and it crashs continuously with the same error as you

minuitagency commented 1 year ago

Hi @colinbendell, is it possible to fix this issue ? I can’t use your library since I added a blink mini to my setup

linus1974 commented 8 months ago

Same problem here. Will you implement the solution in the next version?