B4R Question rESP8266OTA multiple lib versions setup

peacemaker

Expert
Licensed User
Longtime User
HI, All

It was long ago when i compiled this my B4R project. Now i need to clone it for a new one.
And found there is compilation error. I see that some trouble with rESP8266OTA lib version:

B4X:
B4R Version: 3.90
Parsing code.    (0.04s)
Building folders structure.    (0.01s)
Compiling code.    (0.07s)
Building project    (0.03s)
Compiling & deploying Ino project (NodeMCU 1.0 (ESP-12E Module) - COM9)    Error
Loading configuration...
Initializing packages...
DEBUG StatusLogger Using ShutdownCallbackRegistry class org.apache.logging.log4j.core.util.DefaultShutdownCallbackRegistry
DEBUG StatusLogger Not in a ServletContext environment, thus not loading WebLookup plugin.
DEBUG StatusLogger AsyncLogger.ThreadNameStrategy=UNCACHED (user specified null, default is UNCACHED)
........
.......
DEBUG StatusLogger LoggerContext[name=1e6f5c3, org.apache.logging.log4j.core.LoggerContext@15b0b49] started OK.
Preparing boards...
2021-08-17T06:01:38.587Z INFO c.a.u.n.HttpConnectionManager:153 [cc.arduino.packages.discoverers.serial.SerialDiscovery] Connect to https://builder.arduino.cc/builder/v1/boards/0x1A86/0x7523, method=GET, request id=E36A3FDEAE4540CB
Verifying...
2021-08-17T06:01:39.823Z INFO c.a.u.n.HttpConnectionManager:157 [cc.arduino.packages.discoverers.serial.SerialDiscovery] Request complete URL="https://builder.arduino.cc/builder/v1/boards/0x1A86/0x7523", method=GET, response code=404, request id=E36A3FDEAE4540CB, headers={null=[HTTP/1.1 404 Not Found], Cache-Control=[no-cache, no-store, must-revalidate], Server=[nginx], Connection=[keep-alive], Vary=[Origin], Pragma=[no-cache], Expires=[0], Content-Length=[0], Date=[Tue, 17 Aug 2021 06:01:39 GMT]}
2021-08-17T06:01:39.824Z WARN p.a.h.BoardCloudResolver:64 [cc.arduino.packages.discoverers.serial.SerialDiscovery] Fail to get the Vid Pid information from the builder response code=404
P:\GoogleDrive\Shell\Shell-Maslo\Soft\ESP8266\Objects\src\rESP8266OTA.cpp: In member function 'B4R::B4RString* B4R::B4RESP8266OTA::HTTPUpdate(B4R::B4RString*, bool)':
rESP8266OTA.cpp:15:66: error: no matching function for call to 'ESP8266HTTPUpdate::update(const char*&)'
   15 |       t_httpUpdate_return ret = ESPhttpUpdate.update(server->data);
      |                                                                  ^
In file included from P:\GoogleDrive\Shell\Shell-Maslo\Soft\ESP8266\Objects\src\rESP8266OTA.h:3,
                 from P:\GoogleDrive\Shell\Shell-Maslo\Soft\ESP8266\Objects\src\B4RDefines.h:32,
                 from P:\GoogleDrive\Shell\Shell-Maslo\Soft\ESP8266\Objects\src\rESP8266OTA.cpp:1:
C:\Users\VLAD-HP\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\libraries\ESP8266httpUpdate\src/ESP8266httpUpdate.h:128:25: note: candidate: 't_httpUpdate_return ESP8266HTTPUpdate::update(WiFiClient&, const String&, const String&)'
  128 |     t_httpUpdate_return update(WiFiClient& client, const String& url, const String& currentVersion = "");
      |                         ^~~~~~
