marcokeur / pimatic-foscam

2 stars 1 forks source link

pimatic crashes during start #2

Open poeml opened 8 years ago

poeml commented 8 years ago

Hi,

using the following configuration, I get a crash:

   {
      "id": "fc1-new",
      "class": "IpCamera",
      "name": "foobar",
      "username": "USER",
      "password": "PASS",
      "cameraIp": "192.168.1.11"
    },
events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENOENT
    at errnoException (child_process.js:1000:11)
    at Process.ChildProcess._handle.onexit (child_process.js:791:34)
zsh: exit 8     sudo node_modules/pimatic/pimatic.js

Some unhandled error seems to be passed up till the main event handler. I'm not sure yet, how to debug for getting additional info on the type and location of error.

poeml commented 8 years ago

I can narrow down the crash to starting the RTSP stream. If I comment out the lines that start the stream in foscam.coffee, pimatic starts again. (The logfile alsos hows the CGI request's response correctly. So this part is working.)

poeml commented 8 years ago

I likely found the problem: there are hard-coded IPs in the app (178.xxx).

poeml commented 8 years ago

I updated to the latest code and there's no crash anymore.