ESPAsyncWebServer compilation error (example "simple_server.ino")

Hello everybody,

I'm facing a complilation error with ESPAsyncWebServer.

To exclude a programming error in my code I've compiled the simple_server.ino example, and I got the same error.

Below is my IDE environment:

IDE: 2.3.2
Package ESP32: 3.0.4
AsyncTCP: 1.1.4
ESPAsyncWebSercer: 3.1.0

Board: Wemos LOLIN32
Sketch: Example "simple_server.ino"

Compilation errors I got:


c:\Users\Serge\Documents\Arduino\libraries\ESPAsyncWebServer\src\WebAuthentication.cpp: In function 'bool getMD5(uint8_t*, uint16_t, char*)':
c:\Users\Serge\Documents\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
c:\Users\Serge\Documents\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
c:\Users\Serge\Documents\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
c:\Users\Serge\Documents\Arduino\libraries\ESPAsyncWebServer\src\AsyncEventSource.cpp: In member function 'void AsyncEventSourceClient::_queueMessage(AsyncEventSourceMessage*)':
c:\Users\Serge\Documents\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
c:\Users\Serge\Documents\Arduino\libraries\ESPAsyncWebServer\src\AsyncWebSocket.cpp: In member function 'void AsyncWebSocketClient::_queueMessage(AsyncWebSocketMessage*)':
c:\Users\Serge\Documents\Arduino\libraries\ESPAsyncWebServer\src\AsyncWebSocket.cpp:549:7: error: 'ets_printf' was not declared in this scope; did you mean 'vswprintf'?
  549 |       ets_printf("ERROR: Too many messages queued\n");
      |       ^~~~~~~~~~
      |       vswprintf

exit status 1

Compilation error: exit status 1

If someone of you can help to find where I'm wrong it will be great!

Many thanks by advance

Please learn how to use the forum at HERE

Hello sonfcy,
Your response seems to indicate misuse of the forum on my part.
I followed the link you provided me, I noticed three important things, the etiquette (I think I didn't fail...) the right category (Using Arduino
Programming Questions seems to be for me the right one, but...) and to provide as much information as possible to identify the problem while remaining concise (I seem to have done it...).
Sorry, I need you to shed some light on how to use the Arduino forum better.
Very cordially

Did you try reverting to a 2.x ESP32 BSP?

Hello gfvalvo,
No, I didn't try, I will and let you know
Thanks to your for your help

Good evening gfvalvo,
As you suggested, I "downgraded" my environment to version 2.0.13 of the Arduino ESP32 package.
In fact, now, I no longer have any addressable ESP32 boards except "Arduino ESP32 Board (only one board... nanoblabla).
What 's happening?

You forgot the entire source code enclosed in code tags. You did do the error log that many miss though.

I'm guessing you installed the wrong ESP32 package. Go with the correct one. And, go with the latest pre 3.x version - 2.0.17. So:

This is what your esp32 boards entry should look like.

https://espressif.github.io/arduino-esp32/package_esp32_index.json)
There are a few others, but many have problems, this I think is the OFFICIAL path.

Good morning sonofcy,
Tanks for your reply.
I checked in the preferences panel of my IDE, and the one is declared is the one your recommand me to use ...

Open your boards manager, enter esp32 in the search box, do a screen grab like this one and post it here

Or, go back and read Post # 8. That image is for IDE v1.8.x but the principle is the same.

Sorry, I was skimming and misunderstood your post. I wonder why he did not follow directions????

Good afternoon sonofcy,

I understand you want to be shure I'm using the good ESP32 package.

I tried to compile the "simple_server" example with differents version of the espressif esp32 package.
I failed with version 3.0.4 to 3.0.0, and get success with version 2.0.17. Imagine, a downgrade for 5 versions ...
Now I have to checked if I can compile my own sketch error free. I'm suspicious about ElegantOTA", I think I've to downgrade to the right version of AsyncElegantOTA.
I will let you now ...

Have you tried downloading the latest version of ESPAsyncWebServer from GitHub? The comments claim it has been updated for v3.x support.

1 Like

Yes I'm at the right level of version, the latest: 3.1.0 ...

How do you know that? The library has no numbered releases:

For your information, I use both ESP8266 and ESP32 boards (of different kind). I can compile skteches running with ESP8266 without any issue, with the latest version of AsyncWebServer and ElegantOTA. ESP8266 package is the one of ESP8266 community version 3.1.2
If it could help ...

The latest version of ESPAsyncWebServer arduino library is 1.2.4 and with latest fix it works well also with ESP32 Arduino framework v3.x.x. No needs to downgrade.

Download the library as zip file from Github and then update your local copy.

Hello cotestatnt,

I had a look to gihtub repository and indeed the last version of ESPAsyncWebServer is 1.2.4

But if you go the Arduino reference page for ESPAsyncWebSer, the latest version is 3.1.0, and is downloadable !!!

I'm very confusing ... is Arduino reference page really trustable?

I'll try with version 1.2.4 and let you know