Just got an old flows json after a reboot on one machine and stale deployment on another

The strangest thing just happened on 2 separate node red instances on 2 machines...

Machine 1: I had made a bunch of edits yesterday to a flow. Today I did a reboot of that machine and all my changes were gone after it started back up. I found the changes in another flows file in ~/,node-red:

Oct 21 13:19 flows_machinename.local.json
Dec 11 15:13 flows_machinename.localdomain.json

I was able to recover the changes by copying the localdomain one to the local one.

machine 2: Then, I was seeing an old bug from machine 2 - one I had fixed a long time ago. When I went to look at the flow, it looked fine - the bug wasn't there. I disabled the node that was sending me the it was getting so I could just view the debug panel without my phone continuously vibrating. But after deploy, the buggy behavior went away. I re-enabled and redeployed and everything was fine. No more bugs.

I remember what was causing that old bug. It was a -c option in a specific exec node. I even reproduced it on the command line and confirmed it's the same output the node was texting me. It seems like there was a stale version of the flow still in memory that somehow got enabled?? But I never rebooted that machine...

I don't understand what the heck just happened. It seems as if both machines obtained stale/old flows. Machine 1 (on node-red version 1.2.7) actually showed the stale flow in the editor. Machine 2 (on node-red version 1.0.3) was running the old flow but showing me the latest one.

I can imagine how machine 1 ended up with a stale flow because of the reboot, but I have no idea how machine 2 ended up with a stale flow. Is this the same bug with 2 manifestations? And is this a known issue that an update will resolve?

The default is to use the machines host name in the flows file name. Something caused your machines to change their host name. Probably some sort network or router issue. You can avoid this issue by specifying the flows file name in settings.js

Oh wow! I don't think I'd have ever figured that out. Thanks so much. I will set the name.

If you start Node-RED using node-red you can also pass in the name of the flow node-red myflow.json.

Even better (in my mind) is to use the projects feature (you have to enable this in settings.js) where it builds a folder called 'projects' in the .node-red folder and adds the flow files in there. Here is an example
Screen Shot 2021-12-13 at 10.04.23 AM
and you can switch projects. Here are two more:
Screen Shot 2021-12-13 at 10.06.55 AM

You know, it's very ironic that I had a similar(ish) issue on my iPhone this morning. I have a Siri Shortcut automation that runs at 8am every weekday morning that checks my calendar for meetings and if I have any that morning, it plays a song (like a backup alarm sort of feature). I recently added a check of the system volume to set the volume if it was below 50%. This morning, the volume wasn't adjusted. It was at 0%. I went in and checked the automation and the volume check was missing - as if I'd never added it!

The thing is, I'd thought I'd already added that volume check like a month ago, but had chalked it up as something I'd thought about but never actually did. So I added the volume check again, but in an entirely new rebuild of that automation...

I wonder if it could be related to whatever the network issue is...

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