node-red: node.warn and node.error functions are printing twice on the debug window (Node-RED v2.2.2)
Current Behavior
I have node-red v2.2.2 currently installed in different machines with Ubuntu. And I realized that when I use the functions node.warn('any word')
or node.error('any word')
once, they will print the message on the debug window twice:
I have an old version of Node-red 1.2.1 installed on one machine and it doesn’t happen there. I’m sure it’s an issue with version 2.2.2.
Expected Behavior
The expected behavior is printing the message only once when I use the function node.warn
once.
Steps To Reproduce
No response
Example flow
[{"id":"884df64fc0706d1a","type":"function","z":"ff922ddb.76cc18","name":"node.error('printing twice')","func":"node.error('printing twice')\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1470,"y":1900,"wires":[["d16a5938e610505c"]]},{"id":"c84f153b25b2ec5b","type":"inject","z":"ff922ddb.76cc18","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1260,"y":1900,"wires":[["884df64fc0706d1a"]]},{"id":"d16a5938e610505c","type":"debug","z":"ff922ddb.76cc18","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1690,"y":1900,"wires":[]},{"id":"53023a7dd1eb74ea","type":"function","z":"ff922ddb.76cc18","name":"node.warn('printing twice')","func":"node.warn('printing twice')\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1470,"y":1960,"wires":[["30bbcdcf40181b6d"]]},{"id":"d59918f0a0e600ef","type":"inject","z":"ff922ddb.76cc18","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1260,"y":1960,"wires":[["53023a7dd1eb74ea"]]},{"id":"30bbcdcf40181b6d","type":"debug","z":"ff922ddb.76cc18","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1690,"y":1960,"wires":[]}]
Environment
- Node-RED version: 2.2.2
- Node.js version: 16.13.12
- npm version: 8.5.5
- Platform/OS: Ubuntu 20.04
- Browser: Firefox/Chrome
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 29 (27 by maintainers)
Great - as this is a new feature you need to make a new branch derived from the dev branch (not master) - and then yes edit the debug node code. Any problems just ask. (though I will be on vacation this weekend/next week for Easter so I may not respond so quick)
Should be fairly simple to add a new statusType of count - then respond to that in the prepareStatus function - and clear count on close. (as a first pass). And in the html to add a new countType to the typedInput types. (“and then just draw the rest of the horse…” 😃 )