Hi, I am in process of upgrading my Android server device from IoTivity 1.3.1 to 2.0 (using the latest 'master').
I face a weird issue that I never saw with the previous version. "Randomly", the response to POST request to one of my resources - is wrapped as an array. Normally, the response looks like: {"value":false,"x.com.sure.a.b":"abc"} In the buggy scenarios, appearing randomly, the data is reported by the client as: [{"value":false,"x.com.sure.a.b":"abc"}] So the data inside the array is right, but the array [] should not be there! Unfortunately, the only way I was able to reproduce the issue (from time to time) is via running a specific test of the Certification Test Tool. I failed to reproduce the bug "manually". I wonder what can be the cause of such a behavior, and how to debug it further. I tried to look into the logs, and indeed I saw that in the "buggy" responses, same code generates 60 bytes, instead of 59 bytes. The proper response (59 bytes) looks in the logs like: 07-02 15:39:33.912 10395-10566 D/MBED_TLS: 0000: *44 44 3d a7 32 dc 99 23 b9 73 74 62 53 77 69 74 * DD=.2..#.stbSwit 07-02 15:39:33.912 10395-10566 D/MBED_TLS: 0010: * 63 68 12 27 10 e2 06 ec 08 00 e1 f6 e2 c0 ff bf* ch.'............ 07-02 15:39:33.912 10395-10566 D/MBED_TLS: 0020: *65 76 61 6c 75 65 f4 6e 78 2e 63 6f 6d 2e 73 75* evalue.nx.com.su 07-02 15:39:33.912 10395-10566 D/MBED_TLS: 0030: *72 65 2e 61 2e 62 63 61 62 63 ff* re.a.bcabc. The buggy response (60 bytes) looks in the logs like:: 07-02 15:42:07.102 10395-10566 D/MBED_TLS: 0000: *54 44 b8 1b 3b ca b1 13 b9 73 74 62 53 77 69 74* TD..;....stbSwit 07-02 15:42:07.102 10395-10566 D/MBED_TLS: 0010: *63 68 12 27 10 e2 06 ec 08 00 e1 f6 e2 c0 ff 81* ch.'............ 07-02 15:42:07.102 10395-10566 D/MBED_TLS: 0020: *bf 65 76 61 6c 75 65 f5 6e 78 2e 63 6f 6d 2e 73* .evalue.nx.com.s 07-02 15:42:07.102 10395-10566 D/MBED_TLS: 0030: *75 72 65 2e 61 2e 62 63 61 62 63 ff * ure.a.bcabc. Is there any method to analyze the payload? I tried to "paste" to cbor.me site - no success. Any hint on how to analyze the data and identify the "root cause" is highly appreciated. Thanks in advance Max Max Kholmyansky CTO - SURE Universal Ltd. http://www.sureuniversal.com -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#10234): https://lists.iotivity.org/g/iotivity-dev/message/10234 Mute This Topic: https://lists.iotivity.org/mt/32290813/21656 Group Owner: iotivity-dev+ow...@lists.iotivity.org Unsubscribe: https://lists.iotivity.org/g/iotivity-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-