[GH-ISSUE #1493] error: 'base64' has not been declared #1273

Closed
opened 2026-02-28 01:29:22 +03:00 by kerem · 5 comments
Owner

Originally created by @LouisLee985 on GitHub (Sep 14, 2022).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1493

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

Originally created by @LouisLee985 on GitHub (Sep 14, 2022). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1493 ### 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 ```
kerem 2026-02-28 01:29:22 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@tablatronix commented on GitHub (Sep 14, 2022):

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

<!-- gh-comment-id:1246737038 --> @tablatronix commented on GitHub (Sep 14, 2022): 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
Author
Owner

@LouisLee985 commented on GitHub (Sep 15, 2022):

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.

<!-- gh-comment-id:1247531351 --> @LouisLee985 commented on GitHub (Sep 15, 2022): 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.
Author
Owner

@tablatronix commented on GitHub (Sep 15, 2022):

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

<!-- gh-comment-id:1248013188 --> @tablatronix commented on GitHub (Sep 15, 2022): Yeah thats odd, or maybe you have duplicate library for webserver that is old, or need to wipe esp8266 platform
Author
Owner
<!-- gh-comment-id:1300360853 --> @LouisLee985 commented on GitHub (Nov 2, 2022): It's fixed: https://github.com/Mixiaoxiao/Arduino-HomeKit-ESP8266/pull/183/commits/ae4780e05cc1faa424baf9beb4aa96a0d181f896 Thanks.
Author
Owner

@tablatronix commented on GitHub (Nov 2, 2022):

cool, so its a naming conflict

<!-- gh-comment-id:1301417954 --> @tablatronix commented on GitHub (Nov 2, 2022): cool, so its a naming conflict
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#1273
No description provided.