yardenK
yardenK

Reputation: 312

ESPAsyncWebServer.h with esp32

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.

Upvotes: 2

Views: 38445

Answers (3)

Robert L
Robert L

Reputation: 81

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.

Upvotes: 0

J0ANMM
J0ANMM

Reputation: 8525

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.

Upvotes: 3

kurt
kurt

Reputation: 106

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

Upvotes: 7

Related Questions