You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
I have searched the issue tracker for a similar issue and not found a similar issue.
General issue report
Hi everybody,
I try to fetch a binary file from an Azure Blob Storage, using esp_http_client, IDF v5.0.1. The fetch works in Postman or in a browser, which means the url path and the SAS token are correct.
I have uploaded two .txt files (3kB & 12KB) in the Azure blob. The strange thing is that the small file (test.txt) is somehow loaded, even there is an error from the HTTP_CLIENT. The beginning of the text file appears in the Error log:
I (12172) OTA: Opened successfully the HTTP connection
I (12252) HTTP_CLIENT: Body received in fetch header state, 0x3ffbad7a, 486
E (12252) HTTP_CLIENT: This is a test file.
This example demonstrates common operations the OTA tool:
reading, writing and erasing OTA partitions,
switching boot partitions, and
switching to factory partition.
Users taking a look at this example should focus on the contents of the Python script otatool_example.py or shell script otatool_example.sh. The scripts contain
programmatic invocation of the tool's functions via the Python API and command-l�?!
I (12302) OTA: Fetching the Image file of length 2840 bytes
I (12302) OTA: Incremented length 1024
I (12312) OTA: Incremented length 2048
I (12312) OTA: Incremented length 2840
I (12322) OTA: Connection closed
I (12322) OTA: Total received data length: 2840
I (12332) HTTP_CLIENT: HTTP_EVENT_DISCONNECTED
The second file: test_long.txt doesn't load at all, and throws the following error:
I (14202) OTA: Opened successfully the HTTP connection
E (14282) esp-tls-mbedtls: read error :-0x7100:
E (14282) transport_base: esp_tls_conn_read error, errno=Connection already in progress
E (14292) OTA: HTTP client fetch headers failed
I (14292) HTTP_CLIENT: HTTP_EVENT_DISCONNECTED
The same error appears in the case of any large size file. I have inlined the http client code below, which contains valid URLs for the test files, and SAS tokens with the expiration at the end of October, so plenty of time left for testing.
Given that the code above is quite standard, I believe there must be some client config settings which are required in particular for the Azure blob storage data fetch. Any idea why it doesn't work?
Any help will be highly appreciated!
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Azure Blob Storage data fetch fails due to HTTPS Client MBed TLS
Azure Blob Storage data fetch fails due to HTTPS Client MBed TLS (IDFGH-11100)
Sep 19, 2023
github-actionsbot
changed the title
Azure Blob Storage data fetch fails due to HTTPS Client MBed TLS (IDFGH-11100)
Azure Blob Storage data fetch fails due to HTTPS Client MBed TLS (IDFGH-11100) (CA-313)
Sep 20, 2023
Answers checklist.
General issue report
Hi everybody,
I try to fetch a binary file from an Azure Blob Storage, using esp_http_client, IDF v5.0.1. The fetch works in Postman or in a browser, which means the url path and the SAS token are correct.
I have uploaded two .txt files (3kB & 12KB) in the Azure blob. The strange thing is that the small file (test.txt) is somehow loaded, even there is an error from the HTTP_CLIENT. The beginning of the text file appears in the Error log:
I (12172) OTA: Opened successfully the HTTP connection
I (12252) HTTP_CLIENT: Body received in fetch header state, 0x3ffbad7a, 486
E (12252) HTTP_CLIENT: This is a test file.
This example demonstrates common operations the OTA tool:
Users taking a look at this example should focus on the contents of the Python script otatool_example.py or shell script otatool_example.sh. The scripts contain
programmatic invocation of the tool's functions via the Python API and command-l�?!
I (12302) OTA: Fetching the Image file of length 2840 bytes
I (12302) OTA: Incremented length 1024
I (12312) OTA: Incremented length 2048
I (12312) OTA: Incremented length 2840
I (12322) OTA: Connection closed
I (12322) OTA: Total received data length: 2840
I (12332) HTTP_CLIENT: HTTP_EVENT_DISCONNECTED
The second file: test_long.txt doesn't load at all, and throws the following error:
I (14202) OTA: Opened successfully the HTTP connection
E (14282) esp-tls-mbedtls: read error :-0x7100:
E (14282) transport_base: esp_tls_conn_read error, errno=Connection already in progress
E (14292) OTA: HTTP client fetch headers failed
I (14292) HTTP_CLIENT: HTTP_EVENT_DISCONNECTED
The same error appears in the case of any large size file. I have inlined the http client code below, which contains valid URLs for the test files, and SAS tokens with the expiration at the end of October, so plenty of time left for testing.
////////////////////////////////////////////////////////////////////////////////////
esp_http_client_config_t config = {
.url = "https://dumstorage.blob.core.windows.net/test/test.txt?sp=r&st=2023-09-13T16:10:57Z&se=2023-10-31T01:10:57Z&spr=https&sv=2022-11-02&sr=b&sig=5WjKp2Mp7uJWVJNLr2sdYt17YWuhYpVoJSwhmmBBgAo%3D",
//.url = "https://dumstorage.blob.core.windows.net/test/test_long.txt?sp=r&st=2023-09-13T14:51:07Z&se=2023-10-30T23:51:07Z&spr=https&sv=2022-11-02&sr=b&sig=lK88A5l41ysl%2BxEgwhvOsYZaia3CdJzFchDHnLlGaNE%3D",
.transport_type = HTTP_TRANSPORT_OVER_SSL,
.event_handler = http_event_handler,
.cert_pem = rootCaPem,
.cert_len = rootCaPemLen,
.timeout_ms = 5000,
//.auth_type = HTTP_AUTH_TYPE_BASIC,
.keep_alive_enable = true,
.skip_cert_common_name_check = true,
//.use_global_ca_store = true
};
////////////////////////////////////////////////////////////////////////////////////
Given that the code above is quite standard, I believe there must be some client config settings which are required in particular for the Azure blob storage data fetch. Any idea why it doesn't work?
Any help will be highly appreciated!
The text was updated successfully, but these errors were encountered: