codeoverflow-org / nodecg-io

A NodeCG-bundle which implements Social Media API's in the NodeCG framework
https://nodecg.io
MIT License
108 stars 26 forks source link

Error catching in nodecg-io-midi-* #364

Closed ExtremTechniker closed 2 years ago

ExtremTechniker commented 2 years ago

Description

Catching error when trying to init midi with amixer Because of the UNHANDLED PROMISE REJECTION! nodecg-io-core unsets all service instances.

How to reproduce

Use an headless environment, I use it in a Docker Container, start nodecg as usual.

Error Log

amixer (nodecg-io-midi-in, nodecg-io-midi-out)

UNHANDLED PROMISE REJECTION!
Error: Command failed with ENOENT: amixer
spawn amixer ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
    at onErrorNT (node:internal/child_process:477:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn amixer',
  path: 'amixer',
  spawnargs: [],
  originalMessage: 'spawn amixer ENOENT',
  shortMessage: 'Command failed with ENOENT: amixer\nspawn amixer ENOENT',
  command: 'amixer',
  exitCode: undefined,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: '',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

References

https://discord.com/channels/577412066994946060/577495348898168832/920963166123487262

hlxid commented 2 years ago

Can't reproduce this problem yet. When I create a node container, install libasound2-dev because it is needed to compile nodecg-io and then remove it afterwards, I get an warning about a missing .so file and the service doesn't get loaded. If I use libasound2-dev while compiling and then only libasound2 I don't get a error from the midi service at all.

At which point exactly does this error happen? Already when starting NodeCG or only once you login to nodecg-io? Could you provide your Dockerfile that builds a setup where this error occurs? That would make reproducing it way easier :wink:

hlxid commented 2 years ago

Closing this for now because I cannot reproduce this. Feel free to reopen at any time if you have the issue again.