Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
gjniewenhuijse opened this issue Oct 16, 2024 · 5 comments
Closed

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

gjniewenhuijse opened this issue Oct 16, 2024 · 5 comments

Comments

@gjniewenhuijse
Copy link

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
Copy link

DennisT2018 commented Oct 17, 2024

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
Copy link
Owner

Solution provided by @DennisT2018 . Closing the issue.

@juanmartin84
Copy link

Hello, i'm having this problem.

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

image

@ayushsharma82
Copy link
Owner

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

@Jozh77
Copy link

Jozh77 commented Nov 19, 2024

@ayushsharma82 al parecer el link esta roto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants