# Node-Red v3.1.0 Exec node now causing an Error

**URL:** <https://discourse.nodered.org/t/node-red-v3-1-0-exec-node-now-causing-an-error/81366>\
**Category:** General\
**Created:** [16 September 2023 10:57 UTC](https://discourse.nodered.org/t/node-red-v3-1-0-exec-node-now-causing-an-error/81366 "2023-09-16T10:57:27Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [16 September 2023 16:13 UTC](https://discourse.nodered.org/t/node-red-v3-1-0-exec-node-now-causing-an-error/81366/21 "2023-09-16T16:13:35Z")

</div>

Yes, `-v` or `--verbose`. You can add it more than once (up to 3 times I think) to get more detail.

---

<div class="post-metadata">

**Author:** ![PdeJ](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@PdeJ](https://discourse.nodered.org/u/PdeJ)\
**Post date:** [16 September 2023 16:16 UTC](https://discourse.nodered.org/t/node-red-v3-1-0-exec-node-now-causing-an-error/81366/22 "2023-09-16T16:16:39Z")

</div>

Not that I am aware of.  
I've now set `sudo usermod -a -G audio your_username` to the username of the RPI, but to no avail. Is there a specific username that Node Red has by default?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [16 September 2023 16:19 UTC](https://discourse.nodered.org/t/node-red-v3-1-0-exec-node-now-causing-an-error/81366/23 "2023-09-16T16:19:27Z")

</div>

The default is the user that you were logged in as when you ran the bash \<(curl command to install it. You can see from the startup log that it is using the user pi, unless you have modified the systemd script.

Try `aplay -vvv ...`

---

<div class="post-metadata">

**Author:** ![PdeJ](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@PdeJ](https://discourse.nodered.org/u/PdeJ)\
**Post date:** [16 September 2023 16:25 UTC](https://discourse.nodered.org/t/node-red-v3-1-0-exec-node-now-causing-an-error/81366/24 "2023-09-16T16:25:39Z")

</div>

OK that is what I set it to above. Setting aplay --verbose doesn't produce any output in the Node Red console, since it fails to run. Nor does it change the output object messages from the the exec Node.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [16 September 2023 16:35 UTC](https://discourse.nodered.org/t/node-red-v3-1-0-exec-node-now-causing-an-error/81366/25 "2023-09-16T16:35:12Z")

</div>

Aplay is running, it is producing that error message. Use `-vvv` and redirect both sysout and syserror to a file.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [16 September 2023 16:37 UTC](https://discourse.nodered.org/t/node-red-v3-1-0-exec-node-now-causing-an-error/81366/26 "2023-09-16T16:37:12Z")

</div>

I think `-vvv` creates visual widgets on the command line. Try with `-v` first, then `-vv`.

---

<div class="post-metadata">

**Author:** ![PdeJ](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@PdeJ](https://discourse.nodered.org/u/PdeJ)\
**Post date:** [16 September 2023 16:37 UTC](https://discourse.nodered.org/t/node-red-v3-1-0-exec-node-now-causing-an-error/81366/27 "2023-09-16T16:37:22Z")

</div>

Sorry need a bit more help with that instruction .  
aplay -vvv in the terminal?

aplay -V --vumeter=TYPE

is that what you intended I enter in terminal......its for mono or stereo

no options for vv or vvv

Did you mean add -vvv to the extra input parameters of the exec node?

---

<div class="post-metadata">

**Author:** ![PdeJ](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@PdeJ](https://discourse.nodered.org/u/PdeJ)\
**Post date:** [17 September 2023 10:18 UTC](https://discourse.nodered.org/t/node-red-v3-1-0-exec-node-now-causing-an-error/81366/28 "2023-09-17T10:18:56Z")

</div>

Solved the problem on the Raspberry Pi Zero 2W by making PulseAudio (as used by `aplay`) specifically available for Node Red.

Created a PulseAudio Configuration File by entering into the Terminal:  
`sudo nano /home/<node-red-username>/.config/pulse/client.conf`  
Replace **`<node-red-username>`** with the actual username of the Node-RED user. .

In the configuration file in nano add the following lines

```auto
autospawn = no
daemon-binary = <default location>

```

where the **`<default location>`** is determined from that viewable in **/etc/pulse/client.conf`** file.

This configuration prevents PulseAudio from starting automatically and ensures it runs with minimal resources.

You do need to initially run PulseAudio for the Node-RED user using the `pulseaudio` command:

```auto
sudo -u <node-red-username> pulseaudio --start

```

Replace **`<node-red-username>`** with the actual username of the Node-RED user.

For a Node Red Flow to play an audio file using **`aplay`** through PulseAudio using either the Terminal or via the Exec Node command use for e.g.

```auto
aplay -D pulse /path/to/audio.wav

```

In this command, **`-D pulse`** specifies the PulseAudio output device.

Appending **`-vv`** to the command produces a verbose output, which can be from stderr of the Exec node, which I found useful for testing. The command in the Terminal produced sound through my connected Bluetooth headphones, but not when it was issued from the Node red Exec node despite the stderr output showing everything was working without error. The solution was to be found in refreshing the connection to the headphones in speaker Device profiles from the Desktop in VNC.  
Unfortunately the available profiles for connecting to the Amazon Echo don't appear to enable sound output over the bluetooth connection.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [1 October 2023 10:19 UTC](https://discourse.nodered.org/t/node-red-v3-1-0-exec-node-now-causing-an-error/81366/29 "2023-10-01T10:19:14Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/node-red-v3-1-0-exec-node-now-causing-an-error/81366.md?page=1)
