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

ESPDash: JSON.parse() exceptions #66

Open
mrcalvin opened this issue Jan 20, 2024 · 0 comments
Open

ESPDash: JSON.parse() exceptions #66

mrcalvin opened this issue Jan 20, 2024 · 0 comments

Comments

@mrcalvin
Copy link

I got my first HiGrows these days. I wanted to get them running following the Arduino IDE instructions. All fine. However, when connecting to the Dashboard, it renders in an empty state. No components activated. Firing up the JavaScript debugger shows that the JSON strings sent back to the DASH board are incomplete, partial.

const b = JSON.parse(m.data); keeps failing with

SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 49 of the JSON data

etc.

Watching the Web socket messages to the frontend, one sees data such as (m.data):

'{"id":645939565,"symbol":"mV","value":"4804.54"}],"charts":[],"stats": []}'

https://github.com/ayushsharma82/ESP-DASH/blob/b677bf6efbd8edea2151878be59cc683e2ce20d5/src/ESPDash.cpp#L168 does not produce the entire JSON string, e.g. the "command" entry is entirely missing etc.

Any hints, help would be appreciated. (I am using ESPDash from the lib package, 4.0.3).

image
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

1 participant