double-take icon indicating copy to clipboard operation
double-take copied to clipboard

[BUG] deepstack process error: Cannot read properties of undefined (reading 'flatMap')

Open ikavior opened this issue 4 years ago • 5 comments
trafficstars

21-11-15 19:02:36 info: Double Take v1.7.0-e1c4174 21-11-15 19:02:37 info: MQTT: connected 21-11-15 19:02:37 info: MQTT: subscribed to frigate/events, frigate/+/person/snapshot 21-11-15 19:02:50 info: processing rlc-520: 73e7187b-3784-46ae-a3cd-c39bc169d416 21-11-15 19:02:50 info: processing RLC-520: 1636999369.607379-994z9u 21-11-15 19:02:50 error: TypeError: deepstack process error: Cannot read properties of undefined (reading 'flatMap') at Object.module.exports.normalize (/double-take/api/src/util/detectors/deepstack.js:68:39) at module.exports.normalize (/double-take/api/src/util/detectors/actions/index.js:7:25) at Object.module.exports.process (/double-take/api/src/util/process.util.js:142:33) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Promise.all (index 0) at async Object.module.exports.start (/double-take/api/src/util/process.util.js:120:17) at async module.exports.polling (/double-take/api/src/util/process.util.js:53:25) at async Promise.all (index 0) at async module.exports.start (/double-take/api/src/controllers/recognize.controller.js:148:7) 21-11-15 19:02:50 info: done processing rlc-520: 73e7187b-3784-46ae-a3cd-c39bc169d416 in 0.06 sec 21-11-15 19:02:50 info: { id: '73e7187b-3784-46ae-a3cd-c39bc169d416', duration: 0.06, timestamp: '2021-11-15T18:02:50.782Z', attempts: 1, camera: 'rlc-520', zones: [], matches: [], misses: [] } 21-11-15 19:02:51 error: url validation failed for latest: http://10.0.2.20/api/RLC-520/latest.jpg?h=500 - text/html; charset=utf-8 not valid 21-11-15 19:02:51 error: url validation failed for snapshot: http://10.0.2.20/api/events/1636999369.607379-994z9u/snapshot.jpg?h=500&crop=1 - text/html; charset=utf-8 not valid 21-11-15 19:02:51 info: done processing RLC-520: 1636999369.607379-994z9u in 0.43 sec 21-11-15 19:02:51 info: { id: '1636999369.607379-994z9u', duration: 0.43, timestamp: '2021-11-15T18:02:51.147Z', attempts: 0, camera: 'RLC-520', zones: [], matches: [], misses: [] }

Hi, what Im doing wrong? :)

ikavior avatar Nov 15 '21 18:11 ikavior

Hello! Have you verified that http://10.0.2.20/api/RLC-520/latest.jpg?h=500 returns an image? Can you also post the relevant parts of your config so I can see how you have it setup?

jakowenko avatar Nov 15 '21 18:11 jakowenko

http://10.0.2.20/api/RLC-520/latest.jpg?h=500

That returns 404 page from Nginx. :)

and config:

mqtt: host: 10.0.2.20:1883 username: xxx password: xxx

frigate: url: http://10.0.2.20

detectors: deepstack: url: http://10.0.2.20 key: # number of seconds before the request times out and is aborted timeout: 15

ikavior avatar Nov 15 '21 20:11 ikavior

Please verify your URLs are correct. Frigate and DeepStack for example should never be on the same URL unless they are on different ports.

jakowenko avatar Nov 15 '21 21:11 jakowenko

Hi. I have changed config by adding port to frigate url:

frigate: url: http://10.0.2.20:5000

BTW: Frigate and DeepStack installed as a addons for HomeAssistant. Frigate on port 5000, Deepstack API on port 5001.

and now Im getting only that error:

21-11-16 13:17:35 error: TypeError: deepstack process error: Cannot read properties of undefined (reading 'flatMap') at Object.module.exports.normalize (/double-take/api/src/util/detectors/deepstack.js:68:39) at module.exports.normalize (/double-take/api/src/util/detectors/actions/index.js:7:25) at Object.module.exports.process (/double-take/api/src/util/process.util.js:142:33) at runMicrotasks () at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Promise.all (index 0) at async Object.module.exports.start (/double-take/api/src/util/process.util.js:120:17) at async module.exports.polling (/double-take/api/src/util/process.util.js:53:25) at async Promise.all (index 0) at async module.exports.start (/double-take/api/src/controllers/recognize.controller.js:148:7)

ikavior avatar Nov 16 '21 12:11 ikavior

I cannot connect to Deepstack installed on Hass. Even if I put Deepstack in Docker on the other machine I see that "blue/red" icon is still red. And here logs from Deepstack on the other machine:

[GIN] 2021/11/16 - 15:58:35 | 500 | 1m0s | 10.0.2.20 | POST "/v1/vision/face/recognize" [GIN] 2021/11/16 - 15:59:05 | 500 | 1m0s | 10.0.2.20 | POST "/v1/vision/face/recognize" [GIN] 2021/11/16 - 16:00:00 | 500 | 1m0s | 10.0.2.20 | POST "/v1/vision/face/recognize" [GIN] 2021/11/16 - 16:00:19 | 500 | 1m0s | 10.0.2.20 | POST "/v1/vision/face/recognize"

Actual config of double-take hass addon:

mqtt: host: 10.0.2.20:1883 username: xxxx password: xxxx

frigate: url: http://ccab4aaf-frigate:5000

detectors: deepstack: url: http://10.0.66.176 key: # number of seconds before the request times out and is aborted timeout: 15

ikavior avatar Nov 16 '21 16:11 ikavior