Trigger Node Output Bug or PEBKAC?

I know I must be missing something simple, but can someone explain to me why these two trigger nodes have different payloads when they both are being asked to send milliseconds since epoch? The only difference is one starts with send nothing, waits two seconds, and then send the timestamp. The other starts with sending the timestamp, waits two seconds and then sends nothing. One seems to send a legit timestamp, the other is just sending "1". Have they always been like this? I only noticed when one of my flows broke after updating to 4.0.4 and it is still behaving this way on 4.0.5.

Screenshot 2024-10-11 at 8.57.34 PM

[{"id":"de7b0ee8ecb2e5ee","type":"group","z":"7a970dd2f2d67388","g":"c53c02df7128bdb5","style":{"stroke":"#2b2b2b","stroke-opacity":"1","fill":"#181818","fill-opacity":"0.5","label":true,"label-position":"nw","color":"#cccccc"},"nodes":["36e5f0ca2a0f5cfc","9a9a4e8234f9f6f2","11068274249f5b33","4250ea710b0d6ffb","d24269b36bf9e864"],"x":1874,"y":2939,"w":492,"h":162},{"id":"36e5f0ca2a0f5cfc","type":"inject","z":"7a970dd2f2d67388","g":"de7b0ee8ecb2e5ee","name":"","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":1935,"y":3020,"wires":[["9a9a4e8234f9f6f2","4250ea710b0d6ffb"]],"l":false},{"id":"9a9a4e8234f9f6f2","type":"trigger","z":"7a970dd2f2d67388","g":"de7b0ee8ecb2e5ee","name":"2 Seconds","op1":"","op2":"","op1type":"date","op2type":"nul","duration":"2","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":2070,"y":2980,"wires":[["11068274249f5b33"]]},{"id":"11068274249f5b33","type":"debug","z":"7a970dd2f2d67388","g":"de7b0ee8ecb2e5ee","name":"debug 2822","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":2250,"y":2980,"wires":[]},{"id":"4250ea710b0d6ffb","type":"trigger","z":"7a970dd2f2d67388","g":"de7b0ee8ecb2e5ee","name":"2 Seconds","op1":"state.mostCurrentGlobalStatusChangeTime.timestamp","op2":"","op1type":"global","op2type":"nul","duration":"2","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":2070,"y":3060,"wires":[["d24269b36bf9e864"]]},{"id":"d24269b36bf9e864","type":"debug","z":"7a970dd2f2d67388","g":"de7b0ee8ecb2e5ee","name":"debug 2823","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":2250,"y":3060,"wires":[]}]

Looks like a bug, same result in 4.0.3. Can you report it here Issues · node-red/node-red · GitHub

[edit] Picked wrong bookmark sorry. Corrected repo to main

Trigger node is a core node @E1cid (so its in the main node-red repo) - issue should be created here: Issues · node-red/node-red · GitHub

Issue raised: Core Trigger Node does not send epoch · Issue #4914 · node-red/node-red · GitHub

Initial fix PR here - Fix trigger node date handling for latest time type input by dceejay · Pull Request #4915 · node-red/node-red · GitHub

1 Like

Thanks for jumping on that fix so quickly and validating that the problem wasn't just me. lol

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