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

[HTTP HEAD] problem #17

Open
Cyb3rn0id opened this issue Sep 8, 2018 · 23 comments
Open

[HTTP HEAD] problem #17

Cyb3rn0id opened this issue Sep 8, 2018 · 23 comments

Comments

@Cyb3rn0id
Copy link

Give me this error:

In file included from C:\Users\Gianni\Documents\Arduino\libraries\WiFiManager-ESP32\examples\AutoConnect\AutoConnect.ino:14:0:

C:\Users\Gianni\Documents\Arduino\libraries\WiFiManager-ESP32/WiFiManager.h:36:22: error: 'const char HTTP_HEAD []' redeclared as different kind of symbol

const char HTTP_HEAD[] PROGMEM = "<html lang="en"><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/><title>{v}</title>";

                  ^

In file included from C:\Users\Gianni\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0\libraries\WebServer\src/WebServer.h:30:0,

             from C:\Users\Gianni\Documents\Arduino\libraries\WiFiManager-ESP32\examples\AutoConnect\AutoConnect.ino:12:

C:\Users\Gianni\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0\libraries\WebServer\src/HTTP_Method.h:10:3: note: previous declaration 'HTTPMethod HTTP_HEAD'

HTTP_HEAD = 0b00100000,

^

@Garito
Copy link

Garito commented Sep 13, 2018

Hi!
Same problem here
Anyone taking care of this?
Thanks

@Juliothurler
Copy link

I am with the same issue, Could someone help us.

@Juliothurler
Copy link

I think nobody os taking Care about this.

@Garito
Copy link

Garito commented Sep 15, 2018

There is an async version of this manager without the issues here (I'm already using it)
https://github.com/alanswx/ESPAsyncWiFiManager

@Juliothurler
Copy link

Juliothurler commented Sep 15, 2018 via email

@hellocaio
Copy link

I'm having the same issue here.

@Garito, I just tried your suggestion but the author of WiFiAsyncManager says to add "<WiFiManager.h>", which is this library. I don't get it.

@Garito
Copy link

Garito commented Sep 17, 2018

The guy copied the project and make the modifications but not updated the readme and so
Check the examples
If implemented even the websocket server using them

@bobermen1
Copy link

bobermen1 commented Oct 3, 2018

I was having this issue with the examples as well.
To fix it I replaced

#if defined(ESP8266)
#include <ESP8266WiFi.h>          //https://github.com/esp8266/Arduino
#else
#include <WiFi.h>          //https://github.com/esp8266/Arduino
#endif

//needed for library
#include <DNSServer.h>
#if defined(ESP8266)
#include <ESP8266WebServer.h>
#else
#include <WebServer.h>
#endif
#include <WiFiManager.h>         //https://github.com/tzapu/WiFiManager

With

#include <WiFi.h>
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h>

@hellocaio
Copy link

@bobermen1, are you using ESP32 or ESP8266?

I attempted replacing all HTTP_HEAD with HTTP_HEADER and it compiles and uploads it but I couldn't get the library to work. I tried this with the AutoConnect example that comes with the library. This sucks.

@kotran88
Copy link

kotran88 commented Oct 9, 2018

I tried all the things above, but didn't work any.
I replace it to
#include <WiFi.h>
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h>

but said ESP8266WebServer.h: No such file or directory

@hellocaio
Copy link

Yeh @kotran88, same here. If you have selected the board ESP32, the compiler won't fetch the packages for ESP8266 and vice-versa. Different libraries for different cores. There seems to be a conflict with the variable name HTTP_HEAD and WebServer library.

@hellocaio
Copy link

Hey guys, I just got the async version working! Yes! I will be running further tests soon, but I can tell you that it works with ESP32 and its latest core library. One major issue was my USB cable. My cable is faulty even though it seemed to work just fine (it has communication and power), and after getting a better cable the async wifi manager worked.

With that said, maybe this library (synced version) does work after replacing all the HTTP_HEAD with a different name like I had tried. All along it was this piece of shit cable that I actually bought recently. These shit cables from China, I tell you...

@hellocaio
Copy link

hellocaio commented Oct 10, 2018

To be a little more specific (for the people from the future with similar problem to find), this was "Brownout detector was triggered" flag thrown in the serial monitor. So if you have this problem, try a better cable. It seems to be a common problem when using the WiFi module of the ESP32. If you don't use the WiFi module, things seem peachy.

Long story long, initially I thought it was a grounding problem with my USB port on my computer, then I thought maybe it was the cable so I went out and bought a new one... which threw me off because the problem wasn't solved and it was a new cable... Also, when I powered the board with a battery bank, everything worked fine except the WiFi. In the end, after reading a bunch of forums and brainstorming I went out and got a better cable, problem solved.

@lacneto
Copy link

lacneto commented Nov 4, 2018

I was having the same HTTP_HEAD problem and the solution was simpler than it looked. I just edited the WiFiManager.h files and WifiManager.cpp replacing (HTTP_HEAD) with (HTTP_HEADER) and there was no more compilation problem.

@mineirinRV
Copy link

mineirinRV commented Dec 3, 2018

I had the same problem,
so I located the file "HTTP_Method.h"
in the "C: \ Arduino \ hardware \ espressif \ esp32 \ libraries \ WebServer \ src" folder, modified
line 10 HTTP_HEAD = 0b00100000, --> HTTP_HEADER = 0b00100000,
and everything worked correctly.
MineirinRV

@shootdaj
Copy link

shootdaj commented Jan 10, 2019

A better solution imo is to rename the constant in WifiManager.h:

HTML_HEAD -> HTTP_HEAD_HTML

and then rename all the references in WifiManager.cpp:

HTML_HEAD -> HTTP_HEAD_HTML

I verified that this works. This way you are not breaking WebServer if it references that constant anywhere (or any other libs that depend on it)

@TheBrunez
Copy link

There is a pull request pending for this problem. I've created a fork and solved this issue, you can find it here Brunez3BD/WifiManager

@FRG7854
Copy link

FRG7854 commented Apr 5, 2019

Brunez3BD,
Thank you very much.
I found my WiFiManager files, opened it with Wordpad, replaced with your program and everything is fine.
Thank you again.

@dalwinder1578singh
Copy link

i am facing problem with esp32 , it was running very good uploading debugging, all of sudden warning came no more support esp board, i have tried all out, re installing ide, reinstalling ,packages,now every thing looks ok board is read on screen , up load ok data verified no error message, but application does not start, can any one give cue what is going one i have 4 esp board all of them same result. thanks in advance.

@jotadepicas
Copy link

@shootdaj thanks for the workaround, it worked for me. However, could there be a typo in your message? I think it's not:

HTML_HEAD -> HTTP_HEAD_HTML

but actually:

HTTP_HEAD -> HTTP_HEAD_HTML.

@israeloriente
Copy link

I was having this issue with the examples as well.
To fix it I replaced

#if defined(ESP8266)
#include <ESP8266WiFi.h>          //https://github.com/esp8266/Arduino
#else
#include <WiFi.h>          //https://github.com/esp8266/Arduino
#endif

//needed for library
#include <DNSServer.h>
#if defined(ESP8266)
#include <ESP8266WebServer.h>
#else
#include <WebServer.h>
#endif
#include <WiFiManager.h>         //https://github.com/tzapu/WiFiManager

With

#include <WiFi.h>
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h>

This fixed for me using LilyGo-T-Call-SIM800L.

@ramante
Copy link

ramante commented Jul 29, 2020

There is an async version of this manager without the issues here (I'm already using it)
https://github.com/alanswx/ESPAsyncWiFiManager

Hi Garito, thank you so much for the solution, works 100% to me.
Regards,
Rogerio

@Andrisetianabrata
Copy link

A better solution imo is to rename the constant in WifiManager.h:

HTML_HEAD -> HTTP_HEAD_HTML

and then rename all the references in WifiManager.cpp:

HTML_HEAD -> HTTP_HEAD_HTML

I verified that this works. This way you are not breaking WebServer if it references that constant anywhere (or any other libs that depend on it)

Thanks mate thats work as well 👍👍❤️

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