Node-RED Flows Disappearing

Hi,

Having an issue with my flows disappearing on startup - it's happened about 3 times over the last 2 months.

My Node-RED instance runs on my laptop and I only switch on the instance when I need to do some work on it.

I don't make any changes to the file system on the laptop and access the instance via localhost:1880 each time.

Any help would be much appreciated.

Node-RED startup log below however, it's working fine at the moment;

Welcome to Node-RED

===================

27 Oct 18:02:33 - [info] Node-RED version: v1.1.3

27 Oct 18:02:33 - [info] Node.js version: v12.18.4

27 Oct 18:02:33 - [info] Darwin 19.6.0 x64 LE

27 Oct 18:02:33 - [info] Loading palette nodes

27 Oct 18:02:35 - [info] +-----------------------------------------------------

27 Oct 18:02:35 - [info] | uibuilder initialised:

27 Oct 18:02:35 - [info] | root folder: /Users/user/.node-red/uibuilder

27 Oct 18:02:35 - [info] | version . .: 2.0.8

27 Oct 18:02:35 - [info] | packages . : vue,bootstrap,bootstrap-vue,jquery,socket.io

27 Oct 18:02:35 - [info] +-----------------------------------------------------

27 Oct 18:02:35 - [info] Dashboard version 2.23.3 started at /ui

27 Oct 18:02:35 - [info] Settings file : /Users/user/.node-red/settings.js

27 Oct 18:02:35 - [info] Context store : 'default' [module=memory]

27 Oct 18:02:35 - [info] User directory : /Users/user/.node-red

27 Oct 18:02:35 - [warn] Projects disabled : editorTheme.projects.enabled=false

27 Oct 18:02:35 - [info] Flows file : /Users/user/.node-red/flows_MacBook-Pro.lan1.json

27 Oct 18:02:35 - [info] Server now running at http://127.0.0.1:1880/

27 Oct 18:02:35 - [warn]

---------------------------------------------------------------------

Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials

file will not be recoverable, you will have to delete it and re-enter

your credentials.

You should set your own key using the 'credentialSecret' option in

your settings file. Node-RED will then re-encrypt your credentials

file using your chosen key the next time you deploy a change.

---------------------------------------------------------------------

27 Oct 18:02:35 - [info] Starting flows

27 Oct 18:02:35 - [error] [enocean in:6715590c.265248] TypeError: Cannot read property 'username' of undefined

27 Oct 18:02:35 - [error] [openweathermap:6f27bc67.142a44] No API key set

27 Oct 18:02:35 - [error] [openweathermap:1a12d312.6e23cd] No API key set

27 Oct 18:02:35 - [error] [openweathermap:469e4dc3.3cc9a4] No API key set

27 Oct 18:02:35 - [error] [enocean in:8788cbc3.4265f8] TypeError: Cannot read property 'username' of undefined

27 Oct 18:02:35 - [error] [openweathermap:8d25e229.8a6ed] No API key set

27 Oct 18:02:35 - [info] Started flows

(node:12729) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.

27 Oct 18:02:36 - [error] [file in:EcobeeTokens] Error: ENOENT: no such file or directory, open '/home/pi/data/ecobee_token/test.log'

27 Oct 18:02:36 - [error] [function:Define Access and Refresh Tokens] TypeError: Cannot read property 'refresh_token' of undefined

27 Oct 18:02:41 - [error] [function:Display temperature] TypeError: Cannot read property 'length' of undefined

Hi yes as Nick suggested over there - šŸŽ‰ Node-RED 1.2.2 released the most likely cause is dhcp on your network giving you a different hostname for your laptop - in the log above - MacBook-Pro.lan1 - If you look in your ~/.node-red directory you will probably find several different flows_ files that are the missing ones... you can edit your settings.js file to set the flow file to a fixed name and it won't move again.

To complement Dave's comment above, the ~/.node-red dir on your Windows system is /Users/user/.node-red. Linux/OS X typically alias ~ as the user's home dir. I'm not aware of Windows having that(?).

1 Like

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