No debug messages mystery

I set up some wemo socket (i.e. outlet/plug) nodes to control some window unit air conditioners I installed over the weekend. They are triggered via IFTTT & Webhookrelay. I created 2 ways to turn a set of wemo sockets on and off: a pair of IFTTT button widgets and a pair of IFTTT applets that use the Life360 service. I tested with the button widget and everything worked fine. The Life360 IFTTT applet makes the same webhook call with the exact same JSON string. So I thought that the test with the button widget would be sufficient.

I left home this morning and the Life360/webhook applet ran to turn off the sockets in the flow. I confirmed that the IFTTT applet ran without error in the IFTTT activity log for the applet. I also confirmed that my webhookrelay bucket logged the relay of the correct JSON to my instance of NodeRed, also without error. However, something failed somewhere, because the wemo sockets were all still on.

I went into the flow editor in NodeRed to take a look at the debug messages to see what it said. I have (among others) a debug node connected to the webhookrelay input, so I thought I should have at least seen that message. However, there were no messages in the debug panel.

I have other automations that used Node Red this morning which worked, so I should have at least seen something in the debug messages... but perhaps I'm not fully understanding how the debug node works?

When do debug messages go to the debug panel? Do they only accumulate while the flow editor is open? Are there any actions which can inadvertently clear debug messages from the debug panel? I didn't have any filters selected. I may have edited & re-deployed the flow before I looked at the debug panel. Could that have cleared the debug messages?

I'm not sure what failed where. I have triple-checked the JSON...

Actually, I just quadruple-checked it just now and I think I figured out the issue. I noticed that the webhookrelay bucket dashboard allows me to "re-send" a logged webhook to my instance of nodered. I tried re-sending both my button widget post and my Life360 post. The button widget debug message generated just fine, but the Life360 post (which says it sent successfully) did not show up in the debug messages panel!

It turns out that the JSON was NOT exactly the same. I had noticed that the webhookrelay displayed the JSON differently. The JSON from the button was nicely indented, but the one from Life360 was all on one line. The content looked exactly the same, but I finally noticed that the Life360 JSON had a few "smart quotes" instead of regular quotes. That MUST be the cause of the problem. I updated the IFTTT applet to replace the smart quotes and I'll find out if that fixed it tomorrow morning.

So now the question is... did webhookrelay not parse and submit the JSON because of the smart quotes, or did node red not log the debug message because of the smart quotes?

By default the debug node shows the output of msg.payload.
Do you see the same behaviour when you change the debug node output to complete msg object ?

Smartquotes will make the json invalid so it wouldn't get parsed.

These smart quotes, I'm not familiar with Life360 myself, but have these somewhere been added through using a mobile device to edit the configuration (as those prefer smart quotes) or is this a bug on their side? If the last one, it might be worth reporting it to them so others won't reach this same problem.

I've been in touch with the developer. He was able to confirm via testing that the payload makes it to the following JSON node. When I attach a debug node to the output of the JSON node, you see a parse error about the first smart quote. So it's coming out of the webhookrelay node. The issue seems to be that the debug node simply puts nothing in the debug panel when there's a smart quote in it.

So does the debug node try to parse the JSON? If it does and that fails, why doesn't it add an error to the debug panel?

Anyway, I tried to test out the suggestion of changing the debug node to out the complete msg object, but all my attempts to "re-send" the bad JSON from the webhookrelay dashboard were just getting queued and never seemed to fire. I had fixed the json yesterday, so it worked this morning. Perhaps I'll try again later.