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

Running example, update, compile error with ESP8266 core 3.0.0 #361

Closed
svdrummer opened this issue May 16, 2021 · 7 comments · Fixed by #406
Closed

Running example, update, compile error with ESP8266 core 3.0.0 #361

svdrummer opened this issue May 16, 2021 · 7 comments · Fixed by #406
Labels
enhancement New feature or request

Comments

@svdrummer
Copy link

Hello all,
Is there any traps to running compiling on esp8266?
I am trying the example for "update" When i try to compile i get compile errors saying it wont compile for (whatever esp8266 i have set)
compiles okay for esp32 modules.

@svdrummer
Copy link
Author

In file included from C:\Users\cruis\Documents\Arduino\libraries\AutoConnect\src/AutoConnect.h:30,
from C:\Users\cruis\Documents\Arduino\libraries\AutoConnect\examples\Update\Update.ino:20:
C:\Users\cruis\Documents\Arduino\libraries\PageBuilder\src/PageBuilder.h:182:16: error: 'virtual bool PageBuilder::canHandle(HTTPMethod, String)' marked 'override', but does not override
182 | virtual bool canHandle(HTTPMethod requestMethod, String requestUri) override;
| ^~~~~~~~~
C:\Users\cruis\Documents\Arduino\libraries\PageBuilder\src/PageBuilder.h:183:16: error: 'virtual bool PageBuilder::canUpload(String)' marked 'override', but does not override
183 | virtual bool canUpload(String uri) override;
| ^~~~~~~~~
C:\Users\cruis\Documents\Arduino\libraries\PageBuilder\src/PageBuilder.h:184:8: error: 'bool PageBuilder::handle(WebServerClass&, HTTPMethod, String)' marked 'override', but does not override
184 | bool handle(WebServerClass& server, HTTPMethod requestMethod, String requestUri) override;
| ^~~~~~
C:\Users\cruis\Documents\Arduino\libraries\PageBuilder\src/PageBuilder.h:185:16: error: 'virtual void PageBuilder::upload(WebServerClass&, String, HTTPUpload&)' marked 'override', but does not override
185 | virtual void upload(WebServerClass& server, String requestUri, HTTPUpload& upload) override;
| ^~~~~~
C:\Users\cruis\Documents\Arduino\libraries\AutoConnect\examples\Update\Update.ino: In function 'String onSetup(AutoConnectAux&, PageArgument&)':
C:\Users\cruis\Documents\Arduino\libraries\AutoConnect\examples\Update\Update.ino:114:32: warning: unused parameter 'aux' [-Wunused-parameter]
114 | String onSetup(AutoConnectAux& aux, PageArgument& arg) {
| ~~~~~~~~~~~~~~~~^~~
C:\Users\cruis\Documents\Arduino\libraries\AutoConnect\examples\Update\Update.ino:114:51: warning: unused parameter 'arg' [-Wunused-parameter]
114 | String onSetup(AutoConnectAux& aux, PageArgument& arg) {
| ~~~~~~~~~~~~~~^~~
C:\Users\cruis\Documents\Arduino\libraries\AutoConnect\examples\Update\Update.ino: In function 'String onApply(AutoConnectAux&, PageArgument&)':
C:\Users\cruis\Documents\Arduino\libraries\AutoConnect\examples\Update\Update.ino:124:32: warning: unused parameter 'aux' [-Wunused-parameter]
124 | String onApply(AutoConnectAux& aux, PageArgument& arg) {
| ~~~~~~~~~~~~~~~~^~~
C:\Users\cruis\Documents\Arduino\libraries\AutoConnect\examples\Update\Update.ino:124:51: warning: unused parameter 'arg' [-Wunused-parameter]
124 | String onApply(AutoConnectAux& aux, PageArgument& arg) {
| ~~~~~~~~~~~~~~^~~
Multiple libraries were found for "SD.h"
Used: C:\Users\cruis\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\libraries\SD
Not used: C:\Program Files (x86)\Arduino\libraries\SD
Not used: C:\Users\cruis\Documents\Arduino\libraries\SD
Multiple libraries were found for "ArduinoJson.h"
Used: C:\Users\cruis\Documents\Arduino\libraries\ArduinoJson
Not used: C:\Users\cruis\Documents\Arduino\libraries\arduino_863954
Not used: C:\Users\cruis\Documents\Arduino\libraries\ArduinoJson-old

@Hieromon
Copy link
Owner

Hieromon commented May 17, 2021

Is there any traps to running compiling on esp8266?

No such option exists in the latest versions of AutoConnect and PageBuilder. In a properly built and maintained environment, the AutoConnect library bundled examples has been confirmed to compile successfully on ESP8266 Arduino Core 2.7.4. Refs: https://travis-ci.org/github/Hieromon/AutoConnect/builds/749314436

It looks like you're already using an ESP8266 3.0.0 core, which was just released two days ago, but I haven't verified it yet. ESP8266 3.0.0 has many breaking changes and lost backward compatibility. It will take some time for many other libraries to catch up with the latest version of ESP8266 arduino core, not only AutoConnect.

By the way, the error you encountered has already been reported in the ESP8266 core issue.
esp8266/Arduino#8046
I have not yet decided to take revision on the PageBuilder side to fix this issue. The careless fix confuses many users. Not everyone uses the latest cores. At first glance, this loss of backward compatibility is a revision that contributes to improved memory consumption of the ESP8266WebServer library, but it is essentially a policy issue of how to maintain the health of the library.

EDIT

I have staged an interim workaround for this issue on the PageBuilder branch 'supports/esp8266-3.0.0'. However, it is not guaranteed to work with ESP8266 arduino core 3.0.0.

@Hieromon
Copy link
Owner

The AutoConnect v1.3.0 branch is useful as a temporary measure until AutoConnect has completely verified ESP8266 arduino core 3.0.0. That branch is a candidate for the next version of AutoConnect and currently works with ESP8266 core 3.0.0. You also need to upgrade your library to PageBuilder v1.5.0 RC for AutoConnect v1.3.0 RC. PageBuilder since v1.4.3 is compatible with ESP8266 Core 3.0.0 and is backward compatible.

I have not finished the ESP8266 core 3.0.0 verification at still many use cases, but you can proceed with the operation check of your sketch on the latest Arduino core for ESP8266 using the AutoConnect v1.3.0 RC with PageBuilder v1.5.0 RC.

If you find a problem working with esp8266 3.0.0, please create an issue topic. I will try to get rid of it by the release of AutoConnect v1.3.0.
Thank you for your contribution.

@Hieromon Hieromon changed the title Running example, update, compile error ~~Running example, update, compile error~~ Not works with ESP8266 core 3.0.0 May 22, 2021
@Hieromon Hieromon changed the title ~~Running example, update, compile error~~ Not works with ESP8266 core 3.0.0 <strike>Running example, update, compile error</strike> Not works with ESP8266 core 3.0.0 May 22, 2021
@Hieromon Hieromon changed the title <strike>Running example, update, compile error</strike> Not works with ESP8266 core 3.0.0 Running example, update, compile error with ESP8266 core 3.0.0 May 22, 2021
@Hieromon Hieromon pinned this issue May 22, 2021
@andresruizdev
Copy link

Same problem here. I solved this using AutoConnect v1.2.3 (from enhance/v123 branch) and PageBuilder v1.5.0 (from enhance/v150 branch)

In file included from C:\Users\cruis\Documents\Arduino\libraries\AutoConnect\src/AutoConnect.h:30,
from C:\Users\cruis\Documents\Arduino\libraries\AutoConnect\examples\Update\Update.ino:20:
C:\Users\cruis\Documents\Arduino\libraries\PageBuilder\src/PageBuilder.h:182:16: error: 'virtual bool PageBuilder::canHandle(HTTPMethod, String)' marked 'override', but does not override
182 | virtual bool canHandle(HTTPMethod requestMethod, String requestUri) override;
| ^~~~~~~~~
C:\Users\cruis\Documents\Arduino\libraries\PageBuilder\src/PageBuilder.h:183:16: error: 'virtual bool PageBuilder::canUpload(String)' marked 'override', but does not override
183 | virtual bool canUpload(String uri) override;
| ^~~~~~~~~
C:\Users\cruis\Documents\Arduino\libraries\PageBuilder\src/PageBuilder.h:184:8: error: 'bool PageBuilder::handle(WebServerClass&, HTTPMethod, String)' marked 'override', but does not override
184 | bool handle(WebServerClass& server, HTTPMethod requestMethod, String requestUri) override;
| ^~~~~~
C:\Users\cruis\Documents\Arduino\libraries\PageBuilder\src/PageBuilder.h:185:16: error: 'virtual void PageBuilder::upload(WebServerClass&, String, HTTPUpload&)' marked 'override', but does not override
185 | virtual void upload(WebServerClass& server, String requestUri, HTTPUpload& upload) override;
| ^~~~~~
C:\Users\cruis\Documents\Arduino\libraries\AutoConnect\examples\Update\Update.ino: In function 'String onSetup(AutoConnectAux&, PageArgument&)':
C:\Users\cruis\Documents\Arduino\libraries\AutoConnect\examples\Update\Update.ino:114:32: warning: unused parameter 'aux' [-Wunused-parameter]
114 | String onSetup(AutoConnectAux& aux, PageArgument& arg) {
| ~~~~~~~~~~~~~~~~^~~
C:\Users\cruis\Documents\Arduino\libraries\AutoConnect\examples\Update\Update.ino:114:51: warning: unused parameter 'arg' [-Wunused-parameter]
114 | String onSetup(AutoConnectAux& aux, PageArgument& arg) {
| ~~~~~~~~~~~~~~^~~
C:\Users\cruis\Documents\Arduino\libraries\AutoConnect\examples\Update\Update.ino: In function 'String onApply(AutoConnectAux&, PageArgument&)':
C:\Users\cruis\Documents\Arduino\libraries\AutoConnect\examples\Update\Update.ino:124:32: warning: unused parameter 'aux' [-Wunused-parameter]
124 | String onApply(AutoConnectAux& aux, PageArgument& arg) {
| ~~~~~~~~~~~~~~~~^~~
C:\Users\cruis\Documents\Arduino\libraries\AutoConnect\examples\Update\Update.ino:124:51: warning: unused parameter 'arg' [-Wunused-parameter]
124 | String onApply(AutoConnectAux& aux, PageArgument& arg) {
| ~~~~~~~~~~~~~~^~~
Multiple libraries were found for "SD.h"
Used: C:\Users\cruis\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\libraries\SD
Not used: C:\Program Files (x86)\Arduino\libraries\SD
Not used: C:\Users\cruis\Documents\Arduino\libraries\SD
Multiple libraries were found for "ArduinoJson.h"
Used: C:\Users\cruis\Documents\Arduino\libraries\ArduinoJson
Not used: C:\Users\cruis\Documents\Arduino\libraries\arduino_863954
Not used: C:\Users\cruis\Documents\Arduino\libraries\ArduinoJson-old

@Hieromon
Copy link
Owner

@rbandres98 It is no meaning. I’m still working on esp8266 core 3.0.0 and not sure why you used the v123 branch. It's an internal release.

@andresruizdev
Copy link

andresruizdev commented Jun 25, 2021

@rbandres98 It is no meaning. I’m still working on esp8266 core 3.0.0 and not sure why you used the v123 branch. It's an internal release.

@Hieromon when I tested the library, I used different versions of AutoConnect and PageBuilder but my ESP8266 (Lolin WEMOS D1 R1) do not show portal content in some paths. For example, the Information Page ("/_ac") cannot be reached and device show this content instead. Is by this reason that I'm using internal release.

I don't know if I was wrong in any procecss, I will try again with release version.

@cassc
Copy link

cassc commented Aug 17, 2021

Similar problem here, had to use older version of ESP8266 core in platformio.ini

platform = [email protected]

@Hieromon Hieromon mentioned this issue Sep 30, 2021
@Hieromon Hieromon unpinned this issue Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants