runnane / node-red-contrib-easee

Node-Red module for streaming Easee charger data.
Apache License 2.0
7 stars 4 forks source link

Unexpected syntax error message flood: "SyntaxError: Unexpected token T in JSON at position 0" #21

Open RKausS opened 1 month ago

RKausS commented 1 month ago

Hello Jon I'm new with your contribution.It works, but almost every day a flood of error messages suddenly appear out of nowhere (every few seconds two error messages):

SyntaxError: Unexpected token T in JSON at position 0

Screenshot_1

To narrow down the node causing the problem, I deleted one node after the other until they were all gone, but the error messages continued to appear until I deleted the corresponding configuration node.

If I query the status of the Node-RED service on the SSH shell, these error messages appear there too. Restarting the Node-RED service solves the problem too - for a few hours, or at best a day or two.

Screenshot_2

Due to my lack of experience with Node-RED, I cannot judge whether I am causing the problem myself? The fact that a restart solves the problem for some time also makes a problem with the contribution possible, right?

Kind regards Roman

runnane commented 1 month ago

This is probably due to failed rest call not returning JSON. Will make a check for this and output more descriptive error.

runnane commented 1 month ago

I've released 0.5.8 with some more informative error messages, please let me know what errors you get now, @RKausS