Because I am trying to use ESPAsyncWebserver, I have found that in order to do OTA updates, it is neccessary to also use ESPAsyncHTTPUpdateServer. However, when I try to install the ESPAsyncHTTPUpdateServer library (v3.0.0) I get this error message:
Failed to install library: 'ESPAsyncHTTPUpdateServer:3.0.0'. No valid dependencies solution found
Not come across this one before. Any ideas why its saying there are no valid dependencies?
I was able to install the older version 2.0.0 library, but when I hit the Update button I get the same error.
No worries. I will raise an issue on the authors Github anyway to make them aware.
Thinking a bout it, I guess its kind of a fair point, since there is no ESP32 category (presumably since its not an Arduino branded board) and I don't think the library applies to an Arduino board (except possibly the Arduino Nano ESP32?). Would be interested to know actually whether and where ESP32 questions fit on the forum.
I've never used an ESP controller but from posts made here I've understood there is one special ESP that has a special category. Most other boards are handled in "Project.....".
Reading the category description/help usually guides You.
That is no reason to exclude a library. There is a chance something else has gone wrong on the github side. It is fine to add libraries to the library manager even if they can only be used by a board or processor that isn't an actual Arduino board, but for the library to install properly there are other criteria and possibly those aren't met. Find it on github, do a manual install if you want to use it and raise the issue with the developers. If manual install also doesn't work, raise that as an issue i guess.
there is only one published version, 3.1.0 -- which does not qualify as (>=3.7.4). That's the error.
If you visit that More Info link, you'll see that repository has been archived. At some point not too long ago, it seems like that entire effort moved into a new repository (under a new GitHub organization). It's also listed in the Library Manager. The name now has (two, not three) spaces:
I happen to have the exact minimum version installed on this box. Here's that official name in the new repository, for the latest published version (first line):
So the fix might be to add two spaces on that depends line. Until that happens officially, you might get around it by downloading the release .zip and manually unzipping it in your sketchbook's /libraries subdirectory. Conveniently, all the content in that .zip is under a single directory, ESPAsyncHTTPUpdateServer-3.0.0, which has the version number appended. Normal library subdirectories don't. Then restart the IDE if it's already running.
It shows up in the Examples (under the File menu), and the sole example, simple_server, compiled for me. (I already had the minimum dependency installed.)
@kenb4 thank you for the detailed reply. I wasn't sure where the dependencies are listed, so thank you for pointing that out.
As for ESP Async Webserver, I initially saw only one installed entry in the IDE and that is for version 3.12.1. However, when I removed the spaces, I also found ESPAsyncWebServer by lacamera version 3.1.0 installed.
Simply removing version 3.1.0 does not allow ESPAsyncHTTPUpdateSerer v3.0.0 to be installed, likely because of the additional spaces as you suggest.
I will try a manual install later and see how that goes.
Thanks.
PS. I have raised an issue on the with the developers on the Github repository and provided a link to post #8 for a possible solution.
That explains why removing version 3.1.0 didn’t help: the installer is still looking for a library named ESPAsyncWebServer, while your installed 3.12.1 library identifies itself as ESP Async WebServer.
The dependency declaration should therefore be:
depends=ESP Async WebServer (>=3.7.4)
Arduino’s library specification explicitly allows spaces in dependency names. The header remains ESPAsyncWebServer.h; there’s no need to change your sketch’s #include.
For the manual installation kenb4 suggested:
Keep ESP Async WebServer 3.12.1 by ESP32Async installed.
Extract the update-server release ZIP into your configured sketchbook’s libraries directory. Ensure library.properties is directly inside the extracted library folder, without an extra enclosing folder.
Restart the IDE and try compiling simple_server for your board.
That follows Arduino’s manual installation procedure. You’ll need any remaining dependencies installed separately.
If compilation reports multiple matches for ESPAsyncWebServer.h, check the “Used” path in the output to confirm it selected the ESP32Async version.
Reporting this upstream was the right step. A corrected release needs to reach the Library Manager index to fix automatic installation; changing a locally extracted copy won’t repair the metadata of the published v3.0.0 package.
I have installed the ESPAsyncHTTPUpdateServer version 3.0.0 library manually as per instructions. I am now getting this error:
In file included from /mnt/ntfs/Data/Data/Programming/Arduino/Bathroom-Fan-Control/Bathroom-Fan-Control-v2/Bathroom-Fan-Control-v2.ino:30:
/home/johnc/Data/Data/Programming/Arduino/libraries/ESP_Async_WebServer/src/ESPAsyncWebServer.h:43:10: fatal error: AsyncTCP.h: No such file or directory
43 | #include <AsyncTCP.h>
| ^~~~~~~~~~~~
compilation terminated.
exit status 1
So it seems there are missing dependencies in the ESPAsyncWebserver library. I have tried removing and re-installing, but it seems I didn't miss any warning about installing with or without dependencies.
If I go to install Async TCP, there are two versions: AsyncTCP by dvarrel v 1.1.4, and also Async TCP by ESP32Async v 3.6.1. Seems the former has not been updated for 4 years so the latter is probably the one to use?
It seems that there is also a library called AsyncEspFsWebserver, with nice built-in /setup and /edit pages so who knows which is the correct version to use....
I am curious, since the ESPAsyncHTTPUpdateServer library hasn't been updated since last year, it doesn't seem likely that this has gone unnoticed for so long, which would tend to suggest that nobody is using it?
The only reason why I am trying to use it is because all of the examples I encounter seem to use this Async version of the ESP webserver library. My original ESP8266 code did not use Async code and I would be happy NOT to use it if I could find examples of how to structure the server.on statements to serve files from the LittleFS volume.
Is it the general wisdom to use Async versions nowadays? What's the advantage? I see only significant disadvantage due to the added complexity.
With the ESP32, if the Async versions exploit RTOS and are task based, there could be a speed benefit. For an ESP8266 the difference in method was just that the call to handle() was automatic at the end of loop(), so not really any benefit.
I installed the newer 'Async TCP', i.e the one with the space in between and that seems to have satisfied the compiler. I am now having some difficulty understanding the Async library calls and syntax which I have made the subject of another discussion.