Node red crashed, newbie no idea needs help....

520 views
Skip to first unread message

karthhic Mukil

unread,
Dec 30, 2015, 4:17:40 PM12/30/15
to Node-RED
I was working in node red learning, used a few nodes (function, template, inject, json, debug) but suddenly deployment kept failing and got this message in console...
Welcome to Node-RED
===================

30 Dec 13:14:30 - [info] Node-RED version: v0.11.2
30 Dec 13:14:30 - [info] Node.js version: v0.12.7
30 Dec 13:14:30 - [info] Loading palette nodes
30 Dec 13:14:31 - [warn] ------------------------------------------
30 Dec 13:14:31 - [warn] Failed to register 1 node type
30 Dec 13:14:31 - [warn] Run with -v for details
30 Dec 13:14:31 - [warn] ------------------------------------------
30 Dec 13:14:31 - [info] Settings file : /usr/local/lib/node_modules/node-red/settings.js
30 Dec 13:14:31 - [info] User directory : /home/karthhic/.node-red
30 Dec 13:14:31 - [info] Flows file : /home/karthhic/.node-red/flows_J.json
30 Dec 13:14:31 - [info] Server now running at http://127.0.0.1:1880/
30 Dec 13:14:31 - [info] Starting flows
30 Dec 13:14:31 - [info] Started flows
30 Dec 13:14:31 - [error] [xml:ed54492c.e9664] Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char: {
30 Dec 13:14:31 - [red] Uncaught Exception:
30 Dec 13:14:31 - Error: Text data outside of root node.
Line: 0
Column: 2
Char: "
at error (/usr/local/lib/node_modules/node-red/node_modules/xml2js/node_modules/sax/lib/sax.js:652:8)
at strictFail (/usr/local/lib/node_modules/node-red/node_modules/xml2js/node_modules/sax/lib/sax.js:675:22)
at Object.write (/usr/local/lib/node_modules/node-red/node_modules/xml2js/node_modules/sax/lib/sax.js:981:13)
at Parser.exports.Parser.Parser.processAsync (/usr/local/lib/node_modules/node-red/node_modules/xml2js/lib/xml2js.js:256:41)
at Immediate._onImmediate (/usr/local/lib/node_modules/node-red/node_modules/xml2js/lib/xml2js.js:7:59)
at processImmediate [as _immediateCallback] (timers.js:367:17)

Dave C-J

unread,
Dec 30, 2015, 4:25:09 PM12/30/15
to node...@googlegroups.com

Yikes !

The error is caused by the XML node not receiving clean XML (or a formatted json object to turn into XML)

But... Indeed it shouldn't cause an error to kill everything... We should catch it somewhat better. So will need to look at it.

karthhic Mukil

unread,
Jan 1, 2016, 5:52:16 AM1/1/16
to Node-RED

Dear Dave,

Is there any way to clear the node which i created?
If i clear it i can start making other nodes...

Thank you,
Karthhic

Mark Setrem

unread,
Jan 1, 2016, 6:04:33 AM1/1/16
to Node-RED
The flows are stored as a json file with a name that stars with flows_ in the .node-red directory in the home account of the user you are using to run node-red.

So if you are on a pi the chances are it is /home/pi/.node-red

If you haven't done anything you want to save you can delete that file.

Alternatively if you know the name of the xml file you could try editing the flows_ file to change the name of the xml file to something thats doesn't exist.
This should allow node-red to run.

Mark Setrem

unread,
Jan 1, 2016, 6:11:56 AM1/1/16
to Node-RED
oops should have said that its also included in the information that node-red sends to the console on startup.
And therefore in your case its the following file that contains the flows...

/home/karthhic/.node-red/flows_J.json

karthhic Mukil

unread,
Jan 1, 2016, 6:17:28 AM1/1/16
to Node-RED

Dear Mark

I cleared the files[flow_l.json, flow_lcreed.json] in that folder[/home/.node-red], now it is working...
Thank you,

Best Regards,
Karthhic

karthhic Mukil

unread,
Jan 1, 2016, 6:19:15 AM1/1/16
to Node-RED

yes i cleared it...

 /home/karthhic/.node-red/flows_J.json

Thank you
Reply all
Reply to author
Forward
0 new messages