# Http response node "Error: Callback called multiple times"

**URL:** <https://discourse.nodered.org/t/http-response-node-error-callback-called-multiple-times/92988>\
**Category:** General\
**Tags:** http-in\
**Created:** [8 November 2024 10:45 UTC](https://discourse.nodered.org/t/http-response-node-error-callback-called-multiple-times/92988 "2024-11-08T10:45:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pestitschek](https://avatars.discourse-cdn.com/v4/letter/p/a5b964/32.png) [@pestitschek](https://discourse.nodered.org/u/pestitschek)\
**Post date:** [8 November 2024 10:45 UTC](https://discourse.nodered.org/t/http-response-node-error-callback-called-multiple-times/92988/1 "2024-11-08T10:45:38Z")

</div>

Hi everyone,

I have a somewhat lengthy- and complex flow that I am willing to share if the troubleshooting process requires it; but for now I will do a simplification/get rid of the unimportant details.

Basically I have a flow

1. `http in` node
2. that forwards the incoming request into some `function` nodes
3. that then call some `http request` and validate their response
4. and then return the original msg with a payload (obtained from steps [2/3]) to a `http response` node (this response node being "the pair" of the `http in` of step [1])

For no apparent reason; after the application has been running for a while; the `http response` node of step [4] starts reporting the error. The error happens 100% of the time/for each message.

```auto
Error: Callback called multiple times

```

The error DOES NOT cause the `http response` to stop working: the node is still returning the http request to the requester. It is just annoying, is polluting logs and I suspect (can't confirm) is causing some kind of resource leak that causes the application to break/crash after some time.

What gives? Is there any known reason that may cause this behavior?

Some additional info:  
1- The `http response` is indeed only being called once (at the end of the flow).  
2- The original message from `http in` (with properties \_msgid, req, res) is the same message that goes into `http response` node.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [8 November 2024 11:04 UTC](https://discourse.nodered.org/t/http-response-node-error-callback-called-multiple-times/92988/2 "2024-11-08T11:04:30Z")

</div>

> [@pestitschek](#):
>
> `Callback called multiple times`

There was an issue in certain versions of NodeJS - what version are you running?

PS, welcome to the forum & great first question (well structured, just the right amount of detail 😉 )

---

<div class="post-metadata">

**Author:** ![pestitschek](https://avatars.discourse-cdn.com/v4/letter/p/a5b964/32.png) [@pestitschek](https://discourse.nodered.org/u/pestitschek)\
**Post date:** [11 November 2024 17:25 UTC](https://discourse.nodered.org/t/http-response-node-error-callback-called-multiple-times/92988/3 "2024-11-11T17:25:21Z")

</div>

Oh, that could be it. A lot of google searches suggested so; but then it was a rabbit hole because 1000s different people had 1000s different fixes/workaround.

This specific environment is running NR 1.3.55 with DockerImage `FROM node:12`, so yea, quite outdated. I will see if I can upgrade it without a major headache and I will see if that does the trick.

But at the same time, worth stating, we also have 6~ other environments that are also running the same version for node and NodeRED and they are NOT triggering the error (all of them do have similar flows with `http in`/`http response`).

(Thanks for the welcome message!)

---

<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:** [9 February 2025 17:25 UTC](https://discourse.nodered.org/t/http-response-node-error-callback-called-multiple-times/92988/4 "2025-02-09T17:25:26Z")

</div>

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