NR on OS X, recently updated.
Problem: Everything was fine just a minute ago. I had a bunch of flows (some with Twitter credentials) working fine. I'm playing with a flaky USB-RS485 converter to do some Modbus and I had to stop NR. When I restarted it, It presented me with NO FLOWS whatsoever. I had seen this before as NR once decided I was not "jm" but rather "jm.local" and created a new flow file. I set the flowfile variable to be /Users/jm/.node-red/flows_jm.json to prevent that from happening. So I killed NR again and checked, no there wasn't a new flows_jm.local.json. I re-started NR and was returned to a state of flows from some time ago, very confusing. Stopped NR again. Re-started with the -s flows_jm.json and got an error about not being able to decrypt my credentials:
8 Feb 00:40:36 - [warn] Error loading credentials: SyntaxError: Unexpected token � in JSON at position 1
8 Feb 00:40:36 - [warn] Error loading flows: Error: Failed to decrypt credentials
Stopped NR and restarted without the -s and got a similar error:
8 Feb 01:01:12 - [warn] Error loading credentials: SyntaxError: Unexpected token B in JSON at position 0
8 Feb 01:01:12 - [warn] Error loading flows: Error: Failed to decrypt credentials
And now it will not load any flows:
Flows stopped as the credentials could not be decrypted.
Either way, what I was just working on is gone.
What causes that sort of behavior and how can I either recover or prevent it from happening in the future?