ayushsharma82 / ElegantOTA

OTA updates made slick and simple for everyone!
https://elegantota.pro
GNU Affero General Public License v3.0
643 stars 119 forks source link

cannot convert 'AsyncWebServer*' to 'WebServer*' #228

Closed gjniewenhuijse closed 1 month ago

gjniewenhuijse commented 1 month ago

At the Arduino ide 2.3.3. i received an error at compile, any idea why? Before it works for me.

C:\Temp\Bluetti_ESP32_zwembad\Bluetti_ESP32\BWifi.cpp: In function 'void initBWifi(bool)': C:\Temp\Bluetti_ESP32_zwembad\Bluetti_ESP32\BWifi.cpp:585:22: error: cannot convert 'AsyncWebServer' to 'WebServer' 585 ElegantOTA.begin(&server); ^~~
AsyncWebServer*
In file included from C:\Temp\Bluetti_ESP32_zwembad\Bluetti_ESP32\BWifi.cpp:10: c:\Users\gj.niewenhuijse\Documents\Arduino\libraries\ElegantOTA\src/ElegantOTA.h:107:38: note: initializing argument 1 of 'void ElegantOTAClass::begin(WebServer, const char, const char*)' 107 void begin(ELEGANTOTA_WEBSERVER server, const char username = "", const char * password = ""); ^ C:\Temp\Bluetti_ESP32_zwembad\Bluetti_ESP32\BWifi.cpp:587:22: error: cannot convert 'AsyncWebServer' to 'WebServer' 587 ElegantOTA.begin(&server, wifiConfig.ota_username, wifiConfig.ota_password); ^~~
AsyncWebServer*

c:\Users\gj.niewenhuijse\Documents\Arduino\libraries\ElegantOTA\src/ElegantOTA.h:107:38: note: initializing argument 1 of 'void ElegantOTAClass::begin(WebServer, const char, const char)' 107 | void begin(ELEGANTOTA_WEBSERVER server, const char username = "", const char password = ""); | ^

exit status 1

Compilation error: cannot convert 'AsyncWebServer' to 'WebServer'

DennisT2018 commented 1 month ago

I've seen this when the Async web server hasn't been enabled in the .h file. See docs here: https://docs.elegantota.pro/getting-started/async-mode

ayushsharma82 commented 1 month ago

Solution provided by @DennisT2018 . Closing the issue.

juanmartin84 commented 3 weeks ago

Hello, i'm having this problem.

Tried to check the link provided by @DennisT2018 but seems broken.

image

ayushsharma82 commented 3 weeks ago

Docs were recently updated. Here’s the new link: https://docs.elegantota.pro/getting-started/async-mode

Jozh77 commented 2 days ago

@ayushsharma82 al parecer el link esta roto