nrkno / sofie-atem-connection

Sofie ATEM Connection: A Part of the Sofie TV Studio Automation System
https://github.com/nrkno/Sofie-TV-automation/
MIT License
129 stars 36 forks source link

The socket process unexpectedly closed #65

Closed ronag closed 4 years ago

ronag commented 4 years ago

Child process keeps dying and spamming errors

Node v12.9.1 OS: MacOS ATEM: 8.0.3

I get this error spammed into the console. Unfortunately no further info.

    err: {
      "type": "Error",
      "message": "The socket process unexpectedly closed (code: \"1\", signal: \"null\")",
      "stack":
          Error: The socket process unexpectedly closed (code: "1", signal: "null")
              at /Users/ronagy/GitHub/nxtedition/nxt/event/node_modules/atem-connection/dist/lib/atemSocket.js:102:36
              at processTicksAndRejections (internal/process/task_queues.js:75:11)
    }

Q: Why is a child process used here?

ronag commented 4 years ago

I have no idea how to check. I've got ATEM Software Control but it doesn't seem to want to tell me the secret.

ronag commented 4 years ago

Ah! I enabled debug and now I get a ENOTFOUND. Should probably be handled a bit more gracefully.

Julusian commented 4 years ago

Q: Why is a child process used here?

The atem requires pings to be responded to within a few hundred ms or it drops the connection. We were finding that this would sometimes randomly happen when the main thread got busy #19

ronag commented 4 years ago

Cool thanks. The invalid address handling could probably be a bit more graceful but I'm all good.

Once I get time I'll probably to a PR to improve it.

Great lib!