WiFiManager icon indicating copy to clipboard operation
WiFiManager copied to clipboard

error: 'base64' has not been declared

Open LouisLee985 opened this issue 1 year ago • 3 comments

Basic Infos

Hardware

WiFimanager Branch/Release: Master

Esp8285

Hardware: ESP-01f

Core Version: 2.4.0, staging

Description

The same code compile in arduino is ok. But in platformio,there error. Thanks.

Settings in IDE

Module: NodeMcu

Debug Messages

In file included from C:\Users\ABC\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WebServer\src/ESP8266WebServer-impl.h:30,
                 from C:\Users\ABC\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WebServer\src/ESP8266WebServer.h:340,
                 from C:\Users\ABC\Documents\Arduino\libraries\WiFiManager\WiFiManager.h:86,
Compiling .pio\build\esp8285\FrameworkArduino\Esp-version.cpp.o
                 from C:\Users\ABC\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:13:
C:\Users\ABC\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WebServer\src/detail/RequestHandlersImpl.h: In member function 'bool esp8266webserver::StaticFileRequestHandler<ServerType>::handle(esp8266webserver::StaticFileRequestHandler<ServerType>::WebServerType&, HTTPMethod, const String&)':
C:\Users\ABC\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WebServer\src/detail/RequestHandlersImpl.h:200:36: error: 'base64' has not been declared
  200 |         const String etag = "\"" + base64::encode(_ETag_md5, 16, false) + "\"";
      |                                    ^~~~~~
In file included from C:\Users\ABC\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WebServer\src/ESP8266WebServer.h:340,
Compiling .pio\build\esp8285\FrameworkArduino\Esp.cpp.o
                 from C:\Users\ABC\Documents\Arduino\libraries\WiFiManager\WiFiManager.h:86,
                 from C:\Users\ABC\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:13:
C:\Users\ABC\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WebServer\src/ESP8266WebServer-impl.h: In member function 'bool esp8266webserver::ESP8266WebServerTemplate<ServerType>::authenticate(const char*, const char*)':
C:\Users\ABC\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WebServer\src/ESP8266WebServer-impl.h:105:24: error: 'base64' has not been declared
Compiling .pio\build\esp8285\FrameworkArduino\FS.cpp.o
  105 |       String encoded = base64::encode((uint8_t *)toencode, toencodeLen, false);
      |                        ^~~~~~
*** [.pio\build\esp8285\lib5ea\WiFiManager\WiFiManager.cpp.o] Error 1

LouisLee985 avatar Sep 14 '22 12:09 LouisLee985

This seems to be a platform bug, or removed for size for the 8285? Either way not sure how I can fix other than to add a workaround. Maybe try to set wm.setScanDispPerc(true); to disable the images

tablatronix avatar Sep 14 '22 13:09 tablatronix

Change board 8285 ESP-01f to nodemcuv2, and add wm.setScanDispPerc(true); The error remains. It seems to be a platform bug like you say. So edit code in PlatformIO IDE and compile it in Arduino IDE. Thanks.

LouisLee985 avatar Sep 15 '22 03:09 LouisLee985

Yeah thats odd, or maybe you have duplicate library for webserver that is old, or need to wipe esp8266 platform

tablatronix avatar Sep 15 '22 12:09 tablatronix

It's fixed: https://github.com/Mixiaoxiao/Arduino-HomeKit-ESP8266/pull/183/commits/ae4780e05cc1faa424baf9beb4aa96a0d181f896 Thanks.

LouisLee985 avatar Nov 02 '22 12:11 LouisLee985

cool, so its a naming conflict

tablatronix avatar Nov 02 '22 22:11 tablatronix