Hello,
I have a Node-RED project setup with a git remote repository. The credentials file is encrypted, so when I pulled the project into a new machine, understandably, Node-RED says:
Flows stopped as the credentials could not be decrypted.
The flow credential file is encrypted, but the project's encryption key is missing or invalid.
However, when I go to the project settings and enter the encryption key, I get an unexpected error:
An unexpected error occurred:
Cannot read properties of undefined (reading 'hasOwnProperty')
code: unexpected_error
I should add...
I have pulled this very project from github many times before using the node-red browser wizard, where it steps you through everything, lets you enter the github url, select the SSH keys, etc. And it always works fantastically.
This time I am trying to get a little more clever because I have to pull this node-red project on many machines and it gets time consuming. I am now trying to automate the project pull on a fresh node-red install, and everything behaves as expected except this one piece with the credentials file. I got one new node-red project to work on another machine using this method, but now I ran into the credentials file issue on a new machine.
This is my workflow for pulling the project from script:
sudo mkdir /home/user/.node-red/projects/new_project_name
sudo chown -R user:user <project directory>
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
cd <project directory>
git init
git remote add origin <ssh_path_to_respository>
git pull origin main
I feel like since this method of pulling the project from github is the new piece of the puzzle, the credentials file error has something to do with this. Does anybody know how to resolve the error when trying to enter the credentials file encryption key in the node-red project settings?