firebase-arduino icon indicating copy to clipboard operation
firebase-arduino copied to clipboard

NodeMcu not getting connected to Firebase and Firebase.error() doesn't return anything

Open MatheshSuresh opened this issue 6 years ago • 9 comments

Here is my code : I can surely say that my Hostkey and Authentication Key are correct. DEBUG Level : SSL/HTTP_CLIENT/HTTP_SERVER Arduino version 1.8.5 ESP8266 version the latest Arduino JSON version 5.2.3 I think but not the beta version It's working perfectly since two months ago but now it's giving me struggle. Please help me to fix it.

// FirebaseDemo_ESP8266 is a sample that demo the different functions // of the FirebaseArduino API.

#include <ESP8266WiFi.h> #include <FirebaseArduino.h>

// Set these to run example. #define FIREBASE_HOST "HOSTKEY" #define FIREBASE_AUTH "AUTH" #define wifi_ssid "E" #define wifi_pass "abcdefghijklmn"

void setup() { Serial.begin(115200); WiFi.begin(wifi_ssid,wifi_pass); Serial.print("Connecting..."); while (WiFi.status() != WL_CONNECTED) { Serial.print(".");
delay(500);
} Serial.println("Connected"); Serial.println(WiFi.localIP()); Firebase.begin(FIREBASE_HOST,FIREBASE_AUTH); Firebase.setInt("LEDStatus",0); pinMode(LED_BUILTIN, OUTPUT); }

int n = 0;

void loop() { if(Firebase.getInt("LEDStatus")){ digitalWrite(LED_BUILTIN, HIGH); } else{ digitalWrite(LED_BUILTIN,LOW); }

if (Firebase.failed()){ Serial.println("Setting Number Failed..."); Serial.println(Firebase.error()); } delay(1000); }

My output is here : Connecting................................... Connected 192.168.4.191 Setting Number Failed...

Setting Number Failed...

Setting Number Failed...

Setting Number Failed...

Thanks In Advance.....

MatheshSuresh avatar Nov 25 '18 01:11 MatheshSuresh

Am I need to install any nodejs or something else for connectivity?

MatheshSuresh avatar Nov 25 '18 01:11 MatheshSuresh

Can I get the current fingerprint of firebase

MatheshSuresh avatar Nov 25 '18 03:11 MatheshSuresh

I have the same trouble. Firebase.error() method returns nothing!

Gizmodo avatar Nov 25 '18 19:11 Gizmodo

Also currently struggling with this issues. Any suggestions for fixes or work arounds?

Catochi avatar Nov 28 '18 12:11 Catochi

@MatheshSuresh @Gizmodo @CarlvinT try this https://github.com/Chriton/Firebase-Arduino/tree/master/Arduino%20Project -> read the Troubleshooting section or https://github.com/FirebaseExtended/firebase-arduino/issues/380

Chriton avatar Nov 28 '18 12:11 Chriton

@MatheshSuresh @Gizmodo @CarlvinT try this https://github.com/Chriton/Firebase-Arduino/tree/master/Arduino%20Project -> read the Troubleshooting section or #380

No, It's not about loosing connection. We want to see error description: Firebase.setFloat("Temperature_1", temp1); if (Firebase.failed()) { Serial.println(Firebase.error()); } But serial monitor just print blank line. Firebase.error() method returns nothing! Even if yout try to change FirebaseArduino.cpp method error(), for example from this const String& FirebaseArduino::error() { return error_.message().c_str(); } to this const String& FirebaseArduino::error() { return "DEMO_ERROR"; } you still will not see message DEMO_ERROR in serial monitor.

Gizmodo avatar Nov 28 '18 18:11 Gizmodo

@MatheshSuresh @Gizmodo @CarlvinT try this https://github.com/Chriton/Firebase-Arduino/tree/master/Arduino%20Project -> read the Troubleshooting section or #380

This solution is currently working, Ty.

Catochi avatar Nov 30 '18 14:11 Catochi

looked at the fingerprint and it matches the one generated on https://www.grc.com/fingerprints.htm, but I still get 'setting /number failed:' and firebase.error() returns nothing when running the demo program. anyone know why?

Rich-Z avatar Jan 21 '19 00:01 Rich-Z

I am also facing the same error.

JeniferMarshall avatar Nov 17 '21 16:11 JeniferMarshall