Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After long time run, Often get error Setting number failed #357

Open
adamrabbani opened this issue Jun 21, 2018 · 12 comments
Open

After long time run, Often get error Setting number failed #357

adamrabbani opened this issue Jun 21, 2018 · 12 comments
Labels
Milestone

Comments

@adamrabbani
Copy link

adamrabbani commented Jun 21, 2018

Setting number failed with new libary commit 26a87d4

#include <ESP8266WiFi.h>
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h>
#include <FirebaseArduino.h>
#include <SimpleTimer.h>
#include <ArduinoJson.h>

i use this above libary, when i use this function:
Firebase.getString("");

running and got this error ==> "(Setting number failed);"

==================================================

if i use with ESP8266WebServer and (client & server ) model [ESP-12E]
i'm often got error setting number failed...

Thanks !!

@adamrabbani adamrabbani changed the title Setting number failed Often Setting number failed #include ESP8266WebServer.h and (client & server) model Jun 21, 2018
@adamrabbani adamrabbani changed the title Often Setting number failed #include ESP8266WebServer.h and (client & server) model Often Setting number failed, if i use ESP8266WebServer.h and (client & server) model Jun 21, 2018
@adamrabbani
Copy link
Author

**After long time run... often get error setting number failed

@adamrabbani adamrabbani changed the title Often Setting number failed, if i use ESP8266WebServer.h and (client & server) model After long time run, Often get error Setting number failed Jun 21, 2018
@proppy
Copy link
Collaborator

proppy commented Jun 25, 2018

Can you include the full error message @adamrabbani ? Thanks in advance.

@proppy proppy added this to the 0.2 milestone Jun 25, 2018
@adamrabbani
Copy link
Author

adamrabbani commented Jun 25, 2018

i use this function
if (Firebase.failed()) {
Serial.print("setting /number failed:");
Serial.println(Firebase.error());
return;
}

but message of Firebase.error() doesn't appear...
and when i run function Firebase.set() can successfully and just Firebase.get() is failed..
i wonder why ?? hmm
Thanks

@adamrabbani
Copy link
Author

adamrabbani commented Jun 27, 2018

This link --> https://github.com/RaemondBW/firebase-arduino

this library stable and very rarely show error "setting /number failed"
i think the problem is version of ArduinoJson not same as old or new
and this library so old..

@proppy @kotl
Thanks..

@proppy
Copy link
Collaborator

proppy commented Jun 27, 2018

@adamrabbani I think the only update of this fork is the change of the fingerprint.

