Upon the latest automatic Arduino update in May 2024 my project will not compile. This is one of the error messages related to the use of ESPAsyncWebSrv;
Arduino\libraries\ESPAsyncWebSrv\src\WebAuthentication.cpp:74:3: error: 'mbedtls_md5_starts_ret' was not declared in this scope; did you mean 'mbedtls_md5_starts'?
I have performed a fresh install of latest Arduino core and ESPAsyncWebSrv library including needed dependances but the compile error persists. Does anyone know about this problem.
Arduino IDE revision is Version: 2.3.2
Date: 2024-02-20T10:04:35.814Z
CLI Version: 0.35.3
Below is the test code I used to diagnose this problem; #include <Arduino.h> // Arduino core #include <WiFi.h> // Arduino core #include <AsyncTCP.h> // by dvarrel (1.1.4) AsyncTCP - Arduino Reference #include <ESPAsyncWebSrv.h> // by dvarrel (1.2.4) ESPAsyncWebSrv - Arduino Reference
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
In the latest realease of ESP32 Arduino core (v3.x.x) the mbedtls library was changed and some functions name is different.
The ESPAsyncWebSrv use some of the functions included in this library for calculating MD5 and SHA1 in some circumstances (authentication and websocket handling).
I'm working on it for one of my library where ESPAsyncWebServer is a dependency.
If you are interested I can share my results, when ready.
J'ai le même problème. Je suis sur un ESP32, et l'ai l'erreur de compilation:
J'utilise les dernière versions:
ESPAsyncWebServer at version 3.1.0
avec les librairies:
FQBN: esp32:esp32:uPesy_wrover
Using board 'uPesy_wrover' from platform ... Arduino15\packages\esp32\hardware\esp32\3.0.1
Using core 'esp32' from platform ... \Arduino15\packages\esp32\hardware\esp32\3.0.1
Et je m'aperçois, que d'autres erreurs sont apparues:
libraries\ESPAsyncWebServer\src\AsyncWebSocket.cpp:556:6: error: no declaration matches 'void AsyncWebSocketClient::_clearQueue()' libraries\ESPAsyncWebServer\src\AsyncWebSocket.h:161:7: note: 'class AsyncWebSocketClient' defined here libraries\ESPAsyncWebServer\src\AsyncWebSocket.cpp:583:3: error: '_clearQueue' was not declared in this scope; did you mean '_controlQueue'?
ça n'arrange pas vraiment les choses... je n'ai surment pas fait ce qu'il fallait.
Please help !
Sorry, I did not realized that english was a better language for this post.
I applied your latest modification mentionned in your message (This is the right order). Still does not work. I am using an ESP32, not an ESP8266, would that make the difference.
I can send you additional information if needed, just telp what you need.
Thanks,
Faced the same issue. After digging into the details and following up the code, the mbedtls/md5.h was updated 2 years ago and _ret was removed from those functions here.
Then, this repo looks like was updated 2 months ago and supports both function definitions.
not sure If you solved the issue, but I think you are on track already.
So, for what it's worth - and being a complete NOOB here, I fixed this my setting the version of my ESP32 board libraries in Arduino IDE to the latest 2.x.x and it compiled just fine and works perfectly.
@cotestatnt Yours seems to be the only variant of an ESP async webserver currently working with 3.x.x, but Arduino IDE still offers EspAsyncFsWebSrv version before the update.
I don't know the Arduino library life cycle. I don't know how to manually patch/update a library installed through Arduino IDE to newest from Git by - and I'd prefer to avoid it, considering possible conflicts and problems with future updates through Arduino IDE. The board I'm working on is only supported in 3.x.x, no 2.x.x support so downgrade is not an option.
Is there a chance 3.x.x-supported EspAsyncFsWebSrv will be available from Arduino IDE libraries anytime soon or should I bite the bullet and start trying to patch it manually?
If you like, with Arduino IDE library manager you can find my library async-esp-fs-webserver.
It's basically derived from the original ESPAsyncWebServer (not ESPAsyncWebSvr, which is a clone adapted to be recognized from library manager), with some add-on that i use always in my ESP projects (wifi manager, ACE editor and OTA firmware update).
c:\Users\oem\Documents\Arduino\libraries\AsyncEspFsWebserver\src\ESPAsyncWebServer\src\WebAuthentication.cpp: In function 'bool getMD5(uint8_t*, uint16_t, char*)':
c:\Users\oem\Documents\Arduino\libraries\AsyncEspFsWebserver\src\ESPAsyncWebServer\src\WebAuthentication.cpp:80:3: error: 'mbedtls_md5_starts_ret' was not declared in this scope; did you mean 'mbedtls_md5_starts'?
80 | mbedtls_md5_starts_ret(&_ctx);
...and so on, we know the story. I have "1.0.5" of AsyncEspFsWebserver installed and it's the newest I can access through Arduino. So, what gives?
Yes you are right, the 1.0.5 release has this compilation error with the 3.0.4 core
I actually already fixed the source, but I forgot to release version 1.0.6 which fixes the error.
I'll do it now, it will take an hour before it is available in Arduino IDE.
Got it, works! Thank you, the speed of the response was incredible!
For reference of anyone stumbling upon the problem here, I was getting a linker error in esp 3.0.6 AsyncEspFsWebserver 1.0.6 about duplicate declarations, so for anyone with the same, remove #include <AsyncTCP.h> from your sketch, the server contains it already.
c:/users/oem/appdata/local/arduino15/packages/esp32/tools/esp-rv32/2302/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld.exe: C:\Users\oem\AppData\Local\Temp\arduino\sketches\47DE0352A85A7DFAEADD46CD288EA9BE\libraries\AsyncEspFsWebserver\ESPAsyncWebServer\src\esp32\AsyncTCP.cpp.o: in function `AsyncClient::operator==(AsyncClient const&)':
c:\Users\oem\Documents\Arduino\libraries\AsyncEspFsWebserver\src\ESPAsyncWebServer\src\esp32/AsyncTCP.cpp:634: multiple definition of `AsyncClient::operator==(AsyncClient const&)'; C:\Users\oem\AppData\Local\Temp\arduino\sketches\47DE0352A85A7DFAEADD46CD288EA9BE\libraries\AsyncTCP\AsyncTCP.cpp.o:c:\Users\oem\Documents\Arduino\libraries\AsyncTCP\src/AsyncTCP.cpp:611: first defined here
I received the same failures at a S2 mini. Board is "Lolin S2 mini" selected.
Last compilation was in may without failures.
If I compile the same code with an 8266 mini, it works without failures.
All librarys and boards are new updatet.
Thank you for your help.
/home/xxx/Arduino/libraries/ESPAsyncWebServer/src/WebAuthentication.cpp: In function 'bool getMD5(uint8_t*, uint16_t, char*)':
/home/xxx/Arduino/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
/home/xxx/Arduino/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
/home/xxx/Arduino/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
/home/xxx/Arduino/libraries/ESPAsyncWebServer/src/AsyncEventSource.cpp: In member function 'void AsyncEventSourceClient::_queueMessage(AsyncEventSourceMessage*)':
/home/xxx/Arduino/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