ESPAsyncWebServer icon indicating copy to clipboard operation
ESPAsyncWebServer copied to clipboard

simple_server.ino

Open huster-songtao opened this issue 1 year ago • 6 comments

Board: XIAO ESP32C3 https://github.com/espressif/arduino-esp32 3.0.0-alpha3 Arduino IDE 2.3.2

d:\Arduino\Sketchbook\libraries\ESPAsyncWebServer\src\WebAuthentication.cpp: In function 'bool getMD5(uint8_t*, uint16_t, char*)': d:\Arduino\Sketchbook\libraries\ESPAsyncWebServer\src\WebAuthentication.cpp:74:3: error: 'mbedtls_md5_starts_ret' was not declared in this scope; did you mean 'mbedtls_md5_starts'? 74 | mbedtls_md5_starts_ret(&_ctx); | ^~~~~~~~~~~~~~~~~~~~~~ | mbedtls_md5_starts d:\Arduino\Sketchbook\libraries\ESPAsyncWebServer\src\WebAuthentication.cpp:75:3: error: 'mbedtls_md5_update_ret' was not declared in this scope; did you mean 'mbedtls_md5_update'? 75 | mbedtls_md5_update_ret(&_ctx, data, len); | ^~~~~~~~~~~~~~~~~~~~~~ | mbedtls_md5_update d:\Arduino\Sketchbook\libraries\ESPAsyncWebServer\src\WebAuthentication.cpp:76:3: error: 'mbedtls_md5_finish_ret' was not declared in this scope; did you mean 'mbedtls_md5_finish'? 76 | mbedtls_md5_finish_ret(&_ctx, _buf); | ^~~~~~~~~~~~~~~~~~~~~~ | mbedtls_md5_finish d:\Arduino\Sketchbook\libraries\ESPAsyncWebServer\src\AsyncEventSource.cpp: In member function 'void AsyncEventSourceClient::_queueMessage(AsyncEventSourceMessage*)': d:\Arduino\Sketchbook\libraries\ESPAsyncWebServer\src\AsyncEventSource.cpp:189:7: error: 'ets_printf' was not declared in this scope; did you mean 'vswprintf'? 189 | ets_printf("ERROR: Too many messages queued\n"); | ^~~~~~~~~~ | vswprintf

exit status 1

Compilation error: exit status 1

huster-songtao avatar Apr 01 '24 06:04 huster-songtao

I had exactly the same issue with an esp32 Wroom-32D and the Arduino IDE 2.3.2. I have also tried other AsyncWebServer libraries with the same error.

Lacuranas avatar Apr 01 '24 08:04 Lacuranas

I am facing same issue.

khawajamechatronics avatar May 06 '24 09:05 khawajamechatronics

My solution: #define mbedtls_md5_starts_ret mbedtls_md5_starts #define mbedtls_md5_update_ret mbedtls_md5_update #define mbedtls_md5_finish_ret mbedtls_md5_finish #define ets_printf log_e

vincentTea avatar May 15 '24 06:05 vincentTea

Without getting error with other esp32 boards I did do following edit in the library files Compilation of my source code are error free for ESP32 DEV, ESP32 C3 DEV and ESP32 S3 DEV boards

Changed in Arduino\libraries\ESPAsyncWebServer\src\WebAuthentic at line 75,76,77
mbedtls_md5_starts_ret --> mbedtls_md5_starts mbedtls_md5_update_ret --> mbedtls_md5_update mbedtls_md5_finish_ret --> mbedtls_md5_finish in AsyncEventSource.cpp changed at line 189 ets_printf --> log_e in AsyncWebSocket.cpp changed at line 549 ets_printf --> log_e

ednieuw avatar May 28 '24 14:05 ednieuw

OK, so I had the same problem. Started to modify a program I last touched a year or two ago and it wouldn't compile after I updated all my libraries and board definitions.

In addition to the changes listed by ednieuw above, I also changed in ~/libraries/ESPAsyncWebServer/src/AsyncWebSocket.cpp

line 323 if(_sent == _len){cpp -> if(_sent == _len){

Don't know how that "cpp" crept in there.

johnzbesko avatar Jun 07 '24 16:06 johnzbesko