Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application stops with SyntaxError: Unexpected token L #158

Closed
mcwieger opened this issue Dec 6, 2017 · 7 comments
Closed

Application stops with SyntaxError: Unexpected token L #158

mcwieger opened this issue Dec 6, 2017 · 7 comments

Comments

@mcwieger
Copy link

mcwieger commented Dec 6, 2017

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
Copy link
Owner

empierre commented Dec 6, 2017

Hello,

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

@mcwieger
Copy link
Author

mcwieger commented Dec 6, 2017

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

@empierre
Copy link
Owner

empierre commented Dec 6, 2017 via email

@mcwieger
Copy link
Author

mcwieger commented Dec 8, 2017

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
Copy link
Owner

empierre commented Dec 9, 2017

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
Copy link
Owner

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

empierre added a commit that referenced this issue Dec 22, 2017
@mcwieger
Copy link
Author

Resolved in version 0.2.36.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants