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

wifimanager issues #7

Closed
2114L3 opened this issue Feb 18, 2020 · 6 comments
Closed

wifimanager issues #7

2114L3 opened this issue Feb 18, 2020 · 6 comments

Comments

@2114L3
Copy link

2114L3 commented Feb 18, 2020

issue with wifimanager HTTP_HEAD rename in 0.14
changing line 25 in platformio.ini from WifiManager@~0.14 to WifiManager@~0.15 resolves the compile issue, but get exception looping on reset after wifimanager is setup.

@rpanfili
Copy link
Owner

Hi 2114L3, WifiManager version for this (stale) project was fixed. Just checked out and it compiles fine with 0.14 and a later version is not required.

The issue that you linked is related to a naming refactor on that specific dependency that is unrelated with this project usages.

If you need further support please report your pio run compile output and any other debug that could help.

@2114L3
Copy link
Author

2114L3 commented Feb 19, 2020

i'm compiling with docker using https://github.com/suculent/platformio-docker-build

0.14 errors with.

.pio/libdeps/nodemcuv2/[email protected]/WiFiManager.h:25:24: error: 'const char HTTP_HEAD []' redeclared as different kind of symbol
 const char HTTP_HEAD[] PROGMEM            = "<!DOCTYPE html><html lang=\"en\"><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1, user-scalable=no\"/><title>{v}</title>";
                        ^
In file included from .pio/libdeps/nodemcuv2/[email protected]/WiFiManager.h:17:0,
                 from src/main.cpp:5:
/root/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer.h:33:39: error: previous declaration of 'HTTPMethod HTTP_HEAD'
 enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };

this is tzapu/WiFiManager#927
which lead to the refactor in 0.15 to remove the conflict
renaming manually allows compiling to succeed, but as you dont have issues with 0.14 then the issue may be in my build environment. perhaps my toolchain it too recent

@2114L3 2114L3 closed this as completed Feb 19, 2020
@rpanfili
Copy link
Owner

Hi @2114L3, just tried the docker container you linked. Except for the fact that the latest build of that still links to an old (buggy) release (https://hub.docker.com/r/suculent/platformio-docker-build/tags) if you checkout the master version the main issue I think it's related to its hardcoded framework-arduinoespressif8266 dependency, installed during the dockerbuild.
As you can see into the compile output the error comes from that:

In file included from .pio/libdeps/nodemcuv2/WifiManager_ID567/WiFiManager.h:17:0,
                 from src/main.cpp:5:
/root/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src/ESP8266WebServer.h:33:39: error: previous declaration of 'HTTPMethod HTTP_HEAD'
 enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
                                       ^

I attached into the latest build container (that as you can see avoids that part), replaced the cmd.sh with the latest one on the repo, fixed the dir pathname around line
https://github.com/suculent/platformio-docker-build/blob/master/cmd.sh#L79-L85
and compiled without any issues with this repo code, without upgrading anything.

@rpanfili
Copy link
Owner

Hi again @2114L3, I spent a couple of minutes to test dependencies and build routines and I just fixed them. Now it works even on the (most recent) master build of suculent/platformio-docker-build container.

Just to avoid additional issues I also configured TravisCI to build the code and upload it on github as a binary release: https://github.com/rpanfili/airQualityMeter/releases/tag/v1.1.1

Enjoy :)

@2114L3
Copy link
Author

2114L3 commented Feb 29, 2020

awesome
yeh i did log an issue with suculent/platformio-docker-build re the latest tags. looks like they have updated this the following day for your tests above.

i will update and try again. thanks!

@2114L3
Copy link
Author

2114L3 commented Mar 1, 2020

tested all good, cheers

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

2 participants