2

I am new to esp32 programming. I wanted to try to make a server.

I tried to use the ESPAsyncWebServer library.

I got this error

In file included from C:\Users\User\Documents\Arduino\server\server.ino:2:0:

Multiple libraries were found for "WiFi.h"
sketch\ESPAsyncWebServer.h:33:22: fatal error: AsyncTCP.h: No such file or directory

Used: C:\Users\User\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi
compilation terminated.

Not used: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.33.0_x86__mdqgnx93n4wtt\libraries\WiFi
exit status 1
Error compiling for board ESP32 Wrover Module.

Can someone help me and tell me what is the correct way to install liberals because I have a feeling that I am doing it wrong.

1
  • I advise you to use VS Code and PlatformIO IDE for ESP32 and ESP8266, the below link will help you randomnerdtutorials.com/… Commented Aug 29, 2023 at 15:02

3 Answers 3

7

Your compile error says that you are lacking the AsyncTCP library. You can find it here: https://github.com/me-no-dev/AsyncTCP

Sign up to request clarification or add additional context in comments.

Comments

4

You will need to install both libraries ESPAsyncTCP and ESPAsyncWebServer, since the latter is dependant on the first.

You can install them by:

  1. Downloading the zip files from github:

  2. In your Arduino IDE go to Sketch > Include Library > ZIP-Library and select the libraries you just downloaded.

Comments

1

For others struggling with this question, my answer is "don't use unsuppored web servers" - ESPAsyncWebserver has too many leaks, race conditions, and security issues to be seriously considered in 2024. (The last submitted patch was > 2 years ago, which is far too long to rely on in modern web world.)

My vote goes to https://github.com/hoeken/PsychicHttp. The API is almost identical (search /AsyncWebServerRequest/PsychicRequest/g and you're 90% done; a PR like https://github.com/Aircoookie/WLED/pull/3726/files demonstrates the other renames)

With anyone asking this question, I'll say that since you're just starting, there's no reason to start behind the line: Use PsychicHTTP for ESP32.

1 Comment

Because this came up in a recent search, in 2025 the situation is rather better. EspAsyncWebServer had been abandoned. It's now been taken up and the new maintainers automatically run regression tests, care about leaks, etc. The problem observed in the OP no longer happens in current versions. Same lib name. New maintainers. New URL: github.com/ESP32Async/ESPAsyncWebServer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.