Azure-Samples / Azure-Samples/iot-middleware-freertos-samples

Error in AzureIoTHubClientProperties_GetNextComponentProperty

Open
#389 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
CMake
Stars
88
Forks
54
PR merge metrics
No merged PRs in 30d

Description

### This issue is for a:
```
- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
```

### Minimal steps to reproduce
> Random problem, I couldn't explain its appearance...

### Any log messages given by the failure
> AZ IOT: Could not get next component property: core error=0x00000003

### Expected/desired behavior
> When processing my received properties JSON, I'm calling `AzureIoTHubClientProperties_GetNextComponentProperty()` while it returns `eAzureIoTSuccess` (I'm waiting for `eAzureIoTErrorEndOfProperties` code to stop).
But sometimes (I can't explain why), instead of returning `eAzureIoTSuccess` or `eAzureIoTErrorEndOfProperties`, it returns `eAzureIoTErrorJSONReaderDone`. This error code means "No more JSON text left to process.". Why does the function didn't return `eAzureIoTErrorEndOfProperties` ?
This is due to `az_iot_hub_client_properties_get_next_component_property()` which return `AZ_ERROR_NOT_IMPLEMENTED` instead of `AZ_ERROR_IOT_END_OF_PROPERTIES`.

### OS and Version?
> Windows 11
> ESP-IDF v4.4 (ESP32)

### Versions
> [azure-iot-middleware-freertos](https://github.com/Azure/azure-iot-middleware-freertos) : aadfcd7e6511164370b2d03481bfcb76bb3d7399

### Mention any other details that might be useful
Thank you in advance,
Waiting for you help 👍

Contributor guide

Open the contributing guide

Research direction

Start by tracing az_iot_hub_client_properties_get_next_component_property() and the AzureIoTHubClientProperties_GetNextComponentProperty() wrapper described in the report. Compare the AZ_ERROR_NOT_IMPLEMENTED and AZ_ERROR_IOT_END_OF_PROPERTIES paths, then verify that exhausting the received properties JSON returns eAzureIoTErrorEndOfProperties rather than eAzureIoTErrorJSONReaderDone.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, c
Domain
embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.