This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Issue with "cJSON_Parse failed :" in lte_ble_gateway application

Hi Team,

We are working on the nRF9160 DK. We are integrating the central_uart code into the lte_ble_gateway, As we integrated for the purpose to use NUS(nordic uart service). As the project is compiled successfully, But at run time i observed the below issue in the LTE link monitor

Please find the issue in the highlighted region

Please let me know that do i missed any configs or please point me to the solution why this issue arises

Thanks,

venkatesh

  • Pretty sure there is a missing "}" in the JSON. Please copy and paste AS TEXT and not as image.

  • Hi,

    Please find the text as requested

    cJSON_Parse failed: {"desired":{"pairing":{"state":"paired","topics":{"d2c":"prod/05f78b98-f918-44bb-b4ce-f55604c81c6d/m/d/nrf-352656100373185/d2c","c2d":"prod/05f78b98-f918-44bb-b4ce-f55604c81c6d/m/d/nrf-352656100373185/c2d"}},"nrfcloud_mqtt_topic_prefix":"prod/05f78b98-f918-44bb-b4ce-f55604c81c6d/"},"config":{"GPS":{"enable":false}}}\x0D\x0A 2020-07-02T10:08:28.471Z DEBUG modem << E: nrf_cloud_decode_requested_state Failed -2\x0D\x0A 2020-07-02T10:08:28.475Z DEBUG modem << E: Handler failed! state: 5, type: 3\x0D\x0A 2020-07-02T10:08:28.530Z DEBUG modem << E: nct_input: failed -2\x0D\x0A


    Thanks,
    venkatesh
  • Thanks, I miscounted { } above. Unfortunately that also means I have absolutely zero idea why the JSON parse step failed. :-(

  • Could you debug your application and look at the function 

    • cJSON_Parse() (<..>\ncs\v1.3.0\nrf\subsys\net\lib\nrf_cloud\src\nrf_cloud_codec.c)
      • cJSON_ParseWithOpts() (<..>\ncs\v1.3.0\nrf\ext\cjson\cJSON.c):


    Put breakpoints on all "goto fail" to see where the error comes from.

    Best regards,

    Simon