Good evening to all of you,
All my sketches are developed with the OTA function.
I replaced AsyncElegantOTA with ElegantOTA a few days ago, everything went well, it compiles without errors and the code works.
When I updated ElegantOTA to version 3.1.4, then there was a lot of issues... No sketches compiled without errors (they related to the web server).
After modifying and compiling I decided to reinstall the IDE and configure it.
To be sure that my code is not in question, I compiled the "Simple_Server" example from the ESPAsyncWebServer library without problem.
On the other hand, when compiling the AsyncDemo example from the ElegantOTA library, I got a flood of errors.
The conditions of my tests are as follows:
IDE version 2.3.2
ESP8266 package 3.1.2
Libraries
ESPAsyncWebServer 3.1.0
ESPAsyncTCP 1.2.4
ElegantOTA 3.1.4
AsyncDemo compilations errors are as below:
In file included from c:\Users\Serge\Documents\Arduino\libraries\ElegantOTA\src/ElegantOTA.h:57,
from C:\Users\Serge\AppData\Local\Temp\.arduinoIDE-unsaved2024631-3268-1b38t6z.4ifm\AsyncDemo\AsyncDemo.ino:34:
C:\Users\Serge\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\ESP8266WebServer\src/ESP8266WebServer.h:47:19: error: 'HTTP_ANY' conflicts with a previous declaration
47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
| ^~~~~~~~
In file included from C:\Users\Serge\AppData\Local\Temp\.arduinoIDE-unsaved2024631-3268-1b38t6z.4ifm\AsyncDemo\AsyncDemo.ino:33:
c:\Users\Serge\Documents\Arduino\libraries\ESPAsyncWebServer\src/ESPAsyncWebServer.h:69:3: note: previous declaration 'WebRequestMethod HTTP_ANY'
69 | HTTP_ANY = 0b01111111,
| ^~~~~~~~
In file included from c:\Users\Serge\Documents\Arduino\libraries\ElegantOTA\src/ElegantOTA.h:57,
from C:\Users\Serge\AppData\Local\Temp\.arduinoIDE-unsaved2024631-3268-1b38t6z.4ifm\AsyncDemo\AsyncDemo.ino:34:
C:\Users\Serge\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\ESP8266WebServer\src/ESP8266WebServer.h:47:29: error: 'HTTP_GET' conflicts with a previous declaration
47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
| ^~~~~~~~
In file included from C:\Users\Serge\AppData\Local\Temp\.arduinoIDE-unsaved2024631-3268-1b38t6z.4ifm\AsyncDemo\AsyncDemo.ino:33:
c:\Users\Serge\Documents\Arduino\libraries\ESPAsyncWebServer\src/ESPAsyncWebServer.h:62:3: note: previous declaration 'WebRequestMethod HTTP_GET'
62 | HTTP_GET = 0b00000001,
| ^~~~~~~~
In file included from c:\Users\Serge\Documents\Arduino\libraries\ElegantOTA\src/ElegantOTA.h:57,
from C:\Users\Serge\AppData\Local\Temp\.arduinoIDE-unsaved2024631-3268-1b38t6z.4ifm\AsyncDemo\AsyncDemo.ino:34:
C:\Users\Serge\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\ESP8266WebServer\src/ESP8266WebServer.h:47:39: error: 'HTTP_HEAD' conflicts with a previous declaration
47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
| ^~~~~~~~~
In file included from C:\Users\Serge\AppData\Local\Temp\.arduinoIDE-unsaved2024631-3268-1b38t6z.4ifm\AsyncDemo\AsyncDemo.ino:33:
c:\Users\Serge\Documents\Arduino\libraries\ESPAsyncWebServer\src/ESPAsyncWebServer.h:67:3: note: previous declaration 'WebRequestMethod HTTP_HEAD'
67 | HTTP_HEAD = 0b00100000,
| ^~~~~~~~~
In file included from c:\Users\Serge\Documents\Arduino\libraries\ElegantOTA\src/ElegantOTA.h:57,
from C:\Users\Serge\AppData\Local\Temp\.arduinoIDE-unsaved2024631-3268-1b38t6z.4ifm\AsyncDemo\AsyncDemo.ino:34:
C:\Users\Serge\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\ESP8266WebServer\src/ESP8266WebServer.h:47:50: error: 'HTTP_POST' conflicts with a previous declaration
47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
| ^~~~~~~~~
In file included from C:\Users\Serge\AppData\Local\Temp\.arduinoIDE-unsaved2024631-3268-1b38t6z.4ifm\AsyncDemo\AsyncDemo.ino:33:
c:\Users\Serge\Documents\Arduino\libraries\ESPAsyncWebServer\src/ESPAsyncWebServer.h:63:3: note: previous declaration 'WebRequestMethod HTTP_POST'
63 | HTTP_POST = 0b00000010,
| ^~~~~~~~~
In file included from c:\Users\Serge\Documents\Arduino\libraries\ElegantOTA\src/ElegantOTA.h:57,
from C:\Users\Serge\AppData\Local\Temp\.arduinoIDE-unsaved2024631-3268-1b38t6z.4ifm\AsyncDemo\AsyncDemo.ino:34:
C:\Users\Serge\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\ESP8266WebServer\src/ESP8266WebServer.h:47:61: error: 'HTTP_PUT' conflicts with a previous declaration
47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
| ^~~~~~~~
In file included from C:\Users\Serge\AppData\Local\Temp\.arduinoIDE-unsaved2024631-3268-1b38t6z.4ifm\AsyncDemo\AsyncDemo.ino:33:
c:\Users\Serge\Documents\Arduino\libraries\ESPAsyncWebServer\src/ESPAsyncWebServer.h:65:3: note: previous declaration 'WebRequestMethod HTTP_PUT'
65 | HTTP_PUT = 0b00001000,
| ^~~~~~~~
In file included from c:\Users\Serge\Documents\Arduino\libraries\ElegantOTA\src/ElegantOTA.h:57,
from C:\Users\Serge\AppData\Local\Temp\.arduinoIDE-unsaved2024631-3268-1b38t6z.4ifm\AsyncDemo\AsyncDemo.ino:34:
C:\Users\Serge\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\ESP8266WebServer\src/ESP8266WebServer.h:47:71: error: 'HTTP_PATCH' conflicts with a previous declaration
47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
| ^~~~~~~~~~
In file included from C:\Users\Serge\AppData\Local\Temp\.arduinoIDE-unsaved2024631-3268-1b38t6z.4ifm\AsyncDemo\AsyncDemo.ino:33:
c:\Users\Serge\Documents\Arduino\libraries\ESPAsyncWebServer\src/ESPAsyncWebServer.h:66:3: note: previous declaration 'WebRequestMethod HTTP_PATCH'
66 | HTTP_PATCH = 0b00010000,
| ^~~~~~~~~~
In file included from c:\Users\Serge\Documents\Arduino\libraries\ElegantOTA\src/ElegantOTA.h:57,
from C:\Users\Serge\AppData\Local\Temp\.arduinoIDE-unsaved2024631-3268-1b38t6z.4ifm\AsyncDemo\AsyncDemo.ino:34:
C:\Users\Serge\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\ESP8266WebServer\src/ESP8266WebServer.h:47:83: error: 'HTTP_DELETE' conflicts with a previous declaration
47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
| ^~~~~~~~~~~
In file included from C:\Users\Serge\AppData\Local\Temp\.arduinoIDE-unsaved2024631-3268-1b38t6z.4ifm\AsyncDemo\AsyncDemo.ino:33:
c:\Users\Serge\Documents\Arduino\libraries\ESPAsyncWebServer\src/ESPAsyncWebServer.h:64:3: note: previous declaration 'WebRequestMethod HTTP_DELETE'
64 | HTTP_DELETE = 0b00000100,
| ^~~~~~~~~~~
In file included from c:\Users\Serge\Documents\Arduino\libraries\ElegantOTA\src/ElegantOTA.h:57,
from C:\Users\Serge\AppData\Local\Temp\.arduinoIDE-unsaved2024631-3268-1b38t6z.4ifm\AsyncDemo\AsyncDemo.ino:34:
C:\Users\Serge\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\ESP8266WebServer\src/ESP8266WebServer.h:47:96: error: 'HTTP_OPTIONS' conflicts with a previous declaration
47 | enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
| ^~~~~~~~~~~~
In file included from C:\Users\Serge\AppData\Local\Temp\.arduinoIDE-unsaved2024631-3268-1b38t6z.4ifm\AsyncDemo\AsyncDemo.ino:33:
c:\Users\Serge\Documents\Arduino\libraries\ESPAsyncWebServer\src/ESPAsyncWebServer.h:68:3: note: previous declaration 'WebRequestMethod HTTP_OPTIONS'
68 | HTTP_OPTIONS = 0b01000000,
| ^~~~~~~~~~~~
C:\Users\Serge\AppData\Local\Temp\.arduinoIDE-unsaved2024631-3268-1b38t6z.4ifm\AsyncDemo\AsyncDemo.ino: In function 'void setup()':
C:\Users\Serge\AppData\Local\Temp\.arduinoIDE-unsaved2024631-3268-1b38t6z.4ifm\AsyncDemo\AsyncDemo.ino:88:20: error: cannot convert 'AsyncWebServer*' to 'ESP8266WebServer*' {aka 'esp8266webserver::ESP8266WebServerTemplate<WiFiServer>*'}
88 | ElegantOTA.begin(&server); // Start ElegantOTA
| ^~~~~~~
| |
| AsyncWebServer*
In file included from C:\Users\Serge\AppData\Local\Temp\.arduinoIDE-unsaved2024631-3268-1b38t6z.4ifm\AsyncDemo\AsyncDemo.ino:34:
c:\Users\Serge\Documents\Arduino\libraries\ElegantOTA\src/ElegantOTA.h:107:38: note: initializing argument 1 of 'void ElegantOTAClass::begin(ESP8266WebServer*, 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 'ESP8266WebServer*' {aka 'esp8266webserver::ESP8266WebServerTemplate<WiFiServer>*'}
If anyone in the community is willing to look into my problem, his help would be greatly appreciated!
Thanks in advance ...