Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Setting/number failed #315

Closed
ArunN21 opened this issue Feb 19, 2018 · 44 comments
Closed

Setting/number failed #315

ArunN21 opened this issue Feb 19, 2018 · 44 comments
Labels

Comments

@ArunN21
Copy link

ArunN21 commented Feb 19, 2018

Unable to connect to firebase ,please help ,urgent

For Firebase_demo code

@mrunmaydarpan
Copy link

same thing happening with my nodemcu also

@vvinu9876
Copy link

even i have the sane problem...

@valdiney
Copy link

I´m with the same problem and i don´t know what i should do to solve!

@opit7
Copy link

opit7 commented Mar 11, 2018

You need to use the newest headerfiles. You can download the repo as a zip and inlcude the neccesary files by hand. This is not an elegant solution, but it works.

@heriveltogabriel
Copy link

I'm having the same problem, I downloaded it again, updated but it does not work.
Someone?

@valdiney
Copy link

I downloaded it again too, but not work.

@heriveltogabriel
Copy link

Guys, I've been able to solve my problem.
I removed the bar "/" from the end of the url

Ex:
#define FIREBASE_HOST "test.firebaseio.com"

That's Work!!!

@valdiney
Copy link

valdiney commented Mar 14, 2018

I removed the second parameter of the method Firebase.begin(FIREBASE_HOST); I passed the firebase host only and work to me!!

@axelsilvaferreira
Copy link

Hi, I had the same problem. I was using the wrong token. Apparently you have to go to Firebase "Settings" > "Service Accounts" tab > under Legacy Credentials click "Database Secrets" > select your firebase project anda click "Show".
The following video shows how to get the token.
youtube

@valdiney
Copy link

Thanks bro. I will watch your video! In my case I removed the key.

@axelsilvaferreira
Copy link

It’s not my video, but I hope it will help. :)

@proppy
Copy link
Contributor

proppy commented Jun 15, 2018

Thanks for figuring that out!

@youtechnoid
Copy link

maybe it will help https://youtu.be/VrBPvXSxYAI

@ArsamHashmi
Copy link

After the strive of whole day long, at last I reached to solution that the file "FirebaseHttpClient.h" had a problem.
(C:\Users\XXXXX\Documents\Arduino\libraries\firebase-arduino-master\src )

Just change the fingerprint in "static const char kFirebaseFingerprint[]" to another one [without : ] . You can find one for yours here"https://www.grc.com/fingerprints.htm". Just scroll down and put your firebase host (ie. https://xxxxxxx.firebaseio.com/) here.

found same kinda problem here "#236"

@adamrabbani
Copy link

@ArsamHashmi I think fingerprint not change from 1 year ago.. because i use old libary 1 year ago..
recently i check still remain the same

@ArsamHashmi
Copy link

@adamrabbani I'm new to this stuff so please correct me if I'm wrong. I tried it on old library today. It refused to work on the fingerprint found in the firebase console idk why but it worked like a charm when i used the upper link to find fingerprint.
A little bird told me that it's only compatible with version 1.6.9 of arduino ide. Not sure about this one

@adamrabbani
Copy link

@ArsamHashmi
i use the newest arduino IDE 1.85.
i think library you using is old libary but old fingerprint..
so when you change old fingerprint to new fingerprint.. so working perfectly..
btw, what version library are you using ?

use this library for while.. https://github.com./RaemondBW/firebase-arduino.
this old library but the newest fingerprint so work smoothly..
*but function like "stream" doesnt work

@adamrabbani
Copy link

@ArsamHashmi just now firebase fingerprint has changed..

6F D0 9A 52 C0 E9 E4 CD A0 D3 02 A4 B7 A1 92 38 2D CA 2F 26

@ArsamHashmi
Copy link

@adamrabbani yesterday I came across the same thing. I'm 100% sure that this tweak can solve the problem. Thanks for updating

@proppy
Copy link
Contributor

proppy commented Aug 3, 2018

Fingerprint updated with #368

@mesut25
Copy link

mesut25 commented Sep 23, 2018

Bütün gün süren gayretten sonra, en sonunda "FirebaseHttpClient.h" dosyasının bir problemi olduğu sonucuna vardım.
(C: \ Users \ XXXXX \ Documents \ Arduino \ kitaplıklar \ firebase-arduino-master \ src)

Sadece parmak izini "statik const char kFirebaseFingerprint []" dosyasında başka bir [:] olmadan değiştirin. Burada sizin için bir tane bulabilirsiniz " https://www.grc.com/fingerprints.htm ". Sadece aşağı kaydırın ve firebase sunucunuzu buraya yerleştirin (ör. Https://xxxxxxx.firebaseio.com/ ).

Burada aynı sorun bulundu " # 236 "
sorguma sonucu
AN ERROR OCCURRED

@Vlequns
Copy link

Vlequns commented Oct 27, 2018

That's worked for us, thanks a lot.

@leozhoushu
Copy link

I tried everything you guys mentioned above (check the fingerprint, switch to the old library but with the new fingerprint, delete key), but none of them work for me.... omg, what can I do now, pls help...

@rexoravbiere
Copy link

@leozhoushu please am facing the same problem here, i have changed the fingerprint, tried removing the secrete-key, tried old library, but non of these solution work for me, please if you find solution do let me know, thanks

@khoiwalvikram2
Copy link

Just upload your sketch and you getting Setting/number failed and then press reset button on your esp8266 nodemcu than its been working great for you. it is worked for me

@rexoravbiere
Copy link

@khoiwalvikram2 thank you and all for your help, now working!, my problem was actually from the host url (was https://iothome-xxxxx.firebaseio.com/ instead of iothome-xxxxx.firebaseio.com )

@stackblogger
Copy link

Its fixed!!!

go to C:/Users/{username}/My Documents/Arduino/libraries/firebase-arduino-master/src

open FirebaseHttpClient.h file, and paste following fingerprint =>

6F D0 9A 52 C0 E9 E4 CD A0 D3 02 A4 B7 A1 92 38 2D CA 2F 26

Now build and upload the sketch to NodeMCU using Arduino IDE

@joy2012bd
Copy link

I am facing same problem.Setting / number failed:
Please help.

@Mayoogh
Copy link

Mayoogh commented Mar 21, 2019

@joy2012bd Updated fingerprints ?

@joy2012bd
Copy link

@joy2012bd Updated fingerprints ?

Yeah.The problem is solved.But another issue with get value. Firebase.getString("S2").toInt(); always return 0. Any suggestion? What is the perfect way to get value of a key? Is .Firebase.getFloat() enough to get all types value?

@Mayoogh
Copy link

Mayoogh commented Mar 21, 2019

@joy2012bd I too had similar issue. Try this 2 methods

  1. Delete the location S1 from firebase.
    In void setup() add Firebase.set("S1", 0);

  2. Inside void loop
    int S1_value = firebase.getInt("S1");

Let me know if it fix the issue.

@joy2012bd
Copy link

joy2012bd commented Mar 21, 2019

@joy2012bd I too had similar issue. Try this 2 methods

  1. Delete the location S1 from firebase.
    In void setup() add Firebase.set("S1", 0);
  2. Inside void loop
    int S1_value = firebase.getInt("S1");

Let me know if it fix the issue.

Thank you so much.It worked for me.But another issue.After running few seconds it returns error in Serial monitor Trying to reconnect setting number failed: And it does not stop until the reset switch is pressed.

I am using the code below.

#include <ESP8266WiFi.h>
#include<FirebaseArduino.h>
#define FIREBASE_HOST "***"                     //Your Firebase Project URL goes here without "http:" , "\" and "/"
#define FIREBASE_AUTH "***"       //Your Firebase Database Secret goes here
#define WIFI_SSID "***"             //your WiFi SSID for which yout NodeMCU connects
#define WIFI_PASSWORD "***"        //Password of your wifi network 

void setup() 
{
  Serial.begin(115200);                                                   // Select the same baud rate if you want to see the datas on Serial Monitor
  WiFi.begin(WIFI_SSID,WIFI_PASSWORD);
  Serial.print("connecting");
  while (WiFi.status()!=WL_CONNECTED){
    Serial.print(".");
    delay(500);
  }
  Serial.println();
  Serial.print("connected:");
  Serial.println(WiFi.localIP());

  Firebase.begin(FIREBASE_HOST,FIREBASE_AUTH);
  Firebase.set("loads/switch1",1);
}
void firebasereconnect(){
  Serial.println("Trying to reconnect");
    Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
}

void loop(){
  if (Firebase.failed()){
      Serial.print("setting number failed:");
      Serial.println(Firebase.error());
      firebasereconnect();
      return;
  }

  int S1_value = Firebase.getInt("loads/switch1");
  Serial.println(S1_value);
}

Any suggestion will be highly appreciated.Thank you.

@Mayoogh
Copy link

Mayoogh commented Mar 22, 2019

@joy2012bd I too had similar issue. Try this 2 methods

  1. Delete the location S1 from firebase.
    In void setup() add Firebase.set("S1", 0);
  2. Inside void loop
    int S1_value = firebase.getInt("S1");

Let me know if it fix the issue.

Thank you so much.It worked for me.But another issue.After running few seconds it returns error in Serial monitor Trying to reconnect setting number failed: And it does not stop until the reset switch is pressed.

I am using the code below.

#include <ESP8266WiFi.h>
#include<FirebaseArduino.h>
#define FIREBASE_HOST "***"                     //Your Firebase Project URL goes here without "http:" , "\" and "/"
#define FIREBASE_AUTH "***"       //Your Firebase Database Secret goes here
#define WIFI_SSID "***"             //your WiFi SSID for which yout NodeMCU connects
#define WIFI_PASSWORD "***"        //Password of your wifi network 

void setup() 
{
  Serial.begin(115200);                                                   // Select the same baud rate if you want to see the datas on Serial Monitor
  WiFi.begin(WIFI_SSID,WIFI_PASSWORD);
  Serial.print("connecting");
  while (WiFi.status()!=WL_CONNECTED){
    Serial.print(".");
    delay(500);
  }
  Serial.println();
  Serial.print("connected:");
  Serial.println(WiFi.localIP());

  Firebase.begin(FIREBASE_HOST,FIREBASE_AUTH);
  Firebase.set("loads/switch1",1);
}
void firebasereconnect(){
  Serial.println("Trying to reconnect");
    Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
}

void loop(){
  if (Firebase.failed()){
      Serial.print("setting number failed:");
      Serial.println(Firebase.error());
      firebasereconnect();
      return;
  }

  int S1_value = Firebase.getInt("loads/switch1");
  Serial.println(S1_value);
}

Any suggestion will be highly appreciated.Thank you.

Not sure about it. Try without firebasereconnect()
you can refer to this code

@kunjirparth7
Copy link

kunjirparth7 commented May 6, 2019

Abort called

stack>>>

ctx: cont
sp: 3ffffd50 end: 3fffffc0 offset: 01b0
3fffff00: 3ffe863a 00000028 3ffeedd0 40204693
3fffff10: 3fff6f3c 00000000 3fffff50 402075e0
3fffff20: 3fffff50 3ffeedd0 3fffff50 40207616
3fffff30: 3ffe863a 3ffeedd0 3ffeee6c 3ffeeef0
3fffff40: 00000001 3ffeedd0 3ffeee6c 4020287f
3fffff50: 3fff2c0c 0000002f 00000028 3fff3234
3fffff60: 0000001f 00000019 00000000 402070f0
3fffff70: 3fffdad0 3ffeedd0 3ffeee6c 402028fa
3fffff80: 00000000 00000000 00000000 00000000
3fffff90: 00000000 00000000 00000001 4020810d
3fffffa0: 3fffdad0 00000000 3ffeeec0 40208198
3fffffb0: feefeffe feefeffe 3ffe8590 401008b5
<<<stack<<<

last failed alloc call: 40212604(16)

ets Jan 8 2013,rst cause:2, boot mode:(3,0)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v951aeffa
~ld
connecting.....
connected:192.168.43.48
this is the error on serial monitor not connecting with firebase pls help me out . i am using nodemcu esp8266

@naitiksoni92
Copy link

After the strive of whole day long, at last I reached to solution that the file "FirebaseHttpClient.h" had a problem.
(C:\Users\XXXXX\Documents\Arduino\libraries\firebase-arduino-master\src )

Just change the fingerprint in "static const char kFirebaseFingerprint[]" to another one [without : ] . You can find one for yours here"https://www.grc.com/fingerprints.htm". Just scroll down and put your firebase host (ie. https://xxxxxxx.firebaseio.com/) here.

found same kinda problem here "#236"

Thanks. It worked!

@Alpha-1729
Copy link

Try this method:
use latest firebase arduino library from the github.
use firebase 5.13.5
use esp8266 board manager 2.6.0

use firebase database rule like this
{
"rules": {
".read": "true",
".write": "true"
}
}

use firebase url like this : ######.firebaseio.com

then everything will work

@Alpha-1729
Copy link

dont use the firebase token in the script

@WareBV
Copy link

WareBV commented Apr 3, 2021

dont use the firebase token in the script
Awesome, like butter!!

@RukshanJS
Copy link

After the strive of whole day long, at last I reached to solution that the file "FirebaseHttpClient.h" had a problem.
(C:\Users\XXXXX\Documents\Arduino\libraries\firebase-arduino-master\src )

Just change the fingerprint in "static const char kFirebaseFingerprint[]" to another one [without : ] . You can find one for yours here"https://www.grc.com/fingerprints.htm". Just scroll down and put your firebase host (ie. https://xxxxxxx.firebaseio.com/) here.

found same kinda problem here "#236"

This worked for me, Thanks a lot!!!

@vienbu
Copy link

vienbu commented Jul 11, 2021

hi, i make a same error, i was change fingerprint but it still don't work, can anyone tell me how to u slove it, please
Capture

@cosme098
Copy link

Well, I managed to solve my problem which was the same as the ones above, I did the following steps, I changed the esp8266 core to version: 2.4.1, I put the json arduino to: 5.13.1 and finally, I did it the video steps:https://www.youtube.com/watch?v=ZZ5JvSA-Ed8&ab_channel=TrickSumo

@cosme098
Copy link

@vienbu follow this video, I had the same problem:https://www.youtube.com/watch?v=ZZ5JvSA-Ed8&ab_channel=TrickSumo

@stackblogger
Copy link

The error comes when Firebase Fingerprint is expired and your NodeMCU keeps trying to connect to Firebase.
The solution of the error is to generate a new fingerprint and insert in code.
The steps on how to generate and new key and insert is here- https://stackblogger.com/setting-number-failed-firebase-nodemcu/

@zeynepbaysoy
Copy link

Hi, I make a "setting/number failed error". I'm using nodemcu esp8266. I installed arduino json 5.13.1 version and esp8266 2.4.1 version and ı updated firebase fingerprint. But it doesn't work for me :( Please help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests