ESPAsyncWebServer icon indicating copy to clipboard operation
ESPAsyncWebServer copied to clipboard

WebAuthentication.cpp:73: undefined reference to `mbedtls_md5_starts'

Open 41linea45 opened this issue 3 years ago • 35 comments

Hi, I am using Visual Studio code and added last library to my project. platform.ini: env:esp32dev] platform = espressif32 board = esp32dev framework = arduino lib_deps = me-no-dev/ESP Async WebServer@^1.2.3 me-no-dev/AsyncTCP@^1.1.1 ayushsharma82/AsyncElegantOTA@^2.2.6 It gives error:

c:/users/delphi/.platformio/packages/[email protected]+2021r2-patch3/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\lib299\libESP Async WebServer.a(WebAuthentication.cpp.o):(.literal._ZL6getMD5PhtPc+0x4): undefined reference to mbedtls_md5_starts' c:/users/delphi/.platformio/packages/[email protected]+2021r2-patch3/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\lib299\libESP Async WebServer.a(WebAuthentication.cpp.o): in function getMD5(unsigned char*, unsigned short, char*)': D:\Yazilim\Off_Road_2\ESP32\Inclinometer2/.pio/libdeps/esp32dev/ESP Async WebServer/src/WebAuthentication.cpp:73: undefined reference to `mbedtls_md5_starts'

How can i solve this problem? I used just sample code.

41linea45 avatar May 01 '22 12:05 41linea45

I had the same issue, waiting for the solution.

update: I had check the esp32 framework tool, and realized that the md5.h file had a small changing, the mbedtls_md5_starts() was removed. I think the radical solution is on the next update on the AsyncWebServer library.

update: the WebServer file was use new function mbedtls_md5_starts_ret() instead mbedtls_md5_starts().

QuangKhuongIoT avatar May 02 '22 15:05 QuangKhuongIoT

I just ran into this as well. I forced an older version of the expressif framework in platform.io for now:

  framework = arduino
  platform = [email protected]
  board = esp32doit-devkit-v1

csetera avatar May 02 '22 23:05 csetera

I just ran into this as well. I forced an older version of the expressif framework in platform.io for now:

  framework = arduino
  platform = [email protected]
  board = esp32doit-devkit-v1

is there a way to force older version on Arduino IDE? currently my Platform IO is not running in VS Code(separate problem) so i can barely even try

Keanu-Type avatar May 04 '22 17:05 Keanu-Type

your compiler crash out .Try reinstall Platformio and delete library folder in .pio/libdeps/ and than uninstall platformio, find this folder [email protected] and also delete ,also dont install ArduinoIDE in VScode when you running Platformio. but first you should try clean button at VScode or clean all (this function clean also librarys so when you use some custom better make copy of .pio/libdeps/ ). I got similar issue with esp8266 .

IronBamBam1990 avatar May 06 '22 14:05 IronBamBam1990

super annoying issue, I used the workaround from #1085 to be able to compile my project. Please fix

MartinVerges avatar May 08 '22 10:05 MartinVerges

I think there may be a versioning issue, v1.2.3 was released 3 years ago https://github.com/me-no-dev/ESPAsyncWebServer/blob/master/library.properties 2 Oct 2019 platformio get this version https://registry.platformio.org/libraries/me-no-dev/ESP%20Async%20WebServer/versions then after that at 26 Jul 2021 have a new file without new version https://github.com/me-no-dev/ESPAsyncWebServer/blob/master/src/WebAuthentication.cpp

My bet is, that platformio will only update their files if you release a new version like 1.2.4

82andre avatar May 08 '22 13:05 82andre

https://docs.platformio.org/en/latest/librarymanager/creating.html "Publishing You can publish a library to the PlatformIO Registry using pio pkg publish command. Every time when you modify a source code of a library you will need to increment the “version” field in library.json manifest and re-publish again."

82andre avatar May 08 '22 13:05 82andre

https://github.com/me-no-dev/ESPAsyncWebServer/pull/970

https://github.com/me-no-dev/ESPAsyncWebServer/pull/970/commits/edabf225b4dcc49c471cd78fd3d63e0bbc583111

IronBamBam1990 avatar May 08 '22 13:05 IronBamBam1990

Same issue, won´t write to esp until you switch to expressiv 3.5.0; If you use expressiv 3.5.0, then everything should be fine...

tmattukat avatar May 11 '22 08:05 tmattukat

PlatformIO still gives problems because the version in the json shows as 1.2.3 so Platform doesn't try to update the files.

DanteNahuel avatar May 17 '22 00:05 DanteNahuel

Any updates on when this is fixed?

JellevanKraaij avatar May 25 '22 17:05 JellevanKraaij

Hello again Thank you very much for replies. I apoligize for late feedback. I solved problem in platformIO like that:

lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer.git

41linea45 avatar May 26 '22 08:05 41linea45

