# On redeploy, node.send() not emitting message on custom HTTP trigger node with POST route

**URL:** <https://discourse.nodered.org/t/on-redeploy-node-send-not-emitting-message-on-custom-http-trigger-node-with-post-route/30909>\
**Category:** Developing Nodes\
**Created:** [30 July 2020 06:50 UTC](https://discourse.nodered.org/t/on-redeploy-node-send-not-emitting-message-on-custom-http-trigger-node-with-post-route/30909 "2020-07-30T06:50:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![skar1005](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/skar1005/32/26649_2.png) [@skar1005](https://discourse.nodered.org/u/skar1005)\
**Post date:** [30 July 2020 06:50 UTC](https://discourse.nodered.org/t/on-redeploy-node-send-not-emitting-message-on-custom-http-trigger-node-with-post-route/30909/1 "2020-07-30T06:50:35Z")

</div>

### What are the steps to reproduce?

1. Building this custom node-red module : [https://github.com/mayahq/maya-red-bot-utils](https://github.com/mayahq/maya-red-bot-utils)
2. Install this module
3. Drag the `bot-intent` node to pallette and attach to debug node
4. Get the endpointUrl property of the bot-intent node (logged in console). This is a post node
5. Send sample data to endpoint `curl -d "user=random&pass=random" -X POST http://localhost:1880/<endpointUrl>`
6. Check if the debug node catches and logs `msg.payload`. It does
7. Shift the node, or make some small change and redeploy. Repeat Step 5. node.send doesn't emit message

### What happens?

On redeploying, node.send() doesn't emit a message when receives a POST request, even though `req.body` is received and logged. For a while it was working intermittently when I disabled cloning via `node.send({}, false)`. But isn't working now again for some reason when I started with a new userDir. Also doesn't work with custom settings.js

### What do you expect to happen?

On redeploying flow, POST request should follow through and node.send() should emit a message just like the standard HTTP In node. HTTP In node is working as expected but this custom node with near identical code is not, on redeploy.

### Please tell us about your environment:

- Node-RED version: 1.1.2
- Node.js version: v12.16.3
- npm version: 6.14.4
- Platform/OS: MacOS/ubuntu
- Browser: Brave/Chrome

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [30 July 2020 06:52 UTC](https://discourse.nodered.org/t/on-redeploy-node-send-not-emitting-message-on-custom-http-trigger-node-with-post-route/30909/2 "2020-07-30T06:52:21Z")

</div>

This was originally raised as an issue against Node-RED, which was not appropriate as it's an issue with a contrib node.

I have already pointed at the problem in my comment here: [https://github.com/node-red/node-red/issues/2664#issuecomment-666158148](https://github.com/node-red/node-red/issues/2664#issuecomment-666158148)

---

<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:** [28 September 2020 06:52 UTC](https://discourse.nodered.org/t/on-redeploy-node-send-not-emitting-message-on-custom-http-trigger-node-with-post-route/30909/3 "2020-09-28T06:52:22Z")

</div>

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