Just ran into this while uploading the messages app, looking at the JS console it seems to be caused by the status update.
IIRC those are sent with a small delay after you connect. That would match what I did:
1 disconnect watch from phone
2 press upload in app loader on PC
3 select the watch and connect -> error
<COMMS> ERROR Parsing JSON SyntaxError: Unexpected token { in JSON at position 298
comms.js:261 <COMMS> Actual response: "{\"id\":\"messages\",\"name\":\"Messages\",\"src\":\"messages.app.js\",\"icon\":\"messages.img\",\"sortorder\":-9,\"version\":\"0.47\",\"tags\":\"tool,system\",\"files\":\"messages.info,messages.app.js,messages.settings.js,messages.img,messages.wid.js,messages\",\"data\":\"messages.json,messages.settings.json;messages.jsonl\"}\r\n\r\n{\"t\":\"status\",\"bat\":100,\"chg\":0}\r\n"
ui.js:86 <TOAST>[error] Messages update failed, Error: Invalid JSON
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Just ran into this while uploading the
messages
app, looking at the JS console it seems to be caused by the status update.IIRC those are sent with a small delay after you connect. That would match what I did:
1 disconnect watch from phone
2 press upload in app loader on PC
3 select the watch and connect -> error