Weird "mbedtls_md5" error in cosole when uploading

I need help to know and how i could fix this "mbedtls_md5" error

ERROR LOGS

c:\Users\REDACTED\Documents\Arduino\libraries\ESPAsyncWebServer\src\WebAuthentication.cpp: In function 'bool getMD5(uint8_t*, uint16_t, char*)':
c:\Users\REDACTED\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\REDACTED\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\REDACTED\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

exit status 1

Compilation error: exit status 1

Hi @thelirony. The version of the "ESPAsyncWebServer" library you are using is incompatible with recent versions of the ESP32 boards platform. The bug was fixed six months ago in the original "ESPAsyncWebServer" library:

However, the "ESPAsyncWebServer" library you get from the Arduino IDE Library Manager is a fork created by a community member (because the original author has ignored all requests to submit their library to Library Manager) and that community member has not been actively maintaining their fork. So the version of the library you get from Library Manager is out of date.

I'll provide instructions you can follow to uninstall the outdated fork and then install the original version of the library that is compatible:

Uninstall Outdated Library

  1. Select Sketch > Include Library > Manage Libraries... from the Arduino IDE menus to open the "Library Manager" view in the left side panel.
  2. Type ESPAsyncWebServer in the "Filter your search..." field.
  3. Scroll down through the list of libraries until you see the "ESPAsyncWebServer by lacamera" entry.
  4. Hover the mouse pointer over the "ESPAsyncWebServer by lacamera" entry.
  5. You will see a ●●● icon appear near the top right corner of the library entry. Click on that icon.
    A context menu will open.
  6. Select "Remove" from the menu.
    An "Uninstall" dialog will open.
  7. Click the "YES" button in the "Uninstall" dialog to confirm that you want to uninstall the library.
    The dialog will close.
  8. Wait for the uninstall process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:

    ⓘ Successfully uninstalled library ...

Install Original Library

  1. Click the following link to open the library's GitHub repository homepage in your web browser:
    https://github.com/me-no-dev/ESPAsyncWebServer
  2. Click the "Code ▾" button you see on that page.
  3. Select Download ZIP from the menu.
    A download of the ZIP file of the library will start.
  4. Wait for the download to finish.
  5. Select Sketch > Include library > Add .ZIP Library from the Arduino IDE menus.
    The "Select the zip file containing the library you'd like to add" dialog will open.
  6. Select the downloaded file (ESPAsyncWebServer-master.zip) from the dialog.
  7. Click the "Open" button.
    The dialog will close.
  8. Wait for the installation process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:

    ⓘ Successfully installed library from ...

Now try uploading your sketch again. Hopefully this time there won't be any errors.

1 Like

I guess that that should be "Install original library" ??

Thanks for the correction @sterretje.

Feel free to correct your post :smiley:

Thank you very much "ptillisch".

I applied this modification and it works fine.

Sincerely.

Pierre.

You are welcome @ChPr. I noticed your topic in the Français category while I was researching to answer this one and thought I should add a note there in case it would be helpful to you. I'm glad it is working for you now!

This really helped thanks so much, @ptillisch

You are welcome. I'm glad if I was able to be of assistance.

Regards, Per

1 Like

I also happen to have additional questions, sorry if im bothering too much of your time.

does the library code retain the same? or do I have to change it to make it work?

#include <ESPAsyncWebServer.h>

You definitely don't need to change the #include directive. As for any other changes, I don't think any are required.

You can see here the difference between the code in the incompatible version of the library you were using when you encountered that error compared to the original library you are now using:

1 Like