# Message not being sent after Deploy

**URL:** <https://discourse.nodered.org/t/message-not-being-sent-after-deploy/26128>\
**Category:** General\
**Created:** [5 May 2020 12:28 UTC](https://discourse.nodered.org/t/message-not-being-sent-after-deploy/26128 "2020-05-05T12:28:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gontxu](https://avatars.discourse-cdn.com/v4/letter/g/8e8cbc/32.png) [@Gontxu](https://discourse.nodered.org/u/Gontxu)\
**Post date:** [5 May 2020 12:28 UTC](https://discourse.nodered.org/t/message-not-being-sent-after-deploy/26128/1 "2020-05-05T12:28:26Z")

</div>

Hello,

I've been looking around in the forum searching for this issue but did not found it. Hopefully someone can help me with this. I created a custom node that simply listens for an HTTP POST request and sends a message through its single output.

The query part of the code is like this:

```auto
RED.httpNode.post('/TriggerScenario_' + config.scenarioName, function(req, res) {
   var body = req.body;

   if (body.messageType == "execute_trigger") {
       node.status({fill:"yellow", shape:"ring", text:"status.executing"});
       setTimeout( function() {
            node.emit('input', {});
            res.sendStatus(200);
       }, 2000);
   } else {
       res.sendStatus(500);
   }
});

```

And the `input` event is properly listened here:

```auto
node.on('input', function (msg, send, done) {
    // Compatibility against v < 1.0
    send = send || function() { node.send.apply(node,arguments) };

    node.status({fill:"green", shape:"ring", text:"status.executed"});
    msg.payload = {
        scenarioName : config.scenarioName
    };

    send(msg);
    if (done) {
        done();
    }
});

```

**The issue:**  
HTTP request and `input` event work fine, but the message is only sent as long as I don't press over the Deploy button.

If I make whatever change in the flow and deploy it, the HTTP request is still received and the `input` event triggered, but the message is not anymore sent. Stopping and restarting the NodeRED server makes it work again, but only until the next Deploy, where it stops working.

**Additional info:**  
I've experienced this issue after upgrading to v1.0.6. Find some traces below illustrating that the "send" event is being generated, though it does not push out the message:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/9/692b522ebdeb50319a0ceb853cd9c822646f261a.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/8/58f53661ba2bedd6d11c38751af7b36ce44444e5.png)

Any help is more than welcome as I'm running out of ideas to understand what is happening. Thank you!

---

<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:** [4 July 2020 12:42 UTC](https://discourse.nodered.org/t/message-not-being-sent-after-deploy/26128/2 "2020-07-04T12:42:03Z")

</div>

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