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

Thingsboard serialize json data issue #2054

Closed
gittimotap opened this issue Feb 12, 2024 · 4 comments
Closed

Thingsboard serialize json data issue #2054

gittimotap opened this issue Feb 12, 2024 · 4 comments
Labels
bug v7 ArduinoJson 7

Comments

@gittimotap
Copy link

gittimotap commented Feb 12, 2024

Describe the bug
thingsboard/thingsboard#10164

Troubleshooter report
Here is the report generated by the ArduinoJson Troubleshooter:
[Paste the report here]

Environment
Here is the environment that I used:

Reproduction
Here is a small snippet that reproduces the issue.

JsonDocument doc;

DeserializationError error = deserializeJson(doc, "{\"hello\":\"world\"}");

[insert repro code here]
https://github.com/thingsboard/thingsboard-client-sdk/blob/master/examples/0003-esp8266_esp32_send_data/0003-esp8266_esp32_send_data.ino

**Compiler output**    
If relevant, include the complete compiler output (i.e. not just the line that contains the error.)

**Program output**  
If relevant, include the repro program output.
16:59:57.275 -> .Connected to AP
16:59:58.286 -> Connecting to: (demo.thingsboard.io) with token (xxxxx)
16:59:58.493 -> Sending temperature data...
16:59:58.493 -> [TB] Unable to serialize json data
16:59:58.493 -> Sending humidity data...
16:59:58.493 -> [TB] Unable to serialize json data
16:59:59.496 -> Sending temperature data...
16:59:59.496 -> [TB] Unable to serialize json data
16:59:59.496 -> Sending humidity data...
16:59:59.496 -> [TB] Unable to serialize json data
17:00:00.466 -> Sending temperature data...
17:00:00.466 -> [TB] Unable to serialize json data

Expected output:

[insert expected output here]


Actual output:

[insert actual output here]

@gittimotap gittimotap added the bug label Feb 12, 2024
@gittimotap
Copy link
Author

6.21.5 works, seems like the next release broke something. Found originally here: thingsboard/thingsboard#10164

@bblanchon
Copy link
Owner

Hi @gittimotap,

I need more information.
Please provide at least a reproduction code.

Best regards,
Benoit

@bblanchon bblanchon added the v7 ArduinoJson 7 label Feb 14, 2024
@gittimotap
Copy link
Author

Hi Benoit
Easiest way is to take for example this https://github.com/thingsboard/thingsboard-client-sdk/blob/master/examples/0003-esp8266_esp32_send_data/0003-esp8266_esp32_send_data.ino and run it on some Arduino board (I tried both https://wiki.dfrobot.com/SKU_DFR0868_Beetle_ESP32_C3 and https://wiki.dfrobot.com/FireBeetle_Board_ESP32_E_SKU_DFR0654), it will give you an error straight away. You can use demo.thingsboard.io, you can have a free account there.

In any case, I tried multiple of the SDK examples and all give the same error: https://github.com/thingsboard/thingsboard-client-sdk/tree/master/examples (ESP32 based, not ESP8266). I always get "[TB] Unable to serialize json data" with anything above 6.21.5.

Regards
Timo

@bblanchon
Copy link
Owner

The workaround is available in ArduinoJson 7.0.4.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug v7 ArduinoJson 7
Projects
None yet
Development

No branches or pull requests

2 participants