empierre / MyDomoAtHome

MyDomoAtHome - REST interface for ImperoHome with Domoticz (ISS)
http://domoticz.com/wiki/ImperiHome
GNU General Public License v3.0
32 stars 22 forks source link

Application stops with SyntaxError: Unexpected token L #158

Closed mcwieger closed 6 years ago

mcwieger commented 6 years ago

After running stable for a day or three, MDAH stopped with the following error:

SyntaxError: Unexpected token L
    at Object.parse (native)
    at Request._callback (/volume1/@appstore/MyDomoAtHome/app/mdah.js:2358:29)
    at Request.self.callback (/volume1/@appstore/MyDomoAtHome/app/node_modules/request/request.js:200:22)
    at emitTwo (events.js:87:13)
    at Request.emit (events.js:172:7)
    at Request.<anonymous> (/volume1/@appstore/MyDomoAtHome/app/node_modules/request/request.js:1067:10)
    at emitOne (events.js:82:20)
    at Request.emit (events.js:169:7)
    at IncomingMessage.<anonymous> (/volume1/@appstore/MyDomoAtHome/app/node_modules/request/request.js:988:12)
    at emitNone (events.js:72:20)
    at IncomingMessage.emit (events.js:166:7)

See full error log attached.

mydomoathome.log

empierre commented 6 years ago

Hello,

This is domoticz that sent an incomplete messagen, strange it crashes ? does synology auto restart it ?

mcwieger commented 6 years ago

No, it never restarts. Would be nice to have a script that does that, but have not found a how-to yet.

empierre commented 6 years ago

will have a look how domoticz do so, on PI it does through a process called forever.

On Wed, Dec 6, 2017 at 10:15 AM, mcwieger notifications@github.com wrote:

No, it never restarts. Would be nice to have a script that does that, but have not found a how-to yet.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/empierre/MyDomoAtHome/issues/158#issuecomment-349579873, or mute the thread https://github.com/notifications/unsubscribe-auth/AG8xivIIutjAdAUsk-hI0Wz7oroGXJ2yks5s9lszgaJpZM4Q3irQ .

mcwieger commented 6 years ago

It stopped again, same error but with token P. Rest of the message is the same. Looking at the rest of the file, it's my P1 smart meter causing it, right? I suppose I can live without that info in Imperihome, but I can imagine that's not satisfactory for you, knowing this will cause it to crash?

empierre commented 6 years ago

in the initial log file, the last update is at the beginning of the file, if you have more clue of something I could reproduce I'll look into it.

empierre commented 6 years ago

try from line 2359: var data try { data= JSON.parse(body); } catch (e) { return console.error(e); }

mcwieger commented 6 years ago

Resolved in version 0.2.36.