mathieucarbou / ESPAsyncWebServer

Asynchronous HTTP and WebSocket Server Library for ESP32, ESP8266 and RP2040
https://mathieu.carbou.me/ESPAsyncWebServer/
GNU Lesser General Public License v3.0
83 stars 17 forks source link

Example not working on ESP32-C3 #161

Closed NOV62 closed 3 days ago

NOV62 commented 4 days ago

Hello! The Captive Portal example does not work on the ESP32-C3 Supermini board. It compiles without errors, loads, an access point appears and that's it. Nothing happens when you try to log in to the address 192.168.4.1. The call from CanHandle = true is not passed to handleRequest(). I tried it on 3 modules. Arduino IDE 2.3.3. What could be the matter?

mathieucarbou commented 4 days ago

I can reproduce on esp32dev... Looking... I have many apps using CP and I do not code it like this example which comes from the original fork.

mathieucarbou commented 4 days ago

Fixed: https://github.com/mathieucarbou/ESPAsyncWebServer/commit/33611e8c0afd00f2ad4d115fe0ac65e3785851de

What happened is that the base method signature was changed to add const, but the overridden methods not having override, the compiler was unable to hint about the signature changes and canHandle was returning false (from base method). The one the the example class was not called since was not overriding anymore.

NOV62 commented 4 days ago

Thanks for the tip. It became clear why some of my sketches don't work. I'm just learning.