'ReferenceError: controlURL is not defined' when clicking camera controls
The following error always happens when clicking the control buttons. This is despite setting values for
- Custom base URL
- Direction URLs
- Stop URLs
- Disable tracking
- Disable counting
And every combination of them. It also happens clicking any camera control, regardless of the underlying URL for that direction ('foo' fails the same was as 192.168.1.1') Where can one set the controlURL
? ptz.js suggests it isn't defined before ln 225, but im not familiar with js enough to debug.
0|camera | 2020-08-10T12:53:22-07:00 s.sqlQuery QUERY INSERT INTO `Timelapse Frames` (ke,mid,details,filename,size,time) VALUES ('DF8z9KNiYc','dasddasdafasdffasdfe','{}','2020-08-10T12-53-21.jpg',161522,'Mon Aug 10 2020 12:53:22 GMT-0700 (Pacific Daylight Time)')
0|camera | (node:477293) UnhandledPromiseRejectionWarning: ReferenceError: controlURL is not defined
0|camera | at Object.ptzControl [as cameraControl] (/home/ben/workplace/Shinobi/libs/control/ptz.js:225:26)
0|camera | at Socket.<anonymous> (/home/ben/workplace/Shinobi/libs/socketio.js:736:35)
0|camera | at Socket.emit (events.js:203:15)
0|camera | at /home/ben/workplace/Shinobi/node_modules/socket.io/lib/socket.js:528:12
0|camera | at args.(anonymous function) (/usr/local/lib/node_modules/pm2/node_modules/event-loop-inspector/index.js:138:29)
0|camera | at process._tickCallback (internal/process/next_tick.js:61:11)
0|camera | (node:477293) 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(). (rejection id: 15)
^A^[[3~
According to tcpdump, error seems to prevent any command from getting sent at all, let alone to the camera. Vs say a curl command which can control them fine.
Version:
commit 511a4b4dd7200557a0d269be05434a5fb3bf23c5 (HEAD -> master, origin/master, origin/HEAD)
Merge: 3f536cc d337116
Author: Moe <github@m03.ca>
Date: Fri Jul 17 19:49:51 2020 +0000
Merge branch 'dev' into 'master'
Amigo
See merge request Shinobi-Systems/Shinobi!220
Edited by Ben N