That's not solving, that's just a workaround. We need a simple version upgrade and a clean update of the registry files. This can only be done by the maintainer and it takes as little as a minute to solve the whole problem.

MartinVerges avatar May 26 '22 08:05 MartinVerges

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 31 '22 03:07 stale[bot]

Can someone update the library / registry to fix other projects using the old style lib_deps = ESP Async WebServer? Thanks!

Erriez avatar Aug 17 '22 18:08 Erriez

I think there may be a versioning issue, v1.2.3 was released 3 years ago https://github.com/me-no-dev/ESPAsyncWebServer/blob/master/library.properties 2 Oct 2019 platformio get this version https://registry.platformio.org/libraries/me-no-dev/ESP%20Async%20WebServer/versions then after that at 26 Jul 2021 have a new file without new version https://github.com/me-no-dev/ESPAsyncWebServer/blob/master/src/WebAuthentication.cpp

My bet is, that platformio will only update their files if you release a new version like 1.2.4

Following this logic by @82andre (thanks) I was able to solve the problem. By downloading the library directly (Code -> Download ZIP) and copying it to the libraries folder of my PlatformIO project (Project/lib/ESPAsyncWebServer).

maverck- avatar Sep 17 '22 19:09 maverck-

[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.

stale[bot] avatar Sep 17 '22 19:09 stale[bot]

PlatformIO.ini entry

lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer.git

This solved it for me (rather then the usual me-no-dev/ESP Async WebServer@^1.2.3 entry) but it means this still has not been "fixed" natively. Still is version 1.2.3.

RalphBacon avatar Sep 19 '22 09:09 RalphBacon

Thanks for the quick fix:

lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer.git

this works for me, took me a while to figure that out....

me-chiel avatar Sep 26 '22 14:09 me-chiel

Has there been an update? Don't think so, right? I came across the issue since my GitHub action failed with this error. If I build the project locally with platform io everything works fine. I used the approach mentioned above and it fixed the CI build problem

//platfromio.ini
lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer.git

Would love to use the standard way again and not this workaround.

Thanks

kiliw avatar Nov 01 '22 10:11 kiliw

replacing //platfromio.ini lib_deps = ESP Async WebServer

with

//platfromio.ini lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer.git

worked. Is platformIO repo using an older version of the server?

sanjayraojjn avatar Nov 29 '22 12:11 sanjayraojjn

@me-no-dev Please see https://github.com/me-no-dev/ESPAsyncWebServer/issues/1147#issuecomment-1120415957. It seems to be a quickfix! Until you release a version >1.2.3 with platformio, all will get this ugly error.

h0l0gram avatar Jan 12 '23 23:01 h0l0gram

I'm still getting this same error

Jefferson-Lopes avatar Jan 30 '23 14:01 Jefferson-Lopes

You can remove this error in PlatformIO by editing

.pio\libdeps\esp32dev\ESP Async WebServer\src\WebAuthentication.cpp

and remove (comment out) the call to mbedtls_md5_starts(&_ctx); (line 74, approx).

image

Or just get the library another way like this:

https://github.com/me-no-dev/ESPAsyncWebServer.git

which seems to force the download of the correct version of the library.

RalphBacon avatar Jan 30 '23 15:01 RalphBacon

better use mbedtls_md5_starts_ret() instead of commenting out a deprecated method.

mjechow avatar Feb 02 '23 01:02 mjechow

Yes, that seems to be the update in the GitHub:

image

Oddly, I've had no trouble with the call not being there! 😲

RalphBacon avatar Feb 02 '23 12:02 RalphBacon

I ran into the same issue. However, only removing/commenting mbedtls_md5_starts_ret() out worked in my case. If I replace me-no-dev/ESP Async WebServer@^1.2.3 with https://github.com/me-no-dev/ESPAsyncWebServer.git in platformio.ini the web server could not resolve any endpoint (I get a 404 Not Found for any URI).

SebastianKotstein avatar Apr 21 '23 12:04 SebastianKotstein

I could compiled, but it did not work for me with: "lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer.git"

it just works like changing the decrapted lines to the new versions : mbedtls_md5_starts_ret(&_ctx); mbedtls_md5_update_ret(&_ctx, data, len); mbedtls_md5_finish_ret(&_ctx, _buf);

acsadamjozsef avatar Jun 27 '23 12:06 acsadamjozsef

I had the same issue, waiting for the solution.

update: I had check the esp32 framework tool, and realized that the md5.h file had a small changing, the mbedtls_md5_starts() was removed. I think the radical solution is on the next update on the AsyncWebServer library.

update: the WebServer file was use new function mbedtls_md5_starts_ret() instead mbedtls_md5_starts().

thank you, saved my day

sseruzaifa avatar Nov 01 '23 15:11 sseruzaifa

Thanks, worked for me too! Only mbedtls_md5_starts needed to be changed

Westcott1 avatar Nov 17 '23 19:11 Westcott1