If you have problem with the library it might indicate a regression with recent changes (like #330).

Can you comment with more details on #357 and maybe give a try to #353 and see if it fixes your issue.

@proppy
Copy link
Collaborator

proppy commented Jun 27, 2018

Can you also paste debugging message after enabling HTTPClient debugging:
http://arduino-esp8266.readthedocs.io/en/latest/Troubleshooting/debugging.html

@microflorin
Copy link

I solved this problem. I placed 47uF electrolitic capacitor and 100nF ceramic capacitor on power suply. It's seems that the problem was at watchdog

@adamrabbani
Copy link
Author

@proppy sorry for late..
this result debug:

A. New libary:

[HTTP-Client][begin] host: xxxxxxxxxxxxxxxxxxxx.com port: 443 url: /status/Perubahan.json?auth=xxxxxxxxxxxxxxxxxxxxxx httpsFingerprint: B8 4F 40 70 0C 63 90 E0 07 E8 7D BD B4 11 D0 4A EA 9C 90 F6
[HTTP-Client] connect. already connected, try reuse!
[HTTP-Client] sending request header

GET /status/Perubahan.json?auth=xxxxxxxxxxxxxxxxxxxxxxHTTP/1.1
Host: xxxxxxxxxxxxxxxxxx.com
User-Agent: ESP8266HTTPClient
Connection: keep-alive
Accept-Encoding: identity;q=1,chunked;q=0.1,*;q=0


[HTTP-Client][handleHeaderResponse] RX: 'HTTP/1.1 200 OK'
[HTTP-Client][handleHeaderResponse] RX: 'Server: nginx'
[HTTP-Client][handleHeaderResponse] RX: 'Date: Sun, 01 Jul 2018 01:42:50 GMT'
[HTTP-Client][handleHeaderResponse] RX: 'Content-Type: application/json; charset=utf-8'
[HTTP-Client][handleHeaderResponse] RX: 'Content-Length: 3'
[HTTP-Client][handleHeaderResponse] RX: 'Connection: keep-alive'
[HTTP-Client][handleHeaderResponse] RX: 'Access-Control-Allow-Origin: *'
[HTTP-Client][handleHeaderResponse] RX: 'Cache-Control: no-cache'
[HTTP-Client][handleHeaderResponse] RX: 'Strict-Transport-Security: max-age=31556926; includeSubDomains; preload'
[HTTP-Client][handleHeaderResponse] RX: ''
[HTTP-Client][handleHeaderResponse] code: 200
[HTTP-Client][handleHeaderResponse] size: 3
[HTTP-Client][writeToStreamDataBlock] connection closed or file end (written: 3).
[HTTP-Client][end] tcp keep open for reuse
setting /number failed:

=================================================================

B.Old Libary

[HTTP-Client][begin] host: xxxxxxxxxxxxxx.com port: 443 url: /status/Perubahan.json?auth=xxxxxxxxxxxxxxxxxxxxxxxxxxx httpsFingerprint: B8 4F 40 70 0C 63 90 E0 07 E8 7D BD B4 11 D0 4A EA 9C 90 F6
[HTTP-Client] connect. already connected, try reuse!
[HTTP-Client] sending request header

GET /status/Perubahan.json?auth=xxxxxxxxxxxxxxxxxxxxxxxxx HTTP/1.1
Host: xxxxxxxxxxxxxxxx.com
User-Agent: ESP8266HTTPClient
Connection: keep-alive
Accept-Encoding: identity;q=1,chunked;q=0.1,*;q=0


[HTTP-Client][handleHeaderResponse] RX: 'HTTP/1.1 200 OK'
[HTTP-Client][handleHeaderResponse] RX: 'Server: nginx'
[HTTP-Client][handleHeaderResponse] RX: 'Date: Sun, 01 Jul 2018 01:21:25 GMT'
[HTTP-Client][handleHeaderResponse] RX: 'Content-Type: application/json; charset=utf-8'
[HTTP-Client][handleHeaderResponse] RX: 'Content-Length: 3'
[HTTP-Client][handleHeaderResponse] RX: 'Connection: keep-alive'
[HTTP-Client][handleHeaderResponse] RX: 'Access-Control-Allow-Origin: *'
[HTTP-Client][handleHeaderResponse] RX: 'Cache-Control: no-cache'
[HTTP-Client][handleHeaderResponse] RX: 'Strict-Transport-Security: max-age=31556926; includeSubDomains; preload'
[HTTP-Client][handleHeaderResponse] RX: ''
[HTTP-Client][handleHeaderResponse] code: 200
[HTTP-Client][handleHeaderResponse] size: 3
[HTTP-Client][writeToStreamDataBlock] connection closed or file end (written: 3).
[HTTP-Client][end] tcp keep open for reuse
[HTTP-Client][end] tcp keep open for reuse

@adamrabbani
Copy link
Author

the different just at the end line:
old libary:
[HTTP-Client][end] tcp keep open for reuse
[HTTP-Client][end] tcp keep open for reuse
==============================> 2 times

newest libary:
[HTTP-Client][end] tcp keep open for reuse
=============================>1 time
after that getting error:
setting /number failed:

and some time get:

[HTTP-Client][returnError] error(-11): read Timeout
[HTTP-Client][returnError] tcp stop
[HTTP-Client][returnError] error(-4): not connected
[HTTP-Client][begin] host: xxxxxxxxxxxx.com port: 443 url: /Keadaan_Relay_B_0.json?auth=xxxxxxxxxxxxxxxxxxxx httpsFingerprint: B8 4F 40 70 0C 63 90 E0 07 E8 7D BD B4 11 D0 4A EA 9C 90 F6
[HTTP-Client] failed connect to data-d9bde.firebaseio.com:443
[HTTP-Client][returnError] error(-1): connection refused
[HTTP-Client][returnError] error(-4): not connected
[HTTP-Client][begin] host: xxxxxxxxxxxxxx.com port: 443 url: /Keadaan_Relay_B_1.json?auth=xxxxxxxxxxxxxxxxxxxxxxx httpsFingerprint: B8 4F 40 70 0C 63 90 E0 07 E8 7D BD B4 11 D0 4A EA 9C 90 F6
[HTTP-Client] failed connect to data-d9bde.firebaseio.com:443
[HTTP-Client][returnError] error(-1): connection refused
[HTTP-Client][returnError] error(-4): not connected
[HTTP-Client][begin] host: xxxxxxxxxxxxx.com port: 443 url: /Keadaan_Relay_B_2.json?auth=xxxxxxxxxxxxxxxxxxxxxxx httpsFingerprint: B8 4F 40 70 0C 63 90 E0 07 E8 7D BD B4 11 D0 4A EA 9C 90 F6
[HTTP-Client] failed connect to data-d9bde.firebaseio.com:443
[HTTP-Client][returnError] error(-1): connection refused
[HTTP-Client][returnError] error(-4): not connected
[HTTP-Client][begin] host: xxxxxxxxxxxxxx.com port: 443 url: /Keadaan_Relay_B_3.json?auth=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx httpsFingerprint: B8 4F 40 70 0C 63 90 E0 07 E8 7D BD B4 11 D0 4A EA 9C 90 F6
[HTTP-Client] connected to xxxxxxxxxxxxxx.com:443
[HTTP-Client] sending request header

@mesut25
Copy link

mesut25 commented Aug 30, 2018

After long time run, Often get error Setting number failed #357

kotl
can you describe
Add bi-directional (stream + get/set) support and refactoring of the internal classes #330

Do you have a working library?

@rj1803
Copy link

rj1803 commented Apr 12, 2019

I was also having the same problem. Still, after updating the library to its latest version, it showed the same error. Seems like I was having a problem with the power supply. So I connected the NodeMCU to my phone charger and then it worked just fine.

@Jhilam2014
Copy link

@adamrabbani I am also facing the same problem. Getting exactly same error after few minutes of firebase interaction. Did you get the solution?

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

No branches or pull requests

6 participants