colinbendell / homebridge-blink-for-home

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

Installed blink and blink for home, but can't get thumbnails - this is the error: #110

Open ghost opened 2 years ago

ghost commented 2 years ago

10/04/2022, 18:57:54] Homebridge v1.4.0 (HAP v0.10.0) (Blink) is running on port 52165. [10/04/2022, 18:57:55] [Blink] ADD: Blink:Network:231026:Camera:635790 [10/04/2022, 18:57:56] [Blink] Blink G8T1-GH00-1362-C2LD - Temperature: 15°C

/usr/local/lib/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 (/usr/local/lib/node_modules/homebridge-blink-for-home/src/blink.js:307:59) at BlinkCameraDelegate.handleSnapshotRequest (/usr/local/lib/node_modules/homebridge-blink-for-home/src/homebridge/blink-camera-deligate.js:77:47) at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/controller/CameraController.ts:994:23 at new Promise () at CameraController.handleSnapshotRequest (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/controller/CameraController.ts:978:12) at Bridge.Accessory.handleResource (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1851:18) at HAPServer.emit (node:events:390:28) at HAPServer.handleResource (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/HAPServer.ts:1015:12) at IncomingMessage. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/HAPServer.ts:385:11) at IncomingMessage.emit (node:events:402:35) [10/04/2022, 18:58:21] [Blink] Child bridge process ended [10/04/2022, 18:58:21] [Blink] Process Ended. Code: 1, Signal: null [10/04/2022, 18:58:28] [Blink] Restarting Process... [10/04/2022, 18:58:30] [Blink] Launched child bridge with PID 3197 [10/04/2022, 18:58:30] Registering platform 'homebridge-blink-for-home.Blink' [10/04/2022, 18:58:30] [Blink] Loaded homebridge-blink-for-home v3.9.1 child bridge successfully [10/04/2022, 18:58:30] Loaded 1 cached accessories from cachedAccessories.0E3EC84CD867. [10/04/2022, 18:58:31] [Blink] Init Blink [10/04/2022, 18:58:32] Homebridge v1.4.0 (HAP v0.10.0) (Blink) is running on port 52165. [10/04/2022, 18:58:33] [Blink] ADD: Blink:Network:231026:Camera:635790 [10/04/2022, 18:58:34] [Blink] Blink G8T1-GH00-1362-C2LD - Temperature: 15°C

dev-d commented 1 year ago

Can report the same

[18/07/2022, 19:36:51] TypeError: Cannot read properties of null (reading 'replace')
    at BlinkCameraHAP.getThumbnail (/usr/local/lib/node_modules/homebridge-blink-for-home/src/blink.js:307:59)
    at BlinkCameraDelegate.handleSnapshotRequest (/usr/local/lib/node_modules/homebridge-blink-for-home/src/homebridge/blink-camera-deligate.js:77:47)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/controller/CameraController.ts:998:23
    at new Promise (<anonymous>)
    at CameraController.handleSnapshotRequest (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/controller/CameraController.ts:978:12)
    at Bridge.Accessory.handleResource (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1852:18)
    at HAPServer.emit (node:events:527:28)
    at HAPServer.handleResource (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/HAPServer.ts:1017:12)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/HAPServer.ts:385:11)
    at IncomingMessage.emit (node:events:539:35)
[18/07/2022, 19:36:51] Got SIGTERM, shutting down Homebridge...

And then Homebridge goes into a crash loop.

This is seen when using with Blink mini (firmware v9.83) on homebridge-blink-for-home v3.9.1 on RaspBerry Pi 3. The error only occurs when the Apple Home App is opened. If you don't open Home, then the Homebridge process doesn't crash and die. node v16.16.0, homebridge v1.5.0.