Closed mjakefranklin closed 3 years ago
I have this as well. I have video, but secure video does not work (the entire scrypted server crashes)
I have this as well. I have video, but secure video does not work (the entire scrypted server crashes)
install node 16
I am running 16.9.1, rebooted and double checked. Video starts fine. As soon as I trigger the motion sensor I get this. Running on raspbian
uncaughtException TypeError: Cannot read properties of undefined (reading '1') at t.default.request (/plugin/main.nodejs.js:6:13145) at processTicksAndRejections (node:internal/process/task_queues:96:5) at t.AmcrestCameraClient.jpegSnapshot (/plugin/main.nodejs.js:6:11815) e Amcrest Camera Controller uncaughtException TypeError: Cannot read properties of undefined (reading '1')
I have this as well. I have video, but secure video does not work (the entire scrypted server crashes)
install node 16
This won't help me since I'm using the docker container right? I could try a plain node install. Interestingly, I also just tried the RTSP plugin, and it appears to work fine
Troubleshooting a bit more, it seems to start throwing errors when I just view the page that the camera is on in HomeKit (i.e. it's trying to get the screen grab for the camera in HomeKit).
event listener failure TypeError: Cannot read properties of undefined (reading '1') at t.default.request (/plugin/main.nodejs.js:6:13145) at processTicksAndRejections (node:internal/process/task_queues:96:5) at t.AmcrestCameraClient.listenEvents (/plugin/main.nodejs.js:6:11990) at createMotionStream (/plugin/main.nodejs.js:6:1645) failure getData TypeError: Cannot read properties of undefined (reading '1') at t.default.request (/plugin/main.nodejs.js:6:13145) at processTicksAndRejections (node:internal/process/task_queues:96:5) at t.AmcrestCameraClient.jpegSnapshot (/plugin/main.nodejs.js:6:11815) at RpcPeer.handleMessage (/root/scrypted/server/src/rpc.ts:402:37) failure getData RPCResultError [TypeError]: Cannot read properties of undefined (reading '1') at t.default.request (/plugin/main.nodejs.js:6:13145) at processTicksAndRejections (node:internal/process/task_queues:96:5) at t.AmcrestCameraClient.jpegSnapshot (/plugin/main.nodejs.js:6:11815) at RpcPeer.handleMessage (/root/scrypted/server/src/rpc.ts:402:37) { cause: undefined }
I have this as well. I have video, but secure video does not work (the entire scrypted server crashes)
install node 16
This won't help me since I'm using the docker container right? I could try a plain node install. Interestingly, I also just tried the RTSP plugin, and it appears to work fine
ah you're correct. I've only seen crashes on pre node-16. get me a crash log please.
Troubleshooting a bit more, it seems to start throwing errors when I just view the page that the camera is on in HomeKit (i.e. it's trying to get the screen grab for the camera in HomeKit).
event listener failure TypeError: Cannot read properties of undefined (reading '1') at t.default.request (/plugin/main.nodejs.js:6:13145) at processTicksAndRejections (node:internal/process/task_queues:96:5) at t.AmcrestCameraClient.listenEvents (/plugin/main.nodejs.js:6:11990) at createMotionStream (/plugin/main.nodejs.js:6:1645) failure getData TypeError: Cannot read properties of undefined (reading '1') at t.default.request (/plugin/main.nodejs.js:6:13145) at processTicksAndRejections (node:internal/process/task_queues:96:5) at t.AmcrestCameraClient.jpegSnapshot (/plugin/main.nodejs.js:6:11815) at RpcPeer.handleMessage (/root/scrypted/server/src/rpc.ts:402:37) failure getData RPCResultError [TypeError]: Cannot read properties of undefined (reading '1') at t.default.request (/plugin/main.nodejs.js:6:13145) at processTicksAndRejections (node:internal/process/task_queues:96:5) at t.AmcrestCameraClient.jpegSnapshot (/plugin/main.nodejs.js:6:11815) at RpcPeer.handleMessage (/root/scrypted/server/src/rpc.ts:402:37) { cause: undefined }
your amcrest motion event stream is not in the format I'm parsing I guess. can you join discord?
I have this as well. I have video, but secure video does not work (the entire scrypted server crashes)
install node 16
This won't help me since I'm using the docker container right? I could try a plain node install. Interestingly, I also just tried the RTSP plugin, and it appears to work fine
ah you're correct. I've only seen crashes on pre node-16. get me a crash log please.
Is getting crash log documented? Thanks again for the help
You said that the whole scrypted server crashed, so I assume you have a crash dump in teh console you're running it in (docker, or via checkout)
No, unfortunately that was the other user that jumped on this issue thread. It doesn't crash at all. Video just doesn't show up
No longer crashing after I removed and reinstalled nodejs. But when I turn the dummy motion sensor on I get:
i Scrypted Core requested listen Driveway null
i Scrypted Core requested listen Driveway "MotionSensor"
i Scrypted Core requested listen Driveway "OnOff"
event listener failure TypeError: Cannot read properties of undefined (reading '1')
at t.default.request (/plugin/main.nodejs.js:6:13145)
at runMicrotasks (
Here's the output from the Docker container:
> scrypted@1.0.0 serve-no-build
> node dist/scrypted-main.js
#############################################
Scrypted Server: https://localhost:9443/
#############################################
i Amcrest Camera Controller loading @scrypted/amcrest
i Amcrest Camera Controller pid 34
i Scrypted Core loading @scrypted/core
i Scrypted Core pid 40
i HomeKit loading @scrypted/homekit
i HomeKit pid 47
i VideoCamera Rebroadcast loading @scrypted/prebuffer-mixin
i VideoCamera Rebroadcast pid 48
i Amcrest Camera Controller loaded @scrypted/amcrest
i VideoCamera Rebroadcast loaded @scrypted/prebuffer-mixin
Initializing HAP-NodeJS v0.9.4...
i HomeKit loaded @scrypted/homekit
i HomeKit requested listen Garage {"event":"MotionSensor","watch":false}
Preparing Advertiser for 'Scrypted C52C' using bonjour-hap backend!
Pairing QR Code:
Starting to advertise 'Scrypted C52C' using bonjour-hap backend!
i Scrypted Core loaded @scrypted/core
uncaughtException TypeError: Cannot read properties of undefined (reading '1')
at t.default.request (/plugin/main.nodejs.js:6:13145)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at t.AmcrestCameraClient.jpegSnapshot (/plugin/main.nodejs.js:6:11815)
failure getData TypeError: Cannot read properties of undefined (reading '1')
at t.default.request (/plugin/main.nodejs.js:6:13145)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at t.AmcrestCameraClient.jpegSnapshot (/plugin/main.nodejs.js:6:11815)
at RpcPeer.handleMessage (/server/src/rpc.ts:402:37)
e Amcrest Camera Controller uncaughtException TypeError: Cannot read properties of undefined (reading '1')
failure getData RPCResultError [TypeError]: Cannot read properties of undefined (reading '1')
at t.default.request (/plugin/main.nodejs.js:6:13145)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at t.AmcrestCameraClient.jpegSnapshot (/plugin/main.nodejs.js:6:11815)
at RpcPeer.handleMessage (/server/src/rpc.ts:402:37) {
cause: undefined
}
event listener failure TypeError: Cannot read properties of undefined (reading '1')
at t.default.request (/plugin/main.nodejs.js:6:13145)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at t.AmcrestCameraClient.listenEvents (/plugin/main.nodejs.js:6:11990)
at createMotionStream (/plugin/main.nodejs.js:6:1645)
failure convertMediaObjectToLocalUrl RPCResultError [TypeError]: Cannot read properties of undefined (reading '1')
at t.default.request (/plugin/main.nodejs.js:6:13145)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at t.AmcrestCameraClient.jpegSnapshot (/plugin/main.nodejs.js:6:11815)
at RpcPeer.handleMessage (/server/src/rpc.ts:402:37) {
cause: undefined
}
{
inputArguments: [
'-rtsp_transport',
'tcp',
'-analyzeduration',
'15000000',
'-probesize',
'10000000',
'-reorder_queue_size',
'1024',
'-max_delay',
'20000000',
'-i',
'rtsp://user:password@10.29.2.189:554/cam/realmonitor?channel=1&subtype=0'
],
mediaStreamOptions: { video: {}, audio: {} }
}
[
'-y',
'-rtsp_transport',
'tcp',
'-analyzeduration',
'15000000',
'-probesize',
'10000000',
'-reorder_queue_size',
'1024',
'-max_delay',
'20000000',
'-i',
'rtsp://user:password@10.29.2.189:554/cam/realmonitor?channel=1&subtype=0',
'-f',
'lavfi',
'-i',
'anullsrc=cl=1',
'-shortest',
'-vn',
'-acodec',
'pcm_s16le',
'-f',
's16le',
'tcp://127.0.0.1:26255',
'-vcodec',
'rawvideo',
'-an',
'-pix_fmt',
'yuv420p',
'-f',
'rawvideo',
'tcp://127.0.0.1:26754'
]
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp --enable-indev=alsa --enable-outdev=alsa
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Input #0, rtsp, from 'rtsp://user:password@10.29.2.189:554/cam/realmonitor?channel=1&subtype=0':
Metadata:
title : Media Server
Duration:
N/A, start: 0.001000, bitrate: N/A
Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 30 fps, 100 tbr, 90k tbn, 60 tbc
Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp
Input #1, lavfi, from 'anullsrc=cl=1':
Duration: N/A, start: 0.000000, bitrate: 352 kb/s
Stream #1:0: Audio: pcm_u8, 44100 Hz, 1 channels (FL), u8, 352 kb/s
Stream mapping:
Stream #0:1 -> #0:0 (aac (native) -> pcm_s16le (native))
Stream #0:0 -> #1:0 (h264 (native) -> rawvideo (native))
Press [q] to stop, [?] for help
Output #0, s16le, to 'tcp://127.0.0.1:26255':
Metadata:
title : Media Server
encoder : Lavf58.45.100
Stream #0:0: Audio: pcm_s16le, 16000 Hz, mono, s16, 256 kb/s
Metadata:
encoder : Lavc58.91.100 pcm_s16le
[rtsp @ 0x55a646db6c80] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[swscaler @ 0x55a64714e300] deprecated pixel format used, make sure you did set range correctly
Output #1, rawvideo, to 'tcp://127.0.0.1:26754':
Metadata:
title :
Media Server
encoder :
Lavf58.45.100
Stream #1:0
: Video: rawvideo (I420 / 0x30323449), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 746496 kb/s
,
30 fps,
30 tbn,
30 tbc
Metadata:
encoder :
Lavc58.91.100 rawvideo
frame= 32 fps=0.0 q=-0.0 size= 36kB time=00:00:01.14 bitrate= 257.8kbits/s dup=6 drop=5 speed=2.27x
video/audio detected, discarding further input
i Scrypted Core requested listen Garage null
i Scrypted Core requested listen Garage "Camera"
i Scrypted Core requested listen Garage "Settings"
i Scrypted Core requested listen Garage "MotionSensor"
i Scrypted Core requested listen Garage "AudioSensor"
i Scrypted Core requested listen Garage "Setting"
i Scrypted Core requested listen Garage "Setting"
i Scrypted Core requested listen Garage "Setting"
i Scrypted Core requested listen Garage "Setting"
i Scrypted Core requested listen Garage "Setting"
i Scrypted Core requested listen Garage "Setting"
i Scrypted Core requested listen Garage "Setting"
i Scrypted Core requested listen Garage "Setting"
i Scrypted Core requested listen Garage "Setting"
i Scrypted Core requested listen Garage "Setting"
failure getData TypeError: Cannot read properties of undefined (reading '1')
at t.default.request (/plugin/main.nodejs.js:6:13145)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at t.AmcrestCameraClient.jpegSnapshot (/plugin/main.nodejs.js:6:11815)
at RpcPeer.handleMessage (/server/src/rpc.ts:402:37)
failure getData RPCResultError [TypeError]: Cannot read properties of undefined (reading '1')
at t.default.request (/plugin/main.nodejs.js:6:13145)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at t.AmcrestCameraClient.jpegSnapshot (/plugin/main.nodejs.js:6:11815)
at RpcPeer.handleMessage (/server/src/rpc.ts:402:37) {
cause: undefined
}
failure convertMediaObjectToLocalUrl RPCResultError [TypeError]: Cannot read properties of undefined (reading '1')
at t.default.request (/plugin/main.nodejs.js:6:13145)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at t.AmcrestCameraClient.jpegSnapshot (/plugin/main.nodejs.js:6:11815)
at RpcPeer.handleMessage (/server/src/rpc.ts:402:37) {
cause: undefined
}
event listener failure TypeError: Cannot read properties of undefined (reading '1')
at t.default.request (/plugin/main.nodejs.js:6:13145)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at t.AmcrestCameraClient.listenEvents (/plugin/main.nodejs.js:6:11990)
at createMotionStream (/plugin/main.nodejs.js:6:1645)```
This should be fixed in the latest plugin update, please confirm.
This should be fixed in the latest plugin update, please confirm.
@koush it works amazingly well now, thanks so much. HKSV works, as well as motion detection (tested person and car), recording works great, motion sensor works, notifications work.
EDIT: I need to pickup an Amcrest doorbell now to test
Thanks again!
I've installed Scrypted in a Docker container, and I can log in just fine. Plugins for Amcrest, HomeKit, and prebuffer-mixin were installed.
After adding a camera to the Amcrest plugin, I get no image or video in Scrypted. The camera is on the network and reachable, and I can connect to it using the credentials that I've provided to Scrypted. I've also gotten it working successfully in Home Assistant, using both the Amcrest integration and Falcon.
This is the only error I see in the log:
6:32:26 AM | e | Amcrest Camera Controller | uncaughtException TypeError: Cannot read properties of undefined (reading '1')Amcrest Camera Controller
Let me know what else I can provide, and thanks for the help!