Is there a possibility that firebase connection fails to connect to server and does not throw any error?

1,291 views
Skip to first unread message

Tene Patrice

unread,
Sep 15, 2016, 6:26:05 PM9/15/16
to Firebase Google Group

Hi all

I wrote a code to read data from database and it was working perfectly before I went to bed. However, the following morning when I try connecting using my app (the code was not modified) and it wouldn't connect. My progress dialog kept running for as  long as I left the app running (Although I dismiss this in every possible failure point).

After further investigation, I found that it was throwing an error as shown below. While trying to figure out what was happening, I realized that it wasn't reading any data or throwing any error (I wrote simple logs in each callback function for testing purpose).

I played around with the google api console by updating my SHA1 debug key and app package and it work after a while.

My question is to find out if there is a possibility that the connection to the database fails to connect and it does not throw an error? 


The requested URL /v1/token?key=AIzaSyBE4u5DIXDUwH1bY9tcCRrGgVKAeVNx2PMwas not found on this server

Kato Richardson

unread,
Sep 15, 2016, 11:01:12 PM9/15/16
to Firebase Google Group

Hello Tene,

Firebase will continue to try and reconnect if the connection is lost. It’s not likely to fail with a connection error of any sort as being offline for a while on a mobile device is perfectly acceptable.

You can learn more about connectivity to the Database by turning on debug logging:

JS:  firebase.database().enableLogging(true);
iOS:  [FIRDatabase setLoggingEnabled:YES];
Android:  FirebaseDatabase.getInstance().setLogLevel(Logger.Level.DEBUG);

And by monitoring the .info/connected path as described in offline capabilities.

☼, Kato


--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/157e7f7f-6d97-451e-8f04-d314cfd8190d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Reply all
Reply to author
Forward
0 new messages