C:\Users\VLAD-HP\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\libraries\ESP8266httpUpdate\src/ESP8266httpUpdate.h:128:25: note:   candidate expects 3 arguments, 1 provided
In file included from P:\GoogleDrive\Shell\Shell-Maslo\Soft\ESP8266\Objects\src\rESP8266OTA.h:3,
                 from P:\GoogleDrive\Shell\Shell-Maslo\Soft\ESP8266\Objects\src\B4RDefines.h:32,
                 from P:\GoogleDrive\Shell\Shell-Maslo\Soft\ESP8266\Objects\src\rESP8266OTA.cpp:1:
C:\Users\VLAD-HP\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\libraries\ESP8266httpUpdate\src/ESP8266httpUpdate.h:142:25: note: candidate: 't_httpUpdate_return ESP8266HTTPUpdate::update(WiFiClient&, const String&, uint16_t, const String&, const String&)'
  142 |     t_httpUpdate_return update(WiFiClient& client, const String& host, uint16_t port, const String& uri = "/",
      |                         ^~~~~~
C:\Users\VLAD-HP\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\libraries\ESP8266httpUpdate\src/ESP8266httpUpdate.h:142:25: note:   candidate expects 5 arguments, 1 provided
P:\GoogleDrive\Shell\Shell-Maslo\Soft\ESP8266\Objects\src\rESP8266OTA.cpp: In member function 'B4R::B4RString* B4R::B4RESP8266OTA::HTTPUpdate2(B4R::B4RString*, int, B4R::B4RString*, bool)':
rESP8266OTA.cpp:30:88: error: no matching function for call to 'ESP8266HTTPUpdate::update(const char*&, int&, const char*&)'
   30 |       t_httpUpdate_return ret = ESPhttpUpdate.update(server->data, port, filename->data);
      |                                                                                        ^
In file included from P:\GoogleDrive\Shell\Shell-Maslo\Soft\ESP8266\Objects\src\rESP8266OTA.h:3,
                 from P:\GoogleDrive\Shell\Shell-Maslo\Soft\ESP8266\Objects\src\B4RDefines.h:32,
                 from P:\GoogleDrive\Shell\Shell-Maslo\Soft\ESP8266\Objects\src\rESP8266OTA.cpp:1:
C:\Users\VLAD-HP\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\libraries\ESP8266httpUpdate\src/ESP8266httpUpdate.h:128:25: note: candidate: 't_httpUpdate_return ESP8266HTTPUpdate::update(WiFiClient&, const String&, const String&)'
  128 |     t_httpUpdate_return update(WiFiClient& client, const String& url, const String& currentVersion = "");
      |                         ^~~~~~
C:\Users\VLAD-HP\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\libraries\ESP8266httpUpdate\src/ESP8266httpUpdate.h:128:44: note:   no known conversion for argument 1 from 'const char*' to 'WiFiClient&'
  128 |     t_httpUpdate_return update(WiFiClient& client, const String& url, const String& currentVersion = "");
      |                                ~~~~~~~~~~~~^~~~~~
In file included from P:\GoogleDrive\Shell\Shell-Maslo\Soft\ESP8266\Objects\src\rESP8266OTA.h:3,
                 from P:\GoogleDrive\Shell\Shell-Maslo\Soft\ESP8266\Objects\src\B4RDefines.h:32,
                 from P:\GoogleDrive\Shell\Shell-Maslo\Soft\ESP8266\Objects\src\rESP8266OTA.cpp:1:
C:\Users\VLAD-HP\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\libraries\ESP8266httpUpdate\src/ESP8266httpUpdate.h:142:25: note: candidate: 't_httpUpdate_return ESP8266HTTPUpdate::update(WiFiClient&, const String&, uint16_t, const String&, const String&)'
  142 |     t_httpUpdate_return update(WiFiClient& client, const String& host, uint16_t port, const String& uri = "/",
      |                         ^~~~~~
C:\Users\VLAD-HP\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\libraries\ESP8266httpUpdate\src/ESP8266httpUpdate.h:142:44: note:   no known conversion for argument 1 from 'const char*' to 'WiFiClient&'
  142 |     t_httpUpdate_return update(WiFiClient& client, const String& host, uint16_t port, const String& uri = "/",
      |                                ~~~~~~~~~~~~^~~~~~
Multiple libraries were found for "ESP8266httpUpdate.h"
Used: C:\Users\VLAD-HP\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\libraries\ESP8266httpUpdate
Not used: C:\Users\VLAD-HP\Documents\Arduino\libraries\ESP8266httpUpdate
exit status 1
DEBUG StatusLogger Stopping LoggerContext[name=1e6f5c3, org.apache.logging.log4j.core.LoggerContext@15b0b49]
DEBUG StatusLogger Stopping LoggerContext[name=1e6f5c3, org.apache.logging.log4j.core.LoggerContext@15b0b49]...
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=1e6f5c3]
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=1e6f5c3,component=StatusLogger]
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=1e6f5c3,component=ContextSelector]
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=1e6f5c3,component=Loggers,name=]
TRACE StatusLogger Unregistering 2 MBeans: [org.apache.logging.log4j2:type=1e6f5c3,component=Appenders,name=RollingFile, org.apache.logging.log4j2:type=1e6f5c3,component=Appenders,name=Console]
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=1e6f5c3,component=AsyncAppenders,name=*'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=1e6f5c3,component=AsyncLoggerRingBuffer'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=1e6f5c3,component=Loggers,name=*,subtype=RingBuffer'
TRACE StatusLogger Stopping XmlConfiguration[location=jar:file:/C:/Program%20Files%20(x86)/Arduino/lib/pde.jar!/log4j2.xml]...
TRACE StatusLogger XmlConfiguration notified 2 ReliabilityStrategies that config will be stopped.
TRACE StatusLogger XmlConfiguration stopping 1 LoggerConfigs.
TRACE StatusLogger XmlConfiguration stopping root LoggerConfig.
TRACE StatusLogger XmlConfiguration notifying ReliabilityStrategies that appenders will be stopped.
TRACE StatusLogger XmlConfiguration stopping remaining Appenders.
DEBUG StatusLogger Shutting down RollingFileManager C:\Users\VLAD-HP\AppData\Local\Arduino15/logs/application.log
DEBUG StatusLogger Shutting down RollingFileManager C:\Users\VLAD-HP\AppData\Local\Arduino15/logs/application.log
DEBUG StatusLogger All asynchronous threads have terminated
DEBUG StatusLogger RollingFileManager shutdown completed with status true
DEBUG StatusLogger Shut down RollingFileManager C:\Users\VLAD-HP\AppData\Local\Arduino15/logs/application.log, all resources released: true
DEBUG StatusLogger Appender RollingFile stopped with status true
DEBUG StatusLogger Shutting down OutputStreamManager SYSTEM_ERR.false.false
DEBUG StatusLogger Shut down OutputStreamManager SYSTEM_ERR.false.false, all resources released: true
DEBUG StatusLogger Appender Console stopped with status true
TRACE StatusLogger XmlConfiguration stopped 2 remaining Appenders.
TRACE StatusLogger XmlConfiguration cleaning Appenders from 2 LoggerConfigs.
DEBUG StatusLogger Stopped XmlConfiguration[location=jar:file:/C:/Program%20Files%20(x86)/Arduino/lib/pde.jar!/log4j2.xml] OK
DEBUG StatusLogger Stopped LoggerContext[name=1e6f5c3, org.apache.logging.log4j.core.LoggerContext@15b0b49] with status true

Addition Board manager URLs in Arduino are:

Long ago it was compiled and working fully OK.
How to resolve such error ?
 
Last edited:

peacemaker

Expert
Licensed User
Longtime User
But Arduino's example "httpUpdate" of 2015 is still working OK with ESP8266...

Who is using the OTA lib, please, try to just compile you project, please, to check.
 
Last edited:
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
I am answering here just not to let this thread unanswered in case someone in the future will have the same problem and will find this thread.

The new rESP8266OTA library can be found here:
 
Upvote 0
Top