What are the steps to reproduce?
- Building this custom node-red module : https://github.com/mayahq/maya-red-bot-utils
- Install this module
- Drag the
bot-intent
node to pallette and attach to debug node - Get the endpointUrl property of the bot-intent node (logged in console). This is a post node
- Send sample data to endpoint
curl -d "user=random&pass=random" -X POST http://localhost:1880/<endpointUrl>
- Check if the debug node catches and logs
msg.payload
. It does - 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