Core Electronics Forum

Not able to connect with firebase and nodemcu ESP8266

I was trying to send the data to the firebase also I have changed the fingerprint also then also I am getting this error can anyone help me to solve this error

Arduino: 1.8.15 (Windows 10), Board: “Generic ESP8266 Module, 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, dtr (aka nodemcu), 26 MHz, 40MHz, DOUT (compatible), 1MB (FS:64KB OTA:~470KB), 2, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Disabled, None, Only Sketch, 115200”

C:\Users\HP\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseHttpClient_Esp8266.cpp: In member function ‘virtual void FirebaseHttpClientEsp8266::begin(const string&)’:

C:\Users\HP\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseHttpClient_Esp8266.cpp:27:50: error: no matching function for call to ‘begin(const char*, const char [60])’

27 | http_.begin(url.c_str(), kFirebaseFingerprint);

  |                                                  ^

In file included from C:\Users\HP\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseHttpClient_Esp8266.cpp:9:

C:\Users\HP\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\libraries\ESP8266HTTPClient\src/ESP8266HTTPClient.h:166:10: note: candidate: ‘bool HTTPClient::begin(String, uint16_t, String)’ (near match)

166 | bool begin(String host, uint16_t port, String uri = “/”) attribute ((error(“obsolete API, use ::begin(WiFiClient, host, port, uri)”)));

  |          ^~~~~

C:\Users\HP\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\libraries\ESP8266HTTPClient\src/ESP8266HTTPClient.h:166:10: note: conversion of argument 2 would be ill-formed:

C:\Users\HP\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseHttpClient_Esp8266.cpp:27:30: error: invalid conversion from ‘const char*’ to ‘uint16_t’ {aka ‘short unsigned int’} [-fpermissive]

27 | http_.begin(url.c_str(), kFirebaseFingerprint);

  |                              ^~~~~~~~~~~~~~~~~~~~

  |                              |

  |                              const char*

In file included from C:\Users\HP\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseHttpClient_Esp8266.cpp:9:

C:\Users\HP\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\libraries\ESP8266HTTPClient\src/ESP8266HTTPClient.h:167:10: note: candidate: ‘bool HTTPClient::begin(String, const uint8_t*)’ (near match)

167 | bool begin(String url, const uint8_t httpsFingerprint[20]) attribute ((error(“obsolete API, use ::begin(WiFiClientSecure, …)”)));

  |          ^~~~~

C:\Users\HP\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\libraries\ESP8266HTTPClient\src/ESP8266HTTPClient.h:167:10: note: conversion of argument 2 would be ill-formed:

C:\Users\HP\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseHttpClient_Esp8266.cpp:27:30: error: invalid conversion from ‘const char*’ to ‘const uint8_t*’ {aka ‘const unsigned char*’} [-fpermissive]

27 | http_.begin(url.c_str(), kFirebaseFingerprint);

  |                              ^~~~~~~~~~~~~~~~~~~~

  |                              |

  |                              const char*

C:\Users\HP\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseHttpClient_Esp8266.cpp: In member function ‘virtual void FirebaseHttpClientEsp8266::begin(const string&, const string&)’:

C:\Users\HP\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseHttpClient_Esp8266.cpp:31:60: error: invalid conversion from ‘const char*’ to ‘const uint8_t*’ {aka ‘const unsigned char*’} [-fpermissive]

31 | http_.begin(host.c_str(), kFirebasePort, path.c_str(), kFirebaseFingerprint);

  |                                                            ^~~~~~~~~~~~~~~~~~~~

  |                                                            |

  |                                                            const char*

In file included from C:\Users\HP\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseHttpClient_Esp8266.cpp:9:

C:\Users\HP\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.0\libraries\ESP8266HTTPClient\src/ESP8266HTTPClient.h:168:70: note: initializing argument 4 of ‘bool HTTPClient::begin(String, uint16_t, String, const uint8_t*)’

168 | bool begin(String host, uint16_t port, String uri, const uint8_t httpsFingerprint[20]) attribute ((error(“obsolete API, use ::begin(WiFiClientSecure, …)”)));

  |                                                        ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~

exit status 1

Error compiling for board Generic ESP8266 Module.

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

An error in a library file tells you that the library file is loading the wrong header. For instance, the code in FirebaseHttpClient_Esp8266.cpp at line 27 is looking for a function in header file ESP8266HTTPClient.h (referenced at line 9 of the code) but that header file does not include a matching function (although there is one that is similar). The mismatch is in the type or the number of the function arguments. That suggests that the two files are from different versions of the library. However it is also possible that the two files are from different libraries, given the amount of duplication of these libraries. Your other errors appear to be similar. If this is your only firebase application the best course is to delete all references to firebase from the the libraries, and reinstall them from the source. If you have other application that might depend on currently installed libraries then you could reinstall this library as a local library within the application folder.

2 Likes

Hye bro, Have you resolved this error?