Node red stopped working after uncaught exception of json token

Hi !

I worked on the node red, and suddenly the whole system is crushed. In the node js terminal, i got this error message:

25 Jan 23:24:00 - [red] Uncaught Exception:
25 Jan 23:24:00 - SyntaxError: Unexpected token i in JSON at position 5061
    at JSON.parse (<anonymous>)
    at NlpManager.import (C:\Users\tamas\.node-red\node_modules\node-nlp\src\nlp\nlp-manager.js:245:51)
    at C:\Users\tamas\.node-red\node_modules\node-red-contrib-chatbot\nodes\chatbot-nlp-load.js:32:23
    at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)

Is there any solutioin of that or reinstall the whole system (which wouldn't be a big problem, because today i made a back up about i) ? Someone know, which json file is contains the error?

Thank you for your helps !

You should report this to the repository of node-red-contrib-chatbot. Basically, a node should handle its own errors so as not to crash node-red.

You might also want to switch to using the telegram nodes instead.

No need for anything so drastic.

start node-red using safe mode, fix the problem, deploy.

2 Likes

Yes, JSON parsing is notoriously fickle and should ALWAYS be wrapped in a try/catch.

2 Likes

Okay i fixed the problem in safe mode, thank you for your help.

The reason why i use chatbot is because, i want to use fb messenger because that one i use daily.

1 Like

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