• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Web Updater on AsyncWebServer; Or web server libraries in conflict ?

Q&A Forum › Category: ESP32 › Web Updater on AsyncWebServer; Or web server libraries in conflict ?
0 Vote Up Vote Down
lubond asked 6 years ago

Hi Sara|Rui,

Thank you for your usefull Module 12 Unit 5, ESP32 Over-the-air (OTA) Programming – Web Updater.

Your example sketch realy works very nice. But …

My sketch uses ESPAsyncWebServer.h and my Async Web Server has been working up … to now.

Now, when I include OTA code (based on your example) to my sketch, then compiler reports error.

My problem is not that application does not work, my problem is compilation error. For example here:

// WebServer serverOTA(3232);    // declared somewhere in previous code
serverOTA.on("/", HTTP_GET, []() {
   serverOTA.sendHeader("Connection", "close");
   serverOTA.send(200, "text/html", loginIndex);
});

Compilation error:

no matching function for call to ‘WebServer::on(const char [2], WebRequestMethod, setup()::<lambda()>)’

When I remove only one of these two libraries and relevant code (AsyncWebServer section or WebServer section), then the remaining part of code works well. But not both together. In other words – when I remove ESPAsyncWebServer library & relevant code, there is no compilation error and remaining part of code (Web Updater) works fine, but my Async Web Server does not work of course … and vice versa.

It seems that these two libraries are not to be compatible with each other. What do you mean?

My questions:

  • Is it possible use AsyncWebServer and WebServer libraries simultaneously?
  • If not, are you able please to rebuild your Web Updater under AsyncWebServer library?

Thanks in advance for your advice.

Question Tags: Web Updater; ESPAsyncWebServer.h
1 Answers
0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

Hello, I need a few more details:

  • Please post the full code that you’ve tried to upload and it’s failing to compile (remove your network credentials)
  • What’s the ESP32 board add-on that you have installed in your Arduino IDE?
  • Can you update the ESPAsyncWebServer and the AsyncTCP libraries?

Recently that were some changes that require all libraries updated in order for the code to compile properly. Regards,
Rui

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.