Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The node red crash when apply the flow include mic. maybe i use it a wrong way. pls help me #3

Open
chaim007 opened this issue May 30, 2018 · 3 comments

Comments

@chaim007
Copy link

-- flow ---

[{"id":"5bc85df0.cb7054","type":"Mic","z":"d2f2d81d.a7ac98","name":"麦克风","outputPayloadType":"stream","endian":"little","bitwidth":"16","encoding":"signed-integer","channels":"1","device":"plughw:1,0","rate":"22050","silenceTimeout":0,"exitOnSilence":false,"debug":false,"active":true,"x":595.5,"y":178,"wires":[["c53422cc.b2d75","87eda3ca.a0e5f"]]},{"id":"c53422cc.b2d75","type":"ui_audio","z":"d2f2d81d.a7ac98","name":"音频输出","group":"91445def.c9f6a","voice":"en-US","always":"","x":825.5,"y":168,"wires":[]},{"id":"87eda3ca.a0e5f","type":"debug","z":"d2f2d81d.a7ac98","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":809.5,"y":258,"wires":[]},{"id":"d6a83a92.776ab8","type":"inject","z":"d2f2d81d.a7ac98","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":388.5,"y":167,"wires":[["5bc85df0.cb7054"]]},{"id":"91445def.c9f6a","type":"ui_group","z":"","name":"Default","tab":"28405f75.1ff78","disp":true,"width":"6","collapse":false},{"id":"28405f75.1ff78","type":"ui_tab","z":"","name":"Home","icon":"dashboard"}]

---version ---

  • node red
    0.18.6

  • node
    root@ubuntu:~# node -v
    v8.11.2

---- errors ----

30 May 20:38:29 - [info] Starting flows
30 May 20:38:29 - [info] Started flows
30 May 20:38:29 - [info] [Mic:麦克风] Event input: 1527683909861
30 May 20:38:29 - [info] [Mic:麦克风] Stream event startComplete
30 May 20:38:29 - [red] Uncaught Exception:
30 May 20:38:29 - Error: spawn arecord ENOENT
at _errnoException (util.js:992:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)

@Dani7B
Copy link

Dani7B commented Jul 15, 2018

Hello. My guess it would be that some of this node's dependencies are missing.

Node-RED node for microphone (based on nodejs mic : a simple stream wrapper for arecord (Linux (including Raspbian)) and sox (Mac/Windows)).

In my case, on Mac OS, I had to install sox to prevent it from crashing. On Linux I had to install arecord.

@MattVador
Copy link
Owner

MattVador commented Mar 8, 2019

Hi, have you tried to run package 'mic' in nodejs (without nodered) ?

@juggledad
Copy link

I just hit this also - now I have not installed any dependency HOWEVER, the node should be handling the error and not causing Node-red to crash.

4 Dec 11:29:54 - [info] [Mic:e664dd1f.63e33] Stream event startComplete
4 Dec 11:29:54 - [red] Uncaught Exception:
4 Dec 11:29:54 - Error: spawn rec ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Pauls-mini-4:.node-red Paul$

This happened on a Mac
macOS 10.14.6
Node-RED v1.0.2
Node.js v12.13.0
Dashboard v2.19.1

Couldn't the node check for a recorder and return an error message if none is available